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

Crashing Issues on Android #580

Closed
wangjiangb opened this issue Apr 4, 2020 · 4 comments
Closed

Crashing Issues on Android #580

wangjiangb opened this issue Apr 4, 2020 · 4 comments
Assignees
Labels
platform:android Issues with Android as Platform

Comments

@wangjiangb
Copy link

wangjiangb commented Apr 4, 2020

We have two Activity in an android, each holds an instance of FrameProcessor. We can processor.close() in the onDestry() function of the Activity. We have seen crashes happening a lot during activity transitions. And it seems that the crash happened inside processor.close(). Below is the stacktrace.

2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: backtrace:
2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: #00 pc 0000000000000800
2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: #1 pc 000000000061e2bc /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (tflite::Subgraph::~Subgraph()+172)
2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: #2 pc 000000000061e50c /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (tflite::Subgraph::~Subgraph()+16)
2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: #3 pc 0000000000623730 /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (tflite::Interpreter::~Interpreter()+112)
2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: #4 pc 000000000040eac0 /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (mediapipe::TfLiteInferenceCalculator::~TfLiteInferenceCalculator()+256)
2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: #5 pc 000000000040eaf0 /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (mediapipe::TfLiteInferenceCalculator::~TfLiteInferenceCalculator()+16)
2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: #6 pc 0000000000703084 /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (mediapipe::CalculatorNode::CleanupAfterRun(mediapipe::Status const&)+160)
2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: #7 pc 00000000006d6a30 /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (mediapipe::CalculatorGraph::CleanupAfterRun(mediapipe::Status*)+720)
2020-04-03 20:08:12.417 26183-26183/? A/DEBUG: #8 pc 00000000006d720c /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (mediapipe::CalculatorGraph::FinishRun()+368)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #9 pc 00000000006d2444 /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (mediapipe::CalculatorGraph::WaitUntilDone()+520)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #10 pc 00000000006a0e30 /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (mediapipe::android::Graph::WaitUntilDone(_JNIEnv*)+60)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #11 pc 00000000006a6e80 /data/data/com.dawnlight.apps/incrementallib/libmediapipe_jni.so (Java_com_google_mediapipe_framework_Graph_nativeWaitUntilGraphDone+56)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #12 pc 0000000000561fe0 /system/lib64/libart.so (art_quick_generic_jni_trampoline+144)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #13 pc 0000000000558f88 /system/lib64/libart.so (art_quick_invoke_stub+584)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #14 pc 00000000000cfcc8 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #15 pc 00000000002806c0 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #16 pc 000000000027a6c8 /system/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #17 pc 00000000005291cc /system/lib64/libart.so (MterpInvokeDirect+296)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #18 pc 000000000054b614 /system/lib64/libart.so (ExecuteMterpImpl+14484)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #19 pc 000000000032823a /data/local/tmp/incrementaldeployment/com.dawnlight.apps/dex/incremental_classes1.dex (com.google.mediapipe.framework.Graph.waitUntilGraphDone+34)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #20 pc 000000000025431c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2923458455+488)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #21 pc 0000000000259e10 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #22 pc 000000000027a6ac /system/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #23 pc 0000000000527e8c /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #24 pc 000000000054b514 /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #25 pc 00000000004575d2 /data/local/tmp/incrementaldeployment/com.dawnlight.apps/dex/incremental_classes1.dex (com.google.mediapipe.components.FrameProcessor.close+30)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #26 pc 000000000025431c /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2923458455+488)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #27 pc 0000000000259e10 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #28 pc 000000000027a6ac /system/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #29 pc 0000000000527e8c /system/lib64/libart.so (MterpInvokeVirtual+588)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #30 pc 000000000054b514 /system/lib64/libart.so (ExecuteMterpImpl+14228)
2020-04-03 20:08:12.418 26183-26183/? A/DEBUG: #31 pc 00000000004f2ae2 /data/local/tmp/incrementaldeployment/com.dawnlight.apps/dex/incremental_classes1.dex (com.dawnlight.apps.MainActivity.onDestroy+10)

@eknight7
Copy link

eknight7 commented Apr 6, 2020

Hi, can you describe a little bit more about how the activities are using the FrameProcessor? Thanks.

@eknight7 eknight7 self-assigned this Apr 6, 2020
@eknight7 eknight7 added the platform:android Issues with Android as Platform label Apr 6, 2020
@pianyun
Copy link

pianyun commented Jul 29, 2020

@wangjiangb , Did you figure out the issue? I also face this issue.

@eknight7 , I call processor.close() on Activity's onPause method, and it causes the crash.

@Override
protected void onPause() {
    super.onPause();
    doOnPause();
}

protected void doOnPause() {
    converter.close();
    processor.close();  // here causes the crash
    mOrientationListener.disable();
    previewDisplayView.setVisibility(View.INVISIBLE);
}

Thank you.

@wangjiangb
Copy link
Author

@pianyun We resolved the problem using a workaround. The error occurs when there are multiple instances of Mediabuffer processor in different Activities. We refactored the code so that there is only one Mediabuffer processor.

@eknight7
Copy link

eknight7 commented Jan 8, 2021

Hi, we are closing this issue due to lack of activity. Please feel free to re-open if the question is still relevant. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:android Issues with Android as Platform
Projects
None yet
Development

No branches or pull requests

3 participants