APP crashes when I turn on debug or profile mode.
Version:
mobile_scanner:0.2.0
flutter:2.10.3 And 2.8.1 (Both versions 2.10.3 and 2.8.1 have appeared, and other Flutter versions have not been tested yet.)
My Code :
import 'package:flutter/material.dart';
import 'package:miffy_tuya_smart_sdk_example/component/MiffyScreen.dart';
import 'package:mobile_scanner/mobile_scanner.dart';
class Scan extends StatelessWidget {
final MobileScannerController _controller =
MobileScannerController(torchEnabled: false);
@override
Widget build(BuildContext context) {
return ConstrainedBox(
constraints: const BoxConstraints.expand(),
child: Stack(
alignment: Alignment.topCenter,
children: [
MobileScanner(
controller: _controller,
onDetect: (barcode, args) {
final String? code = barcode.rawValue;
debugPrint('Barcode found! $code');
_controller.dispose();
Navigator.pop(context);
}),
],
));
}
}
Crash Log:
D/ViewRootImpl( 9140): enqueueInputEventMotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620301, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
D/ViewRootImpl[MainActivity]( 9140): processMotionEvent MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620301, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
D/ViewRootImpl[MainActivity]( 9140): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620301, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
D/ViewRootImpl[MainActivity]( 9140): processMotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620342, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
D/ViewRootImpl[MainActivity]( 9140): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620342, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
I/OplusCameraManager( 9140): saveOpPackageName, mOpPackageName: com.smart.happy
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
I/OplusCameraManagerGlobal( 9140): Connecting to camera service
I/CameraManagerGlobal( 9140): Connecting to camera service
E/libc ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
I/chatty ( 9140): uid=10392(com.smart.happy) CameraX-core_ca identical 1 line
E/libc ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
E/libc ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
E/libc ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
W/CameraManagerGlobal( 9140): ignore the torch status update of camera: 2
E/libc ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
W/CameraManagerGlobal( 9140): ignore the torch status update of camera: 3
E/libc ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
W/CameraManagerGlobal( 9140): ignore the torch status update of camera: 4
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
I/chatty ( 9140): uid=10392(com.smart.happy) CameraX-core_ca identical 4 lines
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
D/CameraRepository( 9140): Added camera: 0
I/Camera2CameraInfo( 9140): Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
D/CameraRepository( 9140): Added camera: 1
I/Camera2CameraInfo( 9140): Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
D/CameraValidator( 9140): Verifying camera lens facing on RMX3161CN, lensFacingInteger: null
D/DeferrableSurface( 9140): Surface created[total_surfaces=1, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@5331dae}
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
I/chatty ( 9140): uid=10392(com.smart.happy) identical 1 line
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
D/DeferrableSurface( 9140): Surface created[total_surfaces=2, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@be9ebe5}
D/Camera2CameraImpl( 9140): {Camera@4acbb13[id=0]} Use case androidx.camera.core.Preview-96105928-e476-4b12-a90d-e1b4453c95fb38840790 ACTIVE
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
D/UseCaseAttachState( 9140): Active and attached use case: [] for camera: 0
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
I/LOG ( 9140): Analyzer: 640x480
I/LOG ( 9140): Preview: 1600x1200
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
D/Camera2CameraImpl( 9140): {Camera@4acbb13[id=0]} Use case androidx.camera.core.ImageAnalysis-ffe93fde-7004-46d4-970a-a221c124a63926981463 ACTIVE
D/UseCaseAttachState( 9140): Active and attached use case: [] for camera: 0
D/Camera2CameraImpl( 9140): {Camera@4acbb13[id=0]} Use cases [androidx.camera.core.Preview-96105928-e476-4b12-a90d-e1b4453c95fb38840790, androidx.camera.core.ImageAnalysis-ffe93fde-7004-46d4-970a-a221c124a63926981463] now ATTACHED
D/UseCaseAttachState( 9140): All use case: [androidx.camera.core.Preview-96105928-e476-4b12-a90d-e1b4453c95fb38840790, androidx.camera.core.ImageAnalysis-ffe93fde-7004-46d4-970a-a221c124a63926981463] for camera: 0
D/UseCaseAttachState( 9140): Active and attached use case: [androidx.camera.core.Preview-96105928-e476-4b12-a90d-e1b4453c95fb38840790, androidx.camera.core.ImageAnalysis-ffe93fde-7004-46d4-970a-a221c124a63926981463] for camera: 0
E/com.smart.happ( 9140): [SurfaceTexture-0-9140-0] attachToContext: invalid current EGLDisplay
E/flutter ( 9140): [ERROR:flutter/fml/platform/android/jni_util.cc(211)] java.lang.RuntimeException: Error during attachToGLContext (see logcat for details)
E/flutter ( 9140): at android.graphics.SurfaceTexture.attachToGLContext(SurfaceTexture.java:295)
E/flutter ( 9140): at io.flutter.embedding.engine.renderer.SurfaceTextureWrapper.attachToGLContext(SurfaceTextureWrapper.java:71)
E/flutter ( 9140):
F/flutter ( 9140): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1301)] Check failed: fml::jni::CheckException(env).
F/libc ( 9140): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 9237 (1.raster), pid 9140 (com.smart.happy)
Process name is com.smart.happy, not key_process
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'realme/RMX3161/RMX3161CN:11/RKQ1.201217.002/1639934812003:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2022-03-08 15:55:47+0800
pid: 9140, tid: 9237, name: 1.raster >>> com.smart.happy <<<
uid: 10392
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1301)] Check failed: fml::jni::CheckException(env).
'
x0 0000000000000000 x1 0000000000002415 x2 0000000000000006 x3 0000007034e4ab00
x4 fefeff091f2d2875 x5 fefeff091f2d2875 x6 fefeff091f2d2875 x7 7f7f7f7f7f7f7f7f
x8 00000000000000f0 x9 8b59b306532be312 x10 0000000000000000 x11 ffffffc0fffffbdf
x12 0000000000000001 x13 000000000000007e x14 000c656d2705769f x15 0000000034155555
x16 000000712ace87e0 x17 000000712acc7da0 x18 000000702ff94000 x19 00000000000023b4
x20 0000000000002415 x21 00000000ffffffff x22 b400007087fd3518 x23 b4000070190cc0e8
x24 0000000000000000 x25 0000000000000000 x26 0000000000000000 x27 b400007087e41f58
x28 0000000000000001 x29 0000007034e4ab80
lr 000000712ac7b460 sp 0000007034e4aae0 pc 000000712ac7b48c pst 0000000000001000
backtrace:
#00 pc 000000000007848c /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: e81bf516b888e895d4e757da439c8117)
#01 pc 00000000006aae14 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#02 pc 00000000006cef94 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#03 pc 00000000006bde3c /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#04 pc 00000000006abfc4 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#05 pc 00000000009138bc /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#06 pc 0000000000910518 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#07 pc 0000000000913a88 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#08 pc 0000000000910518 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#09 pc 0000000000913a88 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#10 pc 0000000000910518 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#11 pc 000000000090faa8 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#12 pc 0000000000910518 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#13 pc 0000000000913a88 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#14 pc 0000000000910518 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#15 pc 0000000000913a88 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#16 pc 0000000000910518 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#17 pc 0000000000912d74 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#18 pc 0000000000910518 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#19 pc 0000000000913a88 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#20 pc 0000000000910518 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#21 pc 000000000090e6f0 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#22 pc 00000000009201b8 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#23 pc 000000000091febc /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#24 pc 00000000009210b0 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#25 pc 0000000000920ad4 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#26 pc 000000000092928c /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#27 pc 00000000006cfbc0 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#28 pc 00000000006d34c4 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#29 pc 0000000000019da8 /system/lib64/libutils.so (android::Looper::pollInner(int)+916) (BuildId: 85aad54dcf3341150498b846bfca7931)
#30 pc 00000000000199ac /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: 85aad54dcf3341150498b846bfca7931)
#31 pc 0000000000012c74 /system/lib64/libandroid.so (ALooper_pollOnce+100) (BuildId: 35fcec94a508276f883368d9eaad1c96)
#32 pc 00000000006d35d4 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#33 pc 00000000006d1890 /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
#34 pc 00000000000da278 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: e81bf516b888e895d4e757da439c8117)
#35 pc 000000000007a448 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: e81bf516b888e895d4e757da439c8117)
Lost connection to device.
Exited (sigterm)
bug android