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

dexmaker crash #176

Open
jasonross opened this issue Mar 8, 2021 · 2 comments
Open

dexmaker crash #176

jasonross opened this issue Mar 8, 2021 · 2 comments

Comments

@jasonross
Copy link

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.

@jasonross
Copy link
Author

@kkoser

@kkoser
Copy link
Contributor

kkoser commented May 3, 2021

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

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

3 participants
@jasonross @kkoser and others