mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 463 forks source link

[Bug]: java.lang.RuntimeException: Camera is being used after Camera.release() was called #225

Closed bossbaba closed 4 years ago

bossbaba commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Logs Initializing hot reload...
Reloaded 0 of 516 libraries in 297ms. W/ActivityThread(13231): handleWindowVisibility: no activity for token android.os.BinderProxy@fc11b29 D/EGL_emulation(13231): eglMakeCurrent: 0xd452a380: ver 2 0 (tinfo 0xead9edf0) V/CameraPreview(13231): Cancelling autofocus D/FlutterView(13231): Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@4d5a411 E/ZXingScannerView(13231): java.lang.RuntimeException: Camera is being used after Camera.release() was called E/ZXingScannerView(13231): java.lang.RuntimeException: Camera is being used after Camera.release() was called E/ZXingScannerView(13231): at android.hardware.Camera.setHasPreviewCallback(Native Method) E/ZXingScannerView(13231): at android.hardware.Camera.setOneShotPreviewCallback(Camera.java:907) E/ZXingScannerView(13231): at me.dm7.barcodescanner.zxing.ZXingScannerView.onPreviewFrame(ZXingScannerView.java:169) E/ZXingScannerView(13231): at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1221) E/ZXingScannerView(13231): at android.os.Handler.dispatchMessage(Handler.java:107) E/ZXingScannerView(13231): at android.os.Looper.loop(Looper.java:214) E/ZXingScannerView(13231): at android.os.HandlerThread.run(HandlerThread.java:67) I/flutter (13231): Cancelled D/EGL_emulation(13231): eglMakeCurrent: 0xd452a380: ver 2 0 (tinfo 0xead9edf0) D/FlutterView(13231): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@4d5a411 D/EGL_emulation(13231): eglCreateContext: 0xdfae8dc0: maj 2 min 0 rcv 2

Environment (please complete the following information):

Additional context Add any other context about the problem here.

devtronic commented 4 years ago

It's not a bug, see also https://github.com/mintware-de/flutter_barcode_reader/issues/206