Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crash on purchase or add items to shopping list #835

Closed
xuko opened this issue Feb 3, 2024 · 4 comments
Closed

App crash on purchase or add items to shopping list #835

xuko opened this issue Feb 3, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@xuko
Copy link

xuko commented Feb 3, 2024

When I try to add items to shopping list or trying to un barcode scanner, the app crash and I get this error

--------- beginning of main
02-03 14:09:28.607 31895 31895 E ViewUtil: icon animation requires AnimVectorDrawable
--------- beginning of crash
02-03 14:09:28.821 31895 31895 E AndroidRuntime: FATAL EXCEPTION: main
02-03 14:09:28.821 31895 31895 E AndroidRuntime: Process: xyz.zedler.patrick.grocy, PID: 31895
02-03 14:09:28.821 31895 31895 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at xyz.zedler.patrick.grocy.adapter.MatchProductsArrayAdapter.<init>(MatchProductsArrayAdapter.java:49)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at xyz.zedler.patrick.grocy.util.BindingAdaptersUtil.setProductList(BindingAdaptersUtil.java:10)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at xyz.zedler.patrick.grocy.databinding.FragmentPurchaseBindingImpl.executeBindings(FragmentPurchaseBindingImpl.java:3393)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at androidx.databinding.ViewDataBinding$7.run(ViewDataBinding.java:73)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at androidx.databinding.ViewDataBinding$8.doFrame(ViewDataBinding.java:5)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1386)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1396)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:1033)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.view.ChoreographerExtImpl.checkScrollOptSceneEnable(ChoreographerExtImpl.java:411)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:900)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1371)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:942)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:240)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:351)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8377)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
02-03 14:09:28.821 31895 31895 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
02-03 14:09:31.556 16997 16997 E r.patrick.grocy: Unknown bits set in runtime_flags: 0x40000000
02-03 14:09:31.560 16997 16997 E r.patrick.grocy: Not starting debugger since process cannot load the jdwp agent.
02-03 14:09:31.569 16997 18696 E r.patrick.grocy: Could not write anonymous vdex /system/framework/oat/arm64/mediatek-framework.vdex: Could not open /system/framework/oat/arm64/mediatek-framework.vdex for writing
02-03 14:09:31.623 16997 16997 E r.patrick.grocy: ofbOpen failed with error=No such file or directory
02-03 14:09:31.623 16997 16997 E r.patrick.grocy: sysOpen failed with error=No such file or directory
02-03 14:09:31.648 16997 18708 E r.patrick.grocy: Loaded layer handle (3994026014945364841) for layer /my_product/lib64/libcolorx-loader.so
02-03 14:09:31.648 16997 18708 E r.patrick.grocy: Looking for entrypoint ColorX_Check
02-03 14:09:31.648 16997 18708 E r.patrick.grocy: Found ColorX_Check for /my_product/lib64/libcolorx-loader.so
02-03 14:09:31.648 16997 18708 E r.patrick.grocy: Check failed
02-03 14:09:31.650 16997 18708 E QT      : [QT]file does not exist
02-03 14:09:31.651 16997 18708 E QT      : [QT]file does not exist
--------- beginning of system
02-03 14:09:31.751 16997 16997 E OplusCustomizeRestrictionManager: sInstance is null, start a new sInstance
02-03 14:09:31.852 16997 16997 E FBI     : Can't load library: dlopen failed: library "libmagtsync.so" not found
@xuko
Copy link
Author

xuko commented Feb 4, 2024

I fixed removing a product with empty name.

After that I can enter purchase page but y get this error on barcode scan

--------- beginning of crash
02-04 23:27:55.696  2940  2940 E AndroidRuntime: FATAL EXCEPTION: main
02-04 23:27:55.696  2940  2940 E AndroidRuntime: Process: xyz.zedler.patrick.grocy, PID: 2940
02-04 23:27:55.696  2940  2940 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at xyz.zedler.patrick.grocy.model.ProductBarcode.getFromBarcode(ProductBarcode.java:21)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at xyz.zedler.patrick.grocy.viewmodel.PurchaseViewModel.onBarcodeRecognized(PurchaseViewModel.java:105)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at xyz.zedler.patrick.grocy.fragment.PurchaseFragment.onBarcodeRecognized(PurchaseFragment.java:21)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at xyz.zedler.patrick.grocy.scanner.ZXingScanCaptureManager$1.barcodeResult(ZXingScanCaptureManager.java:160)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at com.journeyapps.barcodescanner.DecoratedBarcodeView$WrappedCallback.barcodeResult(DecoratedBarcodeView.java:3)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at com.journeyapps.barcodescanner.BarcodeView$1.handleMessage(BarcodeView.java:27)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:240)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:351)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8377)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
02-04 23:27:55.696  2940  2940 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
--------- beginning of system
02-04 23:28:06.021 30104 30104 E OplusCustomizeRestrictionManager: sInstance is null, start a new sInstance
--------- beginning of main
02-04 23:29:31.128 30104 30104 E IPCThreadState: attemptIncStrongHandle(81): Not supported
02-04 23:29:31.128 30104 30104 E IPCThreadState: attemptIncStrongHandle(61): Not supported
02-04 23:29:40.288 30104 30104 E IPCThreadState: attemptIncStrongHandle(79): Not supported
02-04 23:29:53.477 30104 30104 E IPCThreadState: attemptIncStrongHandle(78): Not supported
02-04 23:29:53.477 30104 30104 E IPCThreadState: attemptIncStrongHandle(59): Not supported

@xuko
Copy link
Author

xuko commented Feb 5, 2024

I found the problem. It was a barcode in grocy database with a null in barcode value.

@dominiczedler dominiczedler added the bug Something isn't working label Feb 10, 2024
@dominiczedler dominiczedler self-assigned this Feb 10, 2024
@dominiczedler
Copy link
Collaborator

Thanks I've fixed the crashes but these should not occur with normal user interface I think.

@xuko
Copy link
Author

xuko commented Feb 10, 2024

Thanks I've fixed the crashes but these should not occur with normal user interface I think.

Yes, I think it was using Grocy API. It's not well protected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants