You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
URGENT!!!!! Please HELP!!! Unhandled Exception: PlatformException(Failed to run model, Attempt to invoke virtual method 'org.tensorflow.lite.Tensor org.tensorflow.lite.Interpreter.getInputTensor(int)' on a null object reference, java.lang.NullPointerException: Attempt to invoke virtual method 'org.tensorflow.lite.Tensor org.tensorflow.lite.Interpreter.getInputTensor(int)' on a null object reference
#295
Open
khaiyue opened this issue
Apr 28, 2024
· 0 comments
This is the whole debugging log shown. This happen after the image is chosen, no matter is from camera or gallery.
D/VRI[MainActivity](31231): debugCancelDraw some OnPreDrawListener onPreDraw return false,cancelDraw=true,count=50,android.view.ViewRootImpl@2025556 D/FirebaseAuth(31231): Notifying id token listeners about user ( PCBsXViqy9U628twsSRcGPv1SGW2 ). I/TensorFlowLite(31231): Loaded native library: tensorflowlite_jni I/TensorFlowLite(31231): Didn't load native library: tensorflowlite_jni_gms_client I/tflite (31231): Initialized TensorFlow Lite runtime. W/libc (31231): Access denied finding property "ro.hardware.chipname" I/tflite (31231): Created TensorFlow Lite XNNPACK delegate for CPU. I/Quality (31231): Skipped: false 1 cost 29.663422 refreshRate 16683856 bit true processName com.example.fyp2.fyp2 I/flutter (31231): Failed to load model. D/VRI[MainActivity](31231): registerCallbacksForSync syncBuffer=false D/VRI[MainActivity](31231): Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true syncBuffer=false W/Parcel (31231): Expecting binder but got null! D/VRI[MainActivity](31231): debugCancelDraw cancelDraw=false,count = 220,android.view.ViewRootImpl@2025556 D/VRI[MainActivity](31231): draw finished. I/Quality (31231): TaskTrackInfo {"Pkg":com.example.fyp2.fyp2,"Window":com.example.fyp2.fyp2.MainActivity,"Type":1,"Action":10,"Cost":4135,"FV":16,"JC":16-15-0-1-0-0-1-0-4-1-0-0-0-0-0-0-0-0-1-0-4124-3849-924470182-1538,"SF":no-need,"UITid":31231,"RTid":3532} TTI:Access fail D/VRI[MainActivity](31231): onFocusEvent true D/ProfileInstaller(31231): Installing profile for com.example.fyp2.fyp2 D/OplusInputMethodManagerInternal(31231): get inputMethodManager extension: com.android.internal.view.IInputMethodManager$Stub$Proxy@e971ea8 D/VRI[MainActivity](31231): onFocusEvent false D/CompatibilityChangeReporter(31231): Compat change id reported: 78294732; UID 10446; state: ENABLED D/VRI[MainActivity](31231): onFocusEvent true I/flutter (31231): G O T !!!!!!! Image E/flutter (31231): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Failed to run model, Attempt to invoke virtual method 'org.tensorflow.lite.Tensor org.tensorflow.lite.Interpreter.getInputTensor(int)' on a null object reference, java.lang.NullPointerException: Attempt to invoke virtual method 'org.tensorflow.lite.Tensor org.tensorflow.lite.Interpreter.getInputTensor(int)' on a null object reference E/flutter (31231): at sq.flutter.flutter_tflite.TflitePlugin.feedInputTensor(TflitePlugin.java:368) E/flutter (31231): at sq.flutter.flutter_tflite.TflitePlugin.feedInputTensorImage(TflitePlugin.java:430) E/flutter (31231): at sq.flutter.flutter_tflite.TflitePlugin.detectObjectOnImage(TflitePlugin.java:624) E/flutter (31231): at sq.flutter.flutter_tflite.TflitePlugin.onMethodCall(TflitePlugin.java:157) E/flutter (31231): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) E/flutter (31231): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292) E/flutter (31231): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/flutter (31231): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/flutter (31231): at android.os.Handler.handleCallback(Handler.java:942) E/flutter (31231): at android.os.Handler.dispatchMessage(Handler.java:99) E/flutter (31231): at android.os.Looper.loopOnce(Looper.java:240) E/flutter (31231): at android.os.Looper.loop(Looper.java:351) E/flutter (31231): at android.app.ActivityThread.main(ActivityThread.java:8377) E/flutter (31231): at java.lang.reflect.Method.invoke(Native Method) E/flutter (31231): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584) E/flutter (31231): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013) E/flutter (31231): , null) E/flutter (31231): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7) E/flutter (31231): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18) E/flutter (31231): <asynchronous suspension> E/flutter (31231): #2 Tflite.detectObjectOnImage (package:flutter_tflite/flutter_tflite.dart:113:12) E/flutter (31231): <asynchronous suspension> E/flutter (31231): #3 _CameraPageState.yolov2Tiny (package:fyp2/views/camera_page.dart:494:24) E/flutter (31231): <asynchronous suspension> E/flutter (31231): #4 _CameraPageState.predictImage (package:fyp2/views/camera_page.dart:421:5) E/flutter (31231): <asynchronous suspension> E/flutter (31231): W/System (31231): A resource failed to call close. W/System (31231): A resource failed to call close.
This is the complete code that I modified based on my use case, but mostly is the similar one.
The text was updated successfully, but these errors were encountered: