Skip to content

[firebase_ml_vision] crashes after several launches on Android 5 #249

Closed
@caseyryan

Description

@caseyryan

I need to add a barcode scan functionality to my app. I wanted to use Firebase ML vision.
So I've downloaded an official ml vision example project and launched it on Android 5.0.2 without any changes. I can launch a scanner 2 times. Every time i go back from the scanner page I get tons of errors, and after I do it twice and try to open the page for the third time, the whole app hangs and then crashes.
Here is the complete log of the app work:

> I/RequestQueue(20090): Repeating capture request cancelled.
> E/flutter (20090): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The method 'call' was called on null.
> E/flutter (20090): Receiver: null
> E/flutter (20090): Tried calling: call()
> E/flutter (20090): #0      ScannerUtils.detect (package:firebase_ml_vision_example/scanner_utils.dart:29:25)
> E/flutter (20090): <asynchronous suspension>
> E/flutter (20090): #1      _CameraPreviewScannerState._initializeCamera.<anonymous closure> (package:firebase_ml_vision_example/camera_preview_scanner.dart:58:20)
> E/flutter (20090): #2      CameraController.startImageStream.<anonymous closure> (package:camera/camera.dart:411:20)
> E/flutter (20090): #3      _rootRunUnary (dart:async/zone.dart:1132:38)
> E/flutter (20090): #4      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
> E/flutter (20090): #5      _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
> E/flutter (20090): #6      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
> E/flutter (20090): #7      _DelayedData.perform (dart:async/stream_impl.dart:591:14)
> E/flutter (20090): #8      _StreamImplEvents.handleNext (dart:async/stream_impl.dart:707:11)
> E/flutter (20090): #9      _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:667:7)
> E/flutter (20090): #10     _rootRun (dart:async/zone.dart:1120:38)
> E/flutter (20090): #11     _CustomZone.run (dart:async/zone.dart:1021:19)
> E/flutter (20090): #12     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
> E/flutter (20090): #13     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
> E/flutter (20090): #14     _rootRun (dart:async/zone.dart:1124:13)
> E/flutter (20090): #15     _CustomZone.run (dart:async/zone.dart:1021:19)
> E/flutter (20090): #16     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
> E/flutter (20090): #17     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
> E/flutter (20090): #18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
> E/flutter (20090): #19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
> E/flutter (20090): 
> E/BufferQueueProducer(20090): [unnamed-20090-9] cancelBuffer: BufferQueue has been abandoned
> E/BufferQueueProducer(20090): [unnamed-20090-9] cancelBuffer: BufferQueue has been abandoned
> E/BufferQueueProducer(20090): [unnamed-20090-9] cancelBuffer: BufferQueue has been abandoned
> E/BufferQueueProducer(20090): [unnamed-20090-9] cancelBuffer: BufferQueue has been abandoned
> E/BufferQueueProducer(20090): [unnamed-20090-9] cancelBuffer: BufferQueue has been abandoned
> I/View    (20090): Touch down dispatch to io.flutter.view.FlutterView{3226748a VFE..... .F...... 0,0-720,1280}, event = MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=461.35922, y[0]=347.72833, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=30782126, downTime=30782126, deviceId=7, source=0x1002 }
> I/View    (20090): Touch up dispatch to io.flutter.view.FlutterView{3226748a VFE..... .F...... 0,0-720,1280}, event = MotionEvent { action=ACTION_UP, id[0]=0, x[0]=461.35922, y[0]=347.72833, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=30782215, downTime=30782126, deviceId=7, source=0x1002 }
> W/ArrayUtils(20090): Ignoring invalid value manual
> W/ArrayUtils(20090): Ignoring invalid value manual
> W/ArrayUtils(20090): Ignoring invalid value emboss
> W/ArrayUtils(20090): Ignoring invalid value sketch
> W/ArrayUtils(20090): Ignoring invalid value neon
> W/ArrayUtils(20090): Ignoring invalid value asd
> W/ArrayUtils(20090): Ignoring invalid value backlight
> W/ArrayUtils(20090): Ignoring invalid value flowers
> W/ArrayUtils(20090): Ignoring invalid value AR
> W/ArrayUtils(20090): Ignoring invalid value manual
> W/ArrayUtils(20090): Ignoring invalid value emboss
> W/ArrayUtils(20090): Ignoring invalid value sketch
> W/ArrayUtils(20090): Ignoring invalid value neon
> W/ArrayUtils(20090): Ignoring invalid value asd
> W/ArrayUtils(20090): Ignoring invalid value backlight
> W/ArrayUtils(20090): Ignoring invalid value flowers
> W/ArrayUtils(20090): Ignoring invalid value AR
> W/ArrayUtils(20090): Ignoring invalid value manual
> W/ArrayUtils(20090): Ignoring invalid value manual
> W/ArrayUtils(20090): Ignoring invalid value emboss
> W/ArrayUtils(20090): Ignoring invalid value sketch
> W/ArrayUtils(20090): Ignoring invalid value neon
> W/ArrayUtils(20090): Ignoring invalid value asd
> W/ArrayUtils(20090): Ignoring invalid value backlight
> W/ArrayUtils(20090): Ignoring invalid value flowers
> W/ArrayUtils(20090): Ignoring invalid value AR
> W/ArrayUtils(20090): Ignoring invalid value manual
> W/ArrayUtils(20090): Ignoring invalid value manual
> W/ArrayUtils(20090): Ignoring invalid value emboss
> W/ArrayUtils(20090): Ignoring invalid value sketch
> W/ArrayUtils(20090): Ignoring invalid value neon
> W/ArrayUtils(20090): Ignoring invalid value asd
> W/ArrayUtils(20090): Ignoring invalid value backlight
> W/ArrayUtils(20090): Ignoring invalid value flowers
> W/ArrayUtils(20090): Ignoring invalid value AR
> I/CameraManager(20090): Using legacy camera HAL.
> W/ArrayUtils(20090): Ignoring invalid value manual
> W/ArrayUtils(20090): Ignoring invalid value manual
> W/ArrayUtils(20090): Ignoring invalid value emboss
> W/ArrayUtils(20090): Ignoring invalid value sketch
> W/ArrayUtils(20090): Ignoring invalid value neon
> W/ArrayUtils(20090): Ignoring invalid value asd
> W/ArrayUtils(20090): Ignoring invalid value backlight
> W/ArrayUtils(20090): Ignoring invalid value flowers
> W/ArrayUtils(20090): Ignoring invalid value AR
> I/CameraDeviceState(20090): Legacy camera service transitioning to state CONFIGURING
> I/RequestThread-0(20090): Configure outputs: 2 surfaces configured.
> D/Camera  (20090): app passed NULL surface
> I/RequestThread-0(20090): configureOutputs - set take picture size to 720x480
> I/CameraDeviceState(20090): Legacy camera service transitioning to state IDLE
> I/RequestQueue(20090): Repeating capture request set.
> I/RequestQueue(20090): Repeating capture request cancelled.

> ABI: 'arm64'
> pid: 7357, tid: 7479, name: Thread-1430  >>> testml.company.com.testml_coupon <<<
> signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xd1400040d5f
>     x0   00000055aa7c9250  x1   0000000000000010  x2   0000007f87fa2ba0  x3   00000055aa55b2d0
>     x4   0000000000000000  x5   0000000000000000  x6   ffffffffffffffff  x7   0000000000000001
>     x8   00000d1400040d18  x9   0000000000000000  x10  0000000000000000  x11  8000000000000000
>     x12  0000000000000001  x13  00000055a952d000  x14  0000000000000001  x15  0000000000000005
>     x16  0000007f89a09f00  x17  0000007f9d764720  x18  8000000000000000  x19  0000007f89981370
>     x20  00000055aa7c9250  x21  00000d1400040d18  x22  00000000008effff  x23  0000000000000000
>     x24  0000007f868cf7a1  x25  0000007f89981000  x26  0000007f899c80f8  x27  0000007f89a1f000
>     x28  0000000000000026  x29  0000007f89a1f9f0  x30  0000007f895c9e34
>     sp   0000007f87fa14f0  pc   0000007f895c9e58  pstate 0000000080000000
> backtrace:
>     #00 pc 0000000000461e58  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #01 pc 000000000064478c  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #02 pc 000000000066fc20  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #03 pc 0000000000483db8  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #04 pc 00000000003d63e0  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #05 pc 00000000003d8ef4  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #06 pc 00000000003dadfc  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #07 pc 0000000000528b88  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #08 pc 00000000004045d8  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #09 pc 000000000051d650  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #10 pc 0000000000518b1c  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #11 pc 00000000005190bc  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #12 pc 00000000003ff880  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #13 pc 000000000042a414  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #14 pc 000000000042a7c4  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #15 pc 0000000000540eb4  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #16 pc 0000000000510abc  /data/app/testml.company.com.testml_coupon-1/lib/arm64/libflutter.so
>     #17 pc 0000000000001668  <unknown>
> Tombstone written to: /data/tombstones/tombstone_08

And here is the doctor summary

> Doctor summary (to see all details, run flutter doctor -v):
> [√] Flutter (Channel dev, v1.10.0, on Microsoft Windows [Version 6.1.7601], locale ru-RU)
> [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
> [√] Android Studio (version 3.5)
> [!] IntelliJ IDEA Ultimate Edition (version 2018.1)
>     X Flutter plugin not installed; this adds Flutter specific functionality.
>     X Dart plugin not installed; this adds Dart specific functionality.
> [√] IntelliJ IDEA Ultimate Edition (version 2019.1)
> [!] VS Code (version 1.38.1)
>     X Flutter extension not installed; install from
>       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
> [√] Connected device (1 available)

Exactly the same happens on Android 9, except for the legacy camera information.

Unfortunately, the current version of Firebase ML vision is absolutely unusable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleIssue with no recent activityimpact: customerA bug with low impact (e.g. affecting only a few customers or has a workaround). (P3)plugin: ml_visiontype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions