Bug 40283 - Crash from queuing a draw from another thread
Summary: Crash from queuing a draw from another thread
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 6.1.2 (C8SR1)
Hardware: Macintosh Mac OS
: High normal
Target Milestone: master
Assignee: Marius Ungureanu
URL:
: 20399 43813 51312 51943 ()
Depends on:
Blocks:
 
Reported: 2016-04-11 18:50 UTC by Cody Russell
Modified: 2017-04-18 15:50 UTC (History)
8 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 FIXED

Description Cody Russell 2016-04-11 18:50:12 UTC
Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x93431b2a __fork + 10
1   libmonosgen-2.0.dylib         	0x00455e35 mono_handle_native_sigsegv + 469 (mini-exceptions.c:2175)
2   libmonosgen-2.0.dylib         	0x004a6561 sigabrt_signal_handler + 129 (mini-posix.c:210)
3   libsystem_platform.dylib      	0x9a17279b _sigtramp + 43
4   ???                           	0xffffffff 0 + 4294967295
5   libmonosgen-2.0.dylib         	0x004a64e0 0x397000 + 1111264
6   libsystem_c.dylib             	0x91a7cc34 abort + 156
7   libsystem_malloc.dylib        	0x9231ff31 szone_error + 457
8   libsystem_malloc.dylib        	0x9231ffc5 free_tiny_botch + 90
9   libsystem_malloc.dylib        	0x92318635 szone_free + 1409
10  libsystem_malloc.dylib        	0x92317ef6 szone_realloc + 2374
11  libsystem_malloc.dylib        	0x92317573 malloc_zone_realloc + 82
12  libsystem_malloc.dylib        	0x92317488 realloc + 216
13  libglib-2.0.0.dylib           	0x0333f0d4 standard_realloc + 36
14  libglib-2.0.0.dylib           	0x0333db43 g_realloc + 67
15  libglib-2.0.0.dylib           	0x0333e099 g_realloc_n + 169
16  libgdk-quartz-2.0.0.dylib     	0x03b0af61 miUnionO + 2001
17  libgdk-quartz-2.0.0.dylib     	0x03b0a077 miRegionOp + 967
18  libgdk-quartz-2.0.0.dylib     	0x03b0951d gdk_region_union + 493
19  libgdk-quartz-2.0.0.dylib     	0x03b2cb07 impl_window_add_update_area + 55
20  libgdk-quartz-2.0.0.dylib     	0x03b20adb gdk_window_invalidate_maybe_recurse_full + 1147
21  libgdk-quartz-2.0.0.dylib     	0x03b227cc gdk_window_invalidate_region_full + 108
22  libgdk-quartz-2.0.0.dylib     	0x03b205ea gdk_window_invalidate_rect_full + 490
23  libgdk-quartz-2.0.0.dylib     	0x03b1e5c2 gdk_window_invalidate_rect + 66
24  libgtk-quartz-2.0.0.dylib     	0x0383d88f gtk_widget_map + 543
25  libgtk-quartz-2.0.0.dylib     	0x03854615 gtk_widget_real_show + 197
26  libgobject-2.0.0.dylib        	0x04572525 g_cclosure_marshal_VOID__VOIDv + 181
27  libgobject-2.0.0.dylib        	0x0456f1f0 g_type_class_meta_marshalv + 176
28  libgobject-2.0.0.dylib        	0x0456e564 _g_closure_invoke_va + 596
29  libgobject-2.0.0.dylib        	0x0459461e g_signal_emit_valist + 1966
30  libgobject-2.0.0.dylib        	0x0459587b g_signal_emit + 59
31  libgtk-quartz-2.0.0.dylib     	0x0383caf6 gtk_widget_show + 310
32  ???                           	0x0f3e687c 0 + 255748220
...


Thread 27 Crashed:
0   libsystem_kernel.dylib        	0x93432572 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x9c8a5654 pthread_kill + 101
2   libsystem_c.dylib             	0x91a7cd00 __abort + 187
3   libsystem_c.dylib             	0x91a7cc45 abort + 173
4   libsystem_malloc.dylib        	0x92315292 free + 433
5   libglib-2.0.0.dylib           	0x0333f147 standard_free + 23
6   libglib-2.0.0.dylib           	0x0333dc13 g_free + 51
7   libgdk-quartz-2.0.0.dylib     	0x03b0a40c miRegionOp + 1884
8   libgdk-quartz-2.0.0.dylib     	0x03b0951d gdk_region_union + 493
9   libgdk-quartz-2.0.0.dylib     	0x03b2cb07 impl_window_add_update_area + 55
10  libgdk-quartz-2.0.0.dylib     	0x03b20adb gdk_window_invalidate_maybe_recurse_full + 1147
11  libgdk-quartz-2.0.0.dylib     	0x03b209a8 gdk_window_invalidate_maybe_recurse_full + 840
12  libgdk-quartz-2.0.0.dylib     	0x03b227cc gdk_window_invalidate_region_full + 108
13  libgdk-quartz-2.0.0.dylib     	0x03b205ea gdk_window_invalidate_rect_full + 490
14  libgdk-quartz-2.0.0.dylib     	0x03b1e5c2 gdk_window_invalidate_rect + 66
15  libgtk-quartz-2.0.0.dylib     	0x0383ed59 gtk_widget_queue_draw_area + 697
16  libgtk-quartz-2.0.0.dylib     	0x0383ee73 gtk_widget_queue_draw + 259
17  ???                           	0x0fd232cc 0 + 265433804


Something is calling QueueDraw() from another thread and blowing everything up. It's not easily reproducible though, so I'm not sure how to find out what's doing it.
Comment 2 Cody Russell 2017-01-10 16:22:57 UTC
*** Bug 51312 has been marked as a duplicate of this bug. ***
Comment 3 Cody Russell 2017-01-10 16:43:29 UTC
*** Bug 43813 has been marked as a duplicate of this bug. ***
Comment 4 iain 2017-01-11 17:18:14 UTC
Confirming this as there's some duplicates, and I think I've seen it myself
Comment 5 Marius Ungureanu 2017-02-01 01:49:51 UTC
This crash is caused by calling Gtk# methods on non-UI thread. Mono 4.8 will include the UI thread check to help diagnose the root case of this.
Comment 6 Marius Ungureanu 2017-02-14 07:13:18 UTC
*** Bug 51943 has been marked as a duplicate of this bug. ***
Comment 7 Marius Ungureanu 2017-02-14 08:51:10 UTC
*** Bug 20399 has been marked as a duplicate of this bug. ***
Comment 8 Marius Ungureanu 2017-04-18 15:50:17 UTC
Closing for now, as I've seen no information about calls from background thread into gtk.