edufolly / flutter_mobile_vision

Flutter implementation of Google Mobile Vision.
MIT License
455 stars 168 forks source link

Sample App crashes after Detecting face while selecting #69

Open padmanabanSampath opened 3 years ago

padmanabanSampath commented 3 years ago

hai, First thanks for your effort, After compiling the example app in real device in debugging mode on the home screen->face->then after pressing detect button i getting full screen of camera live capture, with bounded rectangle box and other details like id, right eye open probability , left eye open probability, and happiness, but when i tap that screen, i am seeing the list tile face data which helps to navigate to face data page, but the app crashes after that, from tapping the screen to app crashes all happens in one second, here is the error data from start of the app to closing of the app. i am in flutter master channel.

Launching lib\main.dart on MRD LX2 in debug mode... lib\main.dart √ Built build\app\outputs\flutter-apk\app-debug.apk. W/InputMethodManager( 2766): startInputReason = 5 Connecting to VM Service at ws://127.0.0.1:58612/2x79GOfBTjk=/ws D/AwareBitmapCacher( 2766): handleInit switch not opened pid=2766 D/ZrHung.AppEyeUiProbe( 2766): stop checker. D/ZrHung.AppEyeUiProbe( 2766): Current Activity:false D/ZrHung.AppEyeUiProbe( 2766): not watching, wait. W/InputMethodManager( 2766): startInputReason = 1 I/PermissionManager( 2766): camera remind result:true I/Camera ( 2766): open camera: 0, package name: com.example.ml_app I/BackgroundPermManager( 2766): pkgName: com.example.ml_app,pid: 2766 ,uidOf3RdApk: 10209 ,permType: 0 ,permCfg: 1 I/HwCameraUtil( 2766): notifySurfaceFlingerCameraStatus : isFront = false , isOpend = true D/ActivityThread( 2766): isOptEnabled=false isWechatScanOpt=false I/Camera ( 2766): close camera: 0, package name: com.example.ml_app I/BackgroundPermManager( 2766): pkgName: com.example.ml_app,pid: 2766 ,uidOf3RdApk: 10209 ,permType: 0 ,permCfg: 0 I/HwCameraUtil( 2766): notifySurfaceFlingerCameraStatus : isFront = false , isOpend = false I/PermissionManager( 2766): camera remind result:true I/Camera ( 2766): open camera: 1, package name: com.example.ml_app I/BackgroundPermManager( 2766): pkgName: com.example.ml_app,pid: 2766 ,uidOf3RdApk: 10209 ,permType: 0 ,permCfg: 1 I/HwCameraUtil( 2766): notifySurfaceFlingerCameraStatus : isFront = true , isOpend = true I/HwCameraUtil( 2766): notifySurfaceFlingerFrontCameraStatus 8011 transact success! D/ActivityThread( 2766): isOptEnabled=false isWechatScanOpt=false I/Camera ( 2766): close camera: 1, package name: com.example.ml_app I/BackgroundPermManager( 2766): pkgName: com.example.ml_app,pid: 2766 ,uidOf3RdApk: 10209 ,permType: 0 ,permCfg: 0 I/HwCameraUtil( 2766): notifySurfaceFlingerCameraStatus : isFront = true , isOpend = false I/HwCameraUtil( 2766): notifySurfaceFlingerFrontCameraStatus 8012 transact success! D/ZrHung.AppEyeUiProbe( 2766): notify runnable to start. D/ZrHung.AppEyeUiProbe( 2766): restart watching I/ViewRootImpl( 2766): jank_removeInvalidNode jank list is null E/GED ( 2766): Failed to get GED Log Buf, err(0) V/AudioManager( 2766): playSoundEffect effectType: 0 V/AudioManager( 2766): querySoundEffectsEnabled... I/.example.ml_ap( 2766): Starting profile saver IsSaveProfileNow end. V/AudioManager( 2766): playSoundEffect effectType: 0 V/AudioManager( 2766): querySoundEffectsEnabled... V/AudioManager( 2766): playSoundEffect effectType: 0 V/AudioManager( 2766): querySoundEffectsEnabled... D/ZrHung.AppEyeUiProbe( 2766): stop checker. W/ActivityThread( 2766): handleWindowVisibility: no activity for token android.os.BinderProxy@133df2f D/ZrHung.AppEyeUiProbe( 2766): notify runnable to start. V/ActivityThread( 2766): Skipping new config:{1.0 404mcc94mnc [en_GB] ldltr sw360dp w360dp h711dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=Rect(0, 54 - 720, 1476) mWindowingMode=fullscreen mActivityType=undefined} nonFullScreen=0 suim:1 s.20}, config:{1.0 404mcc94mnc [en_GB] ldltr sw360dp w360dp h711dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=Rect(0, 54 - 720, 1476) mWindowingMode=fullscreen mActivityType=undefined} nonFullScreen=0 suim:1 s.20} for app:com.example.ml_app V/ActivityThread( 2766): callActivityOnCreate I/HwPhoneWindow( 2766): updateLayoutParamsColor false mSpecialSet=false, mForcedNavigationBarColor=false, navigationBarColor=0, mNavBarShow=false, mIsFloating=false I/HwPhoneWindow( 2766): updateLayoutParamsColor true mSpecialSet=true, mForcedNavigationBarColor=false, navigationBarColor=fffcfcfc, mNavBarShow=false, mIsFloating=false W/DynamiteModule( 2766): Local module descriptor class for com.google.android.gms.vision.dynamite.face not found. I/DynamiteModule( 2766): Considering local module com.google.android.gms.vision.dynamite.face:0 and remote module com.google.android.gms.vision.dynamite.face:0 D/FaceNativeHandle( 2766): Cannot load feature, fall back to load dynamite module. W/.example.ml_ap( 2766): Unsupported class loader W/.example.ml_ap( 2766): Skipping duplicate class check due to unsupported classloader I/DynamiteModule( 2766): Considering local module com.google.android.gms.vision.face:0 and remote module com.google.android.gms.vision.face:1 I/DynamiteModule( 2766): Selected remote version of com.google.android.gms.vision.face, version >= 1 V/DynamiteModule( 2766): Dynamite loader version >= 2, using loadModule2NoCrashUtils W/System ( 2766): ClassLoader referenced unknown path: W/.example.ml_ap( 2766): Unknown chunk type '200'. W/.example.ml_ap( 2766): Unsupported class loader W/.example.ml_ap( 2766): Skipping duplicate class check due to unsupported classloader W/DynamiteModule( 2766): Local module descriptor class for com.google.android.gms.vision.dynamite.face not found. W/.example.ml_ap( 2766): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection) I/native ( 2766): face_detector_v2_jni.cc:33 Loading models/fssd_25_8bit_v1.tflite I/native ( 2766): face_detector_v2_jni.cc:33 Loading models/fssd_25_8bit_gray_v1.tflite I/native ( 2766): face_detector_v2_jni.cc:33 Loading models/LMprec_600.emd I/native ( 2766): face_detector_v2_jni.cc:33 Loading models/BCLlefteyeclosed_200.emd I/native ( 2766): face_detector_v2_jni.cc:33 Loading models/BCLrighteyeclosed_200.emd I/native ( 2766): face_detector_v2_jni.cc:33 Loading models/BCLjoy_200.emd I/native ( 2766): face_detector_v2_jni.cc:33 Loading models/MFT_fssd_fastgray.pb I/native ( 2766): face_detector_v2_jni.cc:33 Loading models/contours.tfl I/native ( 2766): face_detector_v2_jni.cc:33 Loading models/blazeface.tfl I/tflite ( 2766): Initialized TensorFlow Lite runtime. D/ActivityThread( 2766): add activity client record, r= ActivityRecord{57bd9e9 token=android.os.BinderProxy@133df2f {com.example.ml_app/io.github.edufolly.fluttermobilevision.face.FaceCaptureActivity}} token= android.os.BinderProxy@133df2f D/ZrHung.AppEyeUiProbe( 2766): notify runnable to start. D/OpenGLRenderer( 2766): HWUI Binary is enabled D/HwAppInnerBoostImpl( 2766): asyncReportData com.example.ml_app,2,1,1,0 interval=694 I/ViewRootImplFaceCaptureActivity: view add KeepScreenOnFlag W/HiTouch_HiTouchSensor( 2766): depended package hiTouch does n't exist! I/HiTouch_HiTouchSensor( 2766): HiTouch restricted: system app HiTouch don't exist. D/HiTouch_PressGestureDetector( 2766): onAttached, package=com.example.ml_app, windowType=1, mHiTouchRestricted=true I/HwPhoneWindow( 2766): updateLayoutParamsColor true mSpecialSet=true, mForcedNavigationBarColor=false, navigationBarColor=fffcfcfc, mNavBarShow=true, mIsFloating=false I/ViewRootImplFaceCaptureActivity: view add KeepScreenOnFlag I/PermissionManager( 2766): camera remind result:true I/Camera ( 2766): open camera: 1, package name: com.example.ml_app I/BackgroundPermManager( 2766): pkgName: com.example.ml_app,pid: 2766 ,uidOf3RdApk: 10209 ,permType: 0 ,permCfg: 1 I/HwCameraUtil( 2766): notifySurfaceFlingerCameraStatus : isFront = true , isOpend = true I/HwCameraUtil( 2766): notifySurfaceFlingerFrontCameraStatus 8011 transact success! D/ActivityThread( 2766): isOptEnabled=false isWechatScanOpt=false I/OpenCameraSource( 2766): Camera focus mode: continuous-picture is not supported on this device. E/ ( 2766): [ZeroHung]zrhung_get_config: Get config failed for wp[0x0008] I/PermissionManager( 2766): camera remind result:true D/HwAppInnerBoostImpl( 2766): asyncReportData com.example.ml_app,2,2,1,14 interval=967 I/ViewRootImpl( 2766): jank_removeInvalidNode all the node in jank list is out of time D/OpenGLRenderer( 2766): HWUI Binary is enabled W/InputMethodManager( 2766): startInputReason = 1 E/ion ( 2766): ioctl c0044901 failed with code -1: Invalid argument I/chatty ( 2766): uid=10209(com.example.ml_app) 1.raster identical 1 line E/ion ( 2766): ioctl c0044901 failed with code -1: Invalid argument I/SurfaceView( 2766): delay destroy surface control E/ion ( 2766): ioctl c0044901 failed with code -1: Invalid argument I/chatty ( 2766): uid=10209(com.example.ml_app) RenderThread identical 1 line E/ion ( 2766): ioctl c0044901 failed with code -1: Invalid argument I/SurfaceView( 2766): need destroy surface control D/ViewRootImplMainActivity: surface should not be released W/Thread-5( 2766): type=1400 audit(0.0:928838): avc: denied { read } for name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=8799 scontext=u:r:untrusted_app:s0:c209,c256,c512,c768 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0 E/libc ( 2766): Access denied finding property "ro.hardware.chipname" D/HwAppInnerBoostImpl( 2766): asyncReportData com.example.ml_app,2,1,1,0 interval=181 D/Camera ( 2766): app passed NULL surface I/Camera ( 2766): close camera: 1, package name: com.example.ml_app I/BackgroundPermManager( 2766): pkgName: com.example.ml_app,pid: 2766 ,uidOf3RdApk: 10209 ,permType: 0 ,permCfg: 0 I/HwCameraUtil( 2766): notifySurfaceFlingerCameraStatus : isFront = true , isOpend = false I/HwCameraUtil( 2766): notifySurfaceFlingerFrontCameraStatus 8012 transact success! D/ZrHung.AppEyeUiProbe( 2766): stop checker. D/HwAppInnerBoostImpl( 2766): asyncReportData com.example.ml_app,2,1,2,0 interval=639 D/ZrHung.AppEyeUiProbe( 2766): notify runnable to start. I/ViewRootImpl( 2766): jank_removeInvalidNode all the node in jank list is out of time W/InputMethodManager( 2766): startInputReason = 1 D/HwAppInnerBoostImpl( 2766): asyncReportData com.example.ml_app,2,1,3,0 interval=958 I/SurfaceView( 2766): delay destroy surface control E/ion ( 2766): ioctl c0044901 failed with code -1: Invalid argument E/ion ( 2766): ioctl c0044901 failed with code -1: Invalid argument I/SurfaceView( 2766): need destroy surface control D/ViewRootImplFaceCaptureActivity: surface should not be released D/AndroidRuntime( 2766): Shutting down VM W/.example.ml_ap( 2766): Accessing hidden method Lcom/msic/qarth/PatchStore;->createDisableExceptionQarthFile(Ljava/lang/Throwable;)Z (blacklist, JNI) E/.example.ml_ap( 2766): [qarth_debug:] get PatchStore::createDisableExceptionQarthFile method fail. E/AndroidRuntime( 2766): FATAL EXCEPTION: main E/AndroidRuntime( 2766): Process: com.example.ml_app, PID: 2766 E/AndroidRuntime( 2766): java.lang.RuntimeException: Unable to destroy activity {com.example.ml_app/io.github.edufolly.fluttermobilevision.face.FaceCaptureActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Thread$State java.lang.Thread.getState()' on a null object reference E/AndroidRuntime( 2766): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5176) E/AndroidRuntime( 2766): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5195) E/AndroidRuntime( 2766): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:39) E/AndroidRuntime( 2766): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) E/AndroidRuntime( 2766): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) E/AndroidRuntime( 2766): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199) E/AndroidRuntime( 2766): at android.os.Handler.dispatchMessage(Handler.java:112) E/AndroidRuntime( 2766): at android.os.Looper.loop(Looper.java:216) E/AndroidRuntime( 2766): at android.app.ActivityThread.main(ActivityThread.java:7625) E/AndroidRuntime( 2766): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 2766): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) E/AndroidRuntime( 2766): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987) E/AndroidRuntime( 2766): 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( 2766): at io.github.edufolly.fluttermobilevision.ui.CameraSource$FrameProcessingRunnable.release(CameraSource.java:1142) E/AndroidRuntime( 2766): at io.github.edufolly.fluttermobilevision.ui.CameraSource$FrameProcessingRunnable.access$900(CameraSource.java:1119) E/AndroidRuntime( 2766): at io.github.edufolly.fluttermobilevision.ui.CameraSource.release(CameraSource.java:334) E/AndroidRuntime( 2766): at io.github.edufolly.fluttermobilevision.ui.CameraSourcePreview.release(CameraSourcePreview.java:85) E/AndroidRuntime( 2766): at io.github.edufolly.fluttermobilevision.util.AbstractCaptureActivity.onDestroy(AbstractCaptureActivity.java:124) E/AndroidRuntime( 2766): at android.app.Activity.performDestroy(Activity.java:7737) E/AndroidRuntime( 2766): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1327) E/AndroidRuntime( 2766): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5161) E/AndroidRuntime( 2766): ... 11 more Lost connection to device. Exited (sigterm)