CodingWithTashi / simple_barcode_scanner

Simple Barcode Scanner
https://pub.dev/packages/simple_barcode_scanner
MIT License
46 stars 61 forks source link

Grey screen on android 14 #59

Closed andreastambazzi closed 3 days ago

andreastambazzi commented 3 months ago

I'm facing a issue on android 14. When SimpleBarcodeScannerPage is instantiated return a grey frame in place of a camera view.

On all other android versions and on ios it's working fine.

Any suggestion or fixes?

andreastambazzi commented 3 months ago

I still facing this issue, please anyone have a solution? This malfunctioning happening only on built apk , it never happen in debug mode with connected device to flutter sdk.

andreastambazzi commented 3 months ago

Tapping over the grey screen i receive the following error on logcat :

2024-06-24 19:45:38.596 25386-25386 ViewRootIm...eActivity] com.accyourate.yourate               I  ViewPostIme pointer 0
2024-06-24 19:45:38.596 25386-25386 InputEventReceiver      com.accyourate.yourate               E  Exception dispatching input event.
2024-06-24 19:45:38.596 25386-25386 MessageQueue-JNI        com.accyourate.yourate               E  Exception in MessageQueue callback: handleReceiveCallback
2024-06-24 19:45:38.597 25386-25386 MessageQueue-JNI        com.accyourate.yourate               E  java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.ScaleGestureDetector.onTouchEvent(android.view.MotionEvent)' on a null object reference
                                                                                                        at com.amolg.flutterbarcodescanner.BarcodeCaptureActivity.onTouchEvent(Unknown Source:2)
                                                                                                        at android.app.Activity.dispatchTouchEvent(Activity.java:4551)
                                                                                                        at k.m.dispatchTouchEvent(SourceFile:3)
                                                                                                        at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:734)
                                                                                                        at android.view.View.dispatchPointerEvent(View.java:16489)
                                                                                                        at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:8602)
                                                                                                        at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8353)
                                                                                                        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7682)
                                                                                                        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7739)
                                                                                                        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7705)
                                                                                                        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7908)
                                                                                                        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7713)
                                                                                                        at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7965)
                                                                                                        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7686)
                                                                                                        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7739)
                                                                                                        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7705)
                                                                                                        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7713)
                                                                                                        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7686)
                                                                                                        at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:11250)
                                                                                                        at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:11119)
                                                                                                        at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:11075)
                                                                                                        at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:11384)
                                                                                                        at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:337)
                                                                                                        at android.os.MessageQueue.nativePollOnce(Native Method)
                                                                                                        at android.os.MessageQueue.next(MessageQueue.java:335)
                                                                                                        at android.os.Looper.loopOnce(Looper.java:187)
                                                                                                        at android.os.Looper.loop(Looper.java:319)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:8919)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
CodingWithTashi commented 3 days ago

https://github.com/CodingWithTashi/simple_barcode_scanner/issues/63#issuecomment-2392019435