Debugging - crashes prior to hitting breakpoints - due to ANR?

Setup:
VS 2015 (Xamarin.Android 7.3.1.2)
ADB Debugging over local network (using adb connect 192.168.x.x)
Target device: Android 4.3

Have been experiencing regular crashes prior to hitting breakpoints for a while now. It is unpredictable what kind of breakpoints will cause the crash, it doesn't always happen - but once it starts to happen it seems nothing short of deleting all breakpoints and re-setting them resolves the issue.

When the crash occurs the following is found in VS 2015 Output:
07-04 10:43:40.156 I/dalvikvm(24091): threadid=3: reacting to signal 3
07-04 10:43:40.216 I/dalvikvm(24091): Wrote stack traces to '/data/anr/traces.txt'

The behavior appears to be caused by some kind of ANR timeout - the application will freeze for a couple of seconds just prior to when breakpoint should be hit, followed by the crash.

When reviewing anr trace (attached) I only found mention of my application's code in main thread. You can see where the Mono DebugRuntime was executing - I'm guessing to begin gathering diagnostic data from the breakpoint (which would be hit in the OnStart method if the fragment).

"main" prio=5 tid=1 NATIVE | group="main" sCount=1 dsCount=0 obj=0x41f41578 self=0x41f2c150 | sysTid=24091 nice=0 sched=0/0 cgrp=apps handle=1074356220 | state=S schedstat=( 9782705984 1724131995 11906 ) utm=833 stm=145 core=1 #00 pc 0001c610 /system/lib/libc.so (__futex_syscall3+8) #01 pc 0000e6c8 /system/lib/libc.so (__pthread_cond_timedwait_relative+48) #02 pc 0000e728 /system/lib/libc.so (__pthread_cond_timedwait+64) #03 pc 00107654 /data/app-lib/Mono.Android.DebugRuntime-1/libmonosgen-32bit-2.0.so at md52179d95945ca09f4ea2781be8d1cab4b.SetupUhfReaderTuningFragment.n_onStart(Native Method) at md52179d95945ca09f4ea2781be8d1cab4b.SetupUhfReaderTuningFragment.onStart(SetupUhfReaderTuningFragment.java:59) at android.support.v4.app.Fragment.performStart(Fragment.java:1986) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1102) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613) at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:570) at mono.java.lang.RunnableImplementor.n_run(Native Method) at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30) at android.app.Activity.runOnUiThread(Activity.java:4673) at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method) at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:30) at android.view.View.performClick(View.java:4240) at android.view.View$PerformClick.run(View.java:17721) at android.os.Handler.handleCallback(Handler.java:730) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5103) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method)
...
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE | group="system" sCount=0 dsCount=0 obj=0x421bd468 self=0x5a59a3f0 | sysTid=24096 nice=0 sched=0/0 cgrp=apps handle=1515823528 | state=R schedstat=( 25037332 8218666 51 ) utm=0 stm=2 core=3 at dalvik.system.NativeStart.run(Native Method)

Is this known issue? I couldn't see mention of this anywhere. Raise in bugzilla?

Thanks.

Answers

Sign In or Register to comment.