Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Assertion at ../../../../../mono/mono/utils/mono-threads.c:159, condition `result' not met
mono-rt: Native stacktrace:
mono-rt: 0 iLRistorante 0x00181d1d mono_handle_native_sigsegv + 349
mono-rt: 1 iLRistorante 0x0018ccea sigabrt_signal_handler + 122
mono-rt: 2 libsystem_platform.dylib 0x05b98deb _sigtramp + 43
mono-rt: 3 ??? 0xffffffff 0x0 + 4294967295
mono-rt: 4 libsystem_sim_c.dylib 0x05982e12 abort + 127
mono-rt: 5 iLRistorante 0x002ce045 monoeg_g_logv + 181
mono-rt: 6 iLRistorante 0x002ce0ab monoeg_assertion_message + 43
mono-rt: 7 iLRistorante 0x002c3850 mono_thread_info_dettach + 0
mono-rt: 8 iLRistorante 0x001ce091 mono_gc_register_thread + 17
mono-rt: 9 iLRistorante 0x00283acb mono_thread_attach_full + 91
mono-rt: 10 iLRistorante 0x00283a69 mono_thread_attach + 25
mono-rt: 11 iLRistorante 0x001a8956 mono_jit_thread_attach + 54
mono-rt: 12 iLRistorante 0x002fec43 monotouch_switch_gchandle + 67
mono-rt: 13 iLRistorante 0x002feb2e monotouch_release_trampoline + 158
mono-rt: 14 Foundation 0x01be0409 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 102
mono-rt: 15 Foundation 0x01a68a6e -[NSURLConnectionInternalConnection invokeForDelegate:] + 119
mono-rt: 16 Foundation 0x01a689d6 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 208
mono-rt: 17 Foundation 0x01be054d -[NSURLConnectionInternal _withConnectionAndDelegate:] + 76
mono-rt: 18 Foundation 0x01a68d2a -[NSURLConnectionInternal _withConnectionDisconnectFromConnection] + 84
mono-rt: 19 Foundation 0x01a68ccc _NSURLConnectionReleaseClient + 33
mono-rt: 20 CFNetwork 0x00535ce1 _ZN27URLConnectionClient_Classic11setDelegateEPK24CFURLConnectionClient_V1 + 163
mono-rt: 21 CFNetwork 0x005cf64b ___ZN27URLConnectionClient_Classic15invalidateAsyncEP16dispatch_queue_sU13block_pointerFvvE_block_invoke_2 + 37
mono-rt: 22 CFNetwork 0x005cf5fd ___ZN27URLConnectionClient_Classic15invalidateAsyncEP16dispatch_queue_sU13block_pointerFvvE_block_invoke + 210
mono-rt: 23 CFNetwork 0x005cce20 ___ZNK25URLConnectionInstanceData19_withWorkQueueAsyncEPKcU13block_pointerFvvE_block_invoke + 17
mono-rt: 24 CFNetwork 0x0061a170 ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke79 + 31
mono-rt: 25 libdispatch.dylib 0x058c37f8 _dispatch_call_block_and_release + 15
mono-rt: 26 libdispatch.dylib 0x058d84b0 _dispatch_client_callout + 14
mono-rt: 27 libdispatch.dylib 0x058c607f _dispatch_queue_drain + 452
mono-rt: 28 libdispatch.dylib 0x058c5e7a _dispatch_queue_invoke + 128
mono-rt: 29 libdispatch.dylib 0x058c6e1f _dispatch_root_queue_drain + 83
mono-rt: 30 libdispatch.dylib 0x058c7137 _dispatch_worker_thread2 + 39
mono-rt: 31 libsystem_pthread.dylib 0x05c8edab _pthread_wqthread + 336
mono-rt: 32 libsystem_pthread.dylib 0x05c92cce start_wqthread + 30
Got a SIGABRT while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries
used by your application.
mono-rt: 5 iLRistorante 0x002ce045 monoeg_g_logv + 181
^ the above means the mono runtime logged some information on the device's console before it crashed.
Can you retrieve this information ?
And also attach the symbolicated crash report ?
Or even better can you provide us a test case from which we could reproduce the issue ourselves ?
In any case please provide the version information about what you used: both the software* and the device(s) type and iOS version.
* The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).
*** Bug 16797 has been marked as a duplicate of this bug. ***
Problem occurs mostly on simulator, and less on device....this is a random bug on a project that I cannot send to you.
I'll try to get a crash log on a true device.
That sounds like you're not keeping a reference to an instance (and similar to your UIAlertView report).
When an managed instance variable is without any reference then the GC then is free to collect it.
However it's possible that the native peer (of your managed instance) is still alive and it can callback into your code. If the managed instance does not exists then it will lead to a crash.
IOW it's important to understand the lifecycle of the objects you create - and keep the managed instance alive as long as they exists natively.
Do you mean that you didn't retain internally reference to NSURLConnectionDelegate object unless one of my C# object maintain reference ?
No. The NSUrlConnection instance will keep a reference to it's assigned NSUrlConnectionDelegate.
OTOH a _local_ variable of NSUrlConnection might be GC'ed even if it's still alive/retained on the native side - and if it's disposed then it's delegate will be too.
Now I suspect a GC-related issue because of:
> Problem occurs mostly on simulator, and less on device....
because we run the GC much more often on the simulator to catch those specific cases.
Sadly without a small test case (no need for the complete project), to reproduce the issue it's hard to be more specific about this.
I cannot give you a small case that reproduce the bug...and this a confidential project, so I cannot give you a test case...I'll try modify project to keep references retained and I'll keep you informed.
Created attachment 5686 [details]
This is the crash log.
You're hitting an assert inside the Mono runtime, indicating that something has gone very bad.
Unfortunately whatever went bad occurred (possibly a long time) before the crash itself, so unfortunately the crash report doesn't explain exactly the conditions required for this to occur in the first place.
What this means is that we need some way of reproducing this crash ourselves (either a test project, or access to your real project), otherwise it will be impossible to find out what's happening.
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!