SIGABRT after Exceptions in OkHttp

We are using the modernhttpclient in our xamarin forms app and discovered fatal app crashes after we installed Xamarin 4.2 (Mono 7.0). (Modernhttpclient wraps okHttp)

Steps to reproduce: Open the attached sample app. Turn off network. Issue many calls (and resulting Exceptions) by clicking on the button repeatedly.

Going back to Cycle 7 resolves this bug.


09-29 16:53:42.741: W/dalvikvm(14941): Invalid indirect reference 0xa2590e20 in decodeIndirectRef 09-29 16:53:42.741: I/dalvikvm(14941): "OkHttp https://*****/token" ; prio=5 tid=14 RUNNABLE 09-29 16:53:42.741: I/dalvikvm(14941): | group="main" sCount=0 dsCount=0 obj=0xb30f97f8 self=0xb8ff6130 09-29 16:53:42.741: I/dalvikvm(14941): | sysTid=15173 nice=0 sched=0/0 cgrp=apps handle=-1179120768 09-29 16:53:42.741: I/dalvikvm(14941): | state=R schedstat=( 49673122 22762814 2813 ) utm=4 stm=0 core=0 09-29 16:53:42.741: I/dalvikvm(14941): at md595f4b8ab717b9da13f11267a86077f20.AwaitableOkHttp_OkTaskCallback.monodroidAddReference(AwaitableOkHttp_OkTaskCallback.java:-1) 09-29 16:53:42.741: I/dalvikvm(14941): at md595f4b8ab717b9da13f11267a86077f20.AwaitableOkHttp_OkTaskCallback.n_onResponse(Native Method) 09-29 16:53:42.741: I/dalvikvm(14941): at md595f4b8ab717b9da13f11267a86077f20.AwaitableOkHttp_OkTaskCallback.onResponse(AwaitableOkHttp_OkTaskCallback.java:39) 09-29 16:53:42.741: I/dalvikvm(14941): at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:168) 09-29 16:53:42.741: I/dalvikvm(14941): at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) 09-29 16:53:42.741: I/dalvikvm(14941): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 09-29 16:53:42.741: I/dalvikvm(14941): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 09-29 16:53:42.741: I/dalvikvm(14941): at java.lang.Thread.run(Thread.java:841) 09-29 16:53:42.741: E/dalvikvm(14941): VM aborting 09-29 16:53:42.741: A/libc(14941): Fatal signal 6 (SIGABRT) at 0x00003a5d (code=-6), thread 15173 (OkHttp Dispatch)


Reference: https://bugzilla.xamarin.com/show_bug.cgi?id=45003