Open jasonross opened 3 years ago
@kkoser
If possible could you share your project, or if you can't, some details about what your test is doing and how it is running (are you running multiple tests together, etc) - I don't think this is related to finishMocking since that is mainly for verifications at the end of a test, and if you try to start a new mock session without it, you'll get a UnfinishedMockingSessionException so it seems unlikely we're not finishing sessions. I'm wondering if this is related to running tests serially, especially since it deals with static methods
libc.so abort
| libstaticjvmtiagent.so _checkFailed | libstaticjvmtiagent.so | libopenjdkjvmti.so | libopenjdkjvmti.so RetransformClasses | libopenjdkjvmti.so RetransformClasses | libstaticjvmtiagent.so Java_com_android_dx_mockito_inline_StaticMockMethodAdvice_nativeGetCalledClassName | libart.so art_quick_generic_jni_trampoline | libart.so art_quick_invoke_static_stub | libart.so Invoke | libart.so ArtInterpreterToCompiledCodeBridge | libart.so | libart.so MterpInvokeStatic | libart.so mterp_op_invoke_static | libart.so MterpInvokeDirect | libart.so mterp_op_invoke_direct | libart.so Execute | libart.so artQuickToInterpreterBridge | libart.so art_quick_to_interpreter_bridge | libart.so art_quick_invoke_stub | libart.so Invoke | libart.so InvokeWithArgArray | libart.so InvokeMethod | libart.so Method_invoke | libart.so art_quick_invoke_stub | libart.so Invoke | libart.so ArtInterpreterToCompiledCodeBridge | libart.so | libart.so MterpInvokeVirtual | libart.so mterp_op_invoke_virtual | libart.so MterpInvokeVirtual | libart.so mterp_op_invoke_virtual | libart.so MterpInvokeStatic | libart.so mterp_op_invoke_static | libart.so MterpInvokeStatic | libart.so mterp_op_invoke_static | libart.so MterpInvokeStatic | libart.so mterp_op_invoke_static | libart.so Execute | libart.so artQuickToInterpreterBridge | libart.so art_quick_to_interpreter_bridge | libart.so art_quick_invoke_static_stub | libart.so Invoke | libart.so InitializeClass | libart.so EnsureInitialized | libart.so ArtInterpreterToInterpreterBridge | libart.so | libart.so MterpInvokeStatic | libart.so mterp_op_invoke_static | libart.so Execute | libart.so ArtInterpreterToInterpreterBridge | libart.so | libart.so MterpInvokeStatic | libart.so mterp_op_invoke_static | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeVirtual | libart.so mterp_op_invoke_virtual | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeVirtual | libart.so mterp_op_invoke_virtual | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so MterpInvokeInterface | libart.so mterp_op_invoke_interface | libart.so Execute | libart.so artQuickToInterpreterBridge | libart.so art_quick_to_interpreter_bridge | libart.so art_quick_invoke_stub | libart.so Invoke | libart.so InvokeWithArgArray | libart.so InvokeVirtualOrInterfaceWithJValues | libart.so CreateCallback | libc.so __pthread_start | libc.so __start_thread | com.android.dx.mockito.inline.StaticMockMethodAdvice.nativeGetCalledClassName(:0) | com.android.dx.mockito.inline.StaticMockMethodAdvice.getClassMethodWasCalledOn(StaticMockMethodAdvice.java:186) | com.android.dx.mockito.inline.StaticMockMethodAdvice.getOrigin(StaticMockMethodAdvice.java:202) | java.lang.reflect.Method.invoke(:0) | com.android.dx.mockito.inline.MockMethodDispatcher.getOrigin(MockMethodDispatcher.java:127)
any idea about this crash?
It is called from some app background task,not android test code. I assume that after calling finishMocking(), we go to this stack when invoke previously mocked static method.