facundomedica / fast_qr_reader_view

A Fast QR Reader widget for Flutter. For both Android and iOS
MIT License
294 stars 163 forks source link

App freezes after X seconds of usage #6

Closed Nik99 closed 6 years ago

Nik99 commented 6 years ago

I downloaded the example sketch provided by @facundomedica , and i just removed the main async function and putted in a real async function called before all the sketch. The page starts, but after 2-3 seconds, the preview image just freezes, while the animation keeps going.

This is the error:

E/MethodChannel#fast_qr_reader_view(18859): Failed to handle method call
E/MethodChannel#fast_qr_reader_view(18859): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.Image.close()' on a null object reference
E/MethodChannel#fast_qr_reader_view(18859):     at co.apperto.fastqrreaderview.FastQrReaderViewPlugin.startScanning(FastQrReaderViewPlugin.java:315)
E/MethodChannel#fast_qr_reader_view(18859):     at co.apperto.fastqrreaderview.FastQrReaderViewPlugin.onMethodCall(FastQrReaderViewPlugin.java:220)
E/MethodChannel#fast_qr_reader_view(18859):     at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
E/MethodChannel#fast_qr_reader_view(18859):     at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/MethodChannel#fast_qr_reader_view(18859):     at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#fast_qr_reader_view(18859):     at android.os.MessageQueue.next(MessageQueue.java:379)
E/MethodChannel#fast_qr_reader_view(18859):     at android.os.Looper.loop(Looper.java:144)
E/MethodChannel#fast_qr_reader_view(18859):     at android.app.ActivityThread.main(ActivityThread.java:7425)
E/MethodChannel#fast_qr_reader_view(18859):     at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#fast_qr_reader_view(18859):     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
E/MethodChannel#fast_qr_reader_view(18859):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
E/FlutterNativeView(18859): Uncaught exception in binary message listener
E/FlutterNativeView(18859): java.lang.IllegalStateException: Reply already submitted
E/FlutterNativeView(18859):     at io.flutter.view.FlutterNativeView$1.reply(FlutterNativeView.java:174)
E/FlutterNativeView(18859):     at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:209)
E/FlutterNativeView(18859):     at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/FlutterNativeView(18859):     at android.os.MessageQueue.nativePollOnce(Native Method)
E/FlutterNativeView(18859):     at android.os.MessageQueue.next(MessageQueue.java:379)
E/FlutterNativeView(18859):     at android.os.Looper.loop(Looper.java:144)
E/FlutterNativeView(18859):     at android.app.ActivityThread.main(ActivityThread.java:7425)
E/FlutterNativeView(18859):     at java.lang.reflect.Method.invoke(Native Method)
E/FlutterNativeView(18859):     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
E/FlutterNativeView(18859):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
W/GrallocMapperPassthrough(18859): buffer descriptor with invalid usage bits 0x2080000
W/GrallocMapperPassthrough(18859): buffer descriptor with invalid usage bits 0x2080000
W/GrallocMapperPassthrough(18859): buffer descriptor with invalid usage bits 0x2080000
W/GrallocMapperPassthrough(18859): buffer descriptor with invalid usage bits 0x2080000
facundomedica commented 6 years ago

This is caused by an attempt of fixing #3, I'm working to fix it 👍

facundomedica commented 6 years ago

I'm closing this, check my last comment on #3!

Nik99 commented 6 years ago

So, i've updated the app and it won't start anymore. I've tryed to remove it from pubspec but nothing, the app shows me a white screen and nothing happens. Do you know how to help me ?

Edit: it gives me this error if i try to hot-reload it Error -32601 received from application: Method not found

Nik99 commented 6 years ago

Never mind, there was a problem with the intl package. thanks for the fix! :)