Crash after scanning - Android
See original GitHub issueDescribe the bug When scanning a barcode the application crashes with this error:
E/AndroidRuntime(19560): java.lang.RuntimeException: Unable to destroy activity {xxxx/com.amolg.flutterbarcodescanner.BarcodeCaptureActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Thread$State java.lang.Thread.getState()' on a null object reference
E/AndroidRuntime(19560): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5438)
E/AndroidRuntime(19560): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5472)
E/AndroidRuntime(19560): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
E/AndroidRuntime(19560): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
E/AndroidRuntime(19560): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
E/AndroidRuntime(19560): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2270)
E/AndroidRuntime(19560): at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(19560): at android.os.Looper.loop(Looper.java:237)
E/AndroidRuntime(19560): at android.app.ActivityThread.main(ActivityThread.java:8125)
E/AndroidRuntime(19560): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(19560): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
E/AndroidRuntime(19560): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
E/AndroidRuntime(19560): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Thread$State java.lang.Thread.getState()' on a null object reference
E/AndroidRuntime(19560): at com.amolg.flutterbarcodescanner.camera.CameraSource$FrameProcessingRunnable.release(CameraSource.java:967)
E/AndroidRuntime(19560): at com.amolg.flutterbarcodescanner.camera.CameraSource.release(CameraSource.java:273)
E/AndroidRuntime(19560): at com.amolg.flutterbarcodescanner.camera.CameraSourcePreview.release(CameraSourcePreview.java:84)
E/AndroidRuntime(19560): at com.amolg.flutterbarcodescanner.BarcodeCaptureActivity.onDestroy(BarcodeCaptureActivity.java:266)
E/AndroidRuntime(19560): at android.app.Activity.performDestroy(Activity.java:8219)
E/AndroidRuntime(19560): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1342)
E/AndroidRuntime(19560): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5423)
E/AndroidRuntime(19560): ... 11 more
To Reproduce Just follow the example in the documentation. Nothing done in Android.
Smartphone (please complete the following information):
- Device: Samsung S9
- OS: Android 10
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Android app crash when scanning TOTP QR Code #1228
I have never been able to scan a QR code from within the bitwarden app, it crashes on both official and custom roms...
Read more >Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >Why does my phone crash when I scan barcodes - Google Help
As I proceeded to scan my items I noticed after the first scan my pixel 4xl goes black, and the only way to...
Read more >App is crashing after capture image/scan QR code in android 12
In my app user can capture images and scan QR code. App is working fine in all android versions expect android 12. App...
Read more >Scanner crashes | Scanner Pro Knowledge Base
We'll ask you for crash logs - the data the app generates when it crashes. It contains information related to where the issues...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
write this code here!! ------------------------>>>>>>>
@SuppressLint(“Assert”) void release() { assert (mProcessingThread == null || mProcessingThread.getState() == State.TERMINATED); if (mDetector != null) { mDetector.release(); mDetector = null; } }
The potential fix has been made and the new version is available 1.0.2