Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio classification example: "Unable to destroy activity" error #44

Open
pomon23 opened this issue Dec 1, 2021 · 0 comments
Open

Audio classification example: "Unable to destroy activity" error #44

pomon23 opened this issue Dec 1, 2021 · 0 comments

Comments

@pomon23
Copy link

pomon23 commented Dec 1, 2021

In the audio classification example app, there is an error that happens when attempting to shut down the app:

D/AndroidRuntime(22879): Shutting down VM
E/AndroidRuntime(22879): FATAL EXCEPTION: main
E/AndroidRuntime(22879): Process: com.example.audio_classification, PID: 22879
E/AndroidRuntime(22879): java.lang.RuntimeException: Unable to destroy activity {com.example.audio_classification/com.example.audio_classification.MainActivity}: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter recorder
E/AndroidRuntime(22879): 	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5675)
E/AndroidRuntime(22879): 	at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5720)
E/AndroidRuntime(22879): 	at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
E/AndroidRuntime(22879): 	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
E/AndroidRuntime(22879): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
E/AndroidRuntime(22879): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
E/AndroidRuntime(22879): 	at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(22879): 	at android.os.Looper.loop(Looper.java:246)
E/AndroidRuntime(22879): 	at android.app.ActivityThread.main(ActivityThread.java:8633)
E/AndroidRuntime(22879): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(22879): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
E/AndroidRuntime(22879): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
E/AndroidRuntime(22879): Caused by: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter recorder
E/AndroidRuntime(22879): 	at com.tfliteflutter.tflite_flutter_helper.TfliteFlutterHelperPlugin$createRecordListener$1.onMarkerReached(Unknown Source:2)
E/AndroidRuntime(22879): 	at com.tfliteflutter.tflite_flutter_helper.TfliteFlutterHelperPlugin.onDetachedFromEngine(TfliteFlutterHelperPlugin.kt:94)
E/AndroidRuntime(22879): 	at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove(FlutterEngineConnectionRegistry.java:262)
E/AndroidRuntime(22879): 	at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove(FlutterEngineConnectionRegistry.java:270)
E/AndroidRuntime(22879): 	at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.removeAll(FlutterEngineConnectionRegistry.java:278)
E/AndroidRuntime(22879): 	at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.destroy(FlutterEngineConnectionRegistry.java:122)
E/AndroidRuntime(22879): 	at io.flutter.embedding.engine.FlutterEngine.destroy(FlutterEngine.java:416)
E/AndroidRuntime(22879): 	at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach(FlutterActivityAndFragmentDelegate.java:648)
E/AndroidRuntime(22879): 	at io.flutter.embedding.android.FlutterActivity.release(FlutterActivity.java:622)
E/AndroidRuntime(22879): 	at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:643)
E/AndroidRuntime(22879): 	at android.app.Activity.performDestroy(Activity.java:8468)
E/AndroidRuntime(22879): 	at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1344)
E/AndroidRuntime(22879): 	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5660)
E/AndroidRuntime(22879): 	... 11 more

This results in Android constantly notifying the user that that "audio_classification keeps stopping".
To reproduce, just launch the app and close it normally with the back button a few times in a row.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant