Bug 13714 - SIGABRT when invoking an operation in the background
Summary: SIGABRT when invoking an operation in the background
Status: RESOLVED DUPLICATE of bug 13612
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.9.3.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-08-02 10:46 UTC by m
Modified: 2013-08-02 21:29 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED DUPLICATE of bug 13612

Description m 2013-08-02 10:46:32 UTC
Maybe the summary is not descriptive enough, here are the details:

- I have a simple BooleanElement (MonoTouch Dialog framework)
- it's ValueChanged event calls a delegate:

booleanElement.ValueChanged+= (object sender, EventArgs 
				InvokeInBackground( () => Console.WriteLine ("Hello"));
			};

In the iOS simulator, changing the slider (boolean value) three times will result in a SIGABRT.

Details:

=== Xamarin Studio ===

Version 4.0.10 (build 7)
Installation UUID: 76d28aff-1cda-4940-90df-b3b28c3cb454
Runtime:
	Mono 3.2.0 ((no/7c7fcc7)
	GTK 2.24.20
	GTK# (2.12.0.0)
	Package version: 302000000

=== Apple Developer Tools ===

Xcode 4.6.3 (2068)
Build 4H1503

=== Xamarin.iOS ===

Version: 6.4.0.2 (Trial Edition)
Hash: c9f7659
Branch: 
Build date: 2013-18-07 21:36:03-0400

=== Xamarin.Android ===

Version: 4.8.0 (Starter Edition)
Android SDK: /Users/[hidden]/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Build Information ===

Release ID: 400100007
Git revision: f324e2154ee86ae1b6b8483392eddbf418e6381b
Build date: 2013-07-20 06:23:58+0000
Xamarin addins: fe4f180e2386eafc00087ef68c3a580cff4a2592

=== Operating System ===

Mac OS X 10.8.4
Darwin para.lan 12.4.0 Darwin Kernel Version 12.4.0
    Wed May  1 17:57:12 PDT 2013
    root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64





Starting iOS simulator 6.0
Launching application
Application launched. PID = 2532
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.dll [External]
Thread started:  #2
Loaded assembly: /Users/[hidden]/bin/iPhoneSimulator/Debug/xclientiphone.exe
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/MonoTouch.Dialog-1.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.Linq.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Json.dll [External]
Thread started:  #3
2013-08-02 16:40:15.807 [hidden][2532:617] Hello
Thread started:  #4
* Assertion at ../../../../../mono/mono/utils/mono-threads.c:155, condition `result' not met

mono-rt: 
Native stacktrace:


mono-rt: 	0   xclientiphone                       0x000b0b6a mono_handle_native_sigsegv + 266

mono-rt: 	1   xclientiphone                       0x000bd3cd sigabrt_signal_handler + 109

mono-rt: 	2   libsystem_c.dylib                   0x90c9b8cb _sigtramp + 43

mono-rt: 	3   ???                                 0xffffffff 0x0 + 4294967295

mono-rt: 	4   libsystem_sim_c.dylib               0x0422f57b abort + 140

mono-rt: 	5   [hidden]                       0x00206d8c monoeg_g_logv + 188

mono-rt: 	6   [hidden]                       0x00206dbb monoeg_assertion_message + 43

mono-rt: 	7   [hidden]                       0x001fc961 mono_thread_info_attach + 417

mono-rt: 	8   [hidden]                       0x001051e1 mono_gc_register_thread + 17

mono-rt: 	9   [hidden]                       0x001c133b mono_thread_attach_full + 91

mono-rt: 	10  [hidden]                       0x001c1679 mono_thread_attach + 25

mono-rt: 	11  [hidden]                       0x000dea86 mono_jit_thread_attach + 54

mono-rt: 	12  ???                                 0x0b4ef628 0x0 + 189724200

mono-rt: 	13  [hidden]                       0x0022bf59 monotouch_trampoline + 521

mono-rt: 	14  Foundation                          0x019f70d5 -[NSThread main] + 76

mono-rt: 	15  Foundation                          0x019f7034 __NSThread__main__ + 1304

mono-rt: 	16  libsystem_c.dylib                   0x90caf5b7 _pthread_start + 344

mono-rt: 	17  libsystem_c.dylib                   0x90c99d4e thread_start + 34

mono-rt: 
=================================================================
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.
=================================================================
Comment 1 m 2013-08-02 10:57:50 UTC
It seems to be the same symtom as described here:

http://lists.ximian.com/pipermail/mono-osx/2011-August/004490.html

For some reason, InvokeInBackground seems to result in the same thread registered twice...
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-08-02 21:29:13 UTC
InvokeInBackground is currently broken.

Please use ThreadPool.QueueUserWorkItem as an alternative (or create a new thread yourself if you really want a new thread).

*** This bug has been marked as a duplicate of bug 13612 ***