Bug 3322 - Modal Windows crash on close with Mono 2.10.9
Summary: Modal Windows crash on close with Mono 2.10.9
Status: RESOLVED FIXED
Alias: None
Product: MonoMac
Classification: Desktop
Component: Bindings ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-02-09 12:37 UTC by AndyW
Modified: 2015-02-10 17:28 UTC (History)
3 users (show)

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


Attachments
Test Project (20.62 KB, application/x-zip-compressed)
2012-02-09 12:37 UTC, AndyW
Details


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 AndyW 2012-02-09 12:37:51 UTC
Created attachment 1333 [details]
Test Project

Modal windows (including NSSavePanel) crash when closed with a native error under Mono 2.10.9

I've retested under Mono 2.10.8.1 and all is fine.

Attached is a sample project that just uses a NSSavePanel.

(Not sure if this is the correct place as it could be a runtime issue)

Native stacktrace:

	0   TestModal                           0x00093a0c mono_handle_native_sigsegv + 284
	1   TestModal                           0x00005572 mono_sigsegv_signal_handler + 178
	2   libsystem_c.dylib                   0x90cc259b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295

Debug info from gdb:

/Users/andy/Documents/image1.png
Attaching to process 4623.
Reading symbols for shared libraries . done
Reading symbols for shared libraries warning: Trying to remove a section from the ordered section list that did not exist at 0x2d7000.
.......................................................................................................................................................................................................... done
0x900ce876 in __psynch_mutexwait ()
  14 "com.apple.appkit-heartbeat"    0x900cefda in __wait4 ()
  13                                 0x900cf02e in __workq_kernreturn ()
  12 "com.apple.CFSocket.private"    0x900ceb42 in select$DARWIN_EXTSN ()
  11                                 0x900cf02e in __workq_kernreturn ()
  10                                 0x900cf02e in __workq_kernreturn ()
   9                                 0x900cf02e in __workq_kernreturn ()
   8                                 0x900cf02e in __workq_kernreturn ()
   7                                 0x900cf02e in __workq_kernreturn ()
   6                                 0x900cf02e in __workq_kernreturn ()
   5 "com.apple.libdispatch-manager" 0x900cf90a in kevent ()
   4                                 0x900cea9a in recvfrom$UNIX2003 ()
   3                                 0x900ccc5e in semaphore_wait_trap ()
   2                                 0x900ccc22 in mach_msg_trap ()
*  1 "com.apple.main-thread"         0x900ce876 in __psynch_mutexwait ()

Thread 14 (process 4623):
#0  0x900cefda in __wait4 ()
#1  0x90c1f4ec in waitpid$UNIX2003 ()
#2  0x00093b02 in mono_handle_native_sigsegv (signal=11, ctx=0xb0727b94) at mini-exceptions.c:2192
#3  0x00005572 in mono_sigsegv_signal_handler (_dummy=11, info=0xb0727b54, context=0xb0727b94) at mini.c:5875
#4  <signal handler called>
#5  0x00204782 in GC_thread_register_foreign (base_addr=0xb0727c6c) at pthread_support.c:1432
#6  0x001ac37b in mono_thread_attach (domain=0x3d1e00) at threads.c:1048
#7  0x00008146 in mono_jit_thread_attach (domain=0x0) at mini.c:2597
#8  0x0498db90 in ?? ()
#9  0x92040a2b in -[NSApplication _keyWindowForHeartBeat] ()
#10 0x922176ac in -[NSUIHeartBeat _heartBeatThread:] ()
#11 0x996cee59 in -[NSThread main] ()
#12 0x996cee09 in __NSThread__main__ ()
#13 0x90c6aed9 in _pthread_start ()
#14 0x90c6e6de in thread_start ()

Thread 13 (process 4623):
#0  0x900cf02e in __workq_kernreturn ()
#1  0x90c6cccf in _pthread_wqthread ()
#2  0x90c6e6fe in start_wqthread ()

Thread 12 (process 4623):
#0  0x900ceb42 in select$DARWIN_EXTSN ()
#1  0x95e5aee5 in __CFSocketManager ()
#2  0x90c6aed9 in _pthread_start ()
#3  0x90c6e6de in thread_start ()

Thread 11 (process 4623):
#0  0x900cf02e in __workq_kernreturn ()
#1  0x90c6cccf in _pthread_wqthread ()
#2  0x90c6e6fe in start_wqthread ()

Thread 10 (process 4623):
#0  0x900cf02e in __workq_kernreturn ()
#1  0x90c6cccf in _pthread_wqthread ()
#2  0x90c6e6fe in start_wqthread ()

Thread 9 (process 4623):
#0  0x900cf02e in __workq_kernreturn ()
#1  0x90c6cccf in _pthread_wqthread ()
#2  0x90c6e6fe in start_wqthread ()

Thread 8 (process 4623):
#0  0x900cf02e in __workq_kernreturn ()
#1  0x90c6cccf in _pthread_wqthread ()
#2  0x90c6e6fe in start_wqthread ()

Thread 7 (process 4623):
#0  0x900cf02e in __workq_kernreturn ()
#1  0x90c6cccf in _pthread_wqthread ()
#2  0x90c6e6fe in start_wqthread ()

Thread 6 (process 4623):
#0  0x900cf02e in __workq_kernreturn ()
#1  0x90c6cccf in _pthread_wqthread ()
#2  0x90c6e6fe in start_wqthread ()

Thread 5 (process 4623):
#0  0x900cf90a in kevent ()
#1  0x90d2bc58 in _dispatch_mgr_invoke ()
#2  0x90d2a6a7 in _dispatch_mgr_thread ()

Thread 4 (process 4623):
#0  0x900cea9a in recvfrom$UNIX2003 ()
#1  0x90c1f4a2 in recv$UNIX2003 ()
#2  0x000b7487 in recv_length () at atomic.h:111
#3  0x000aa44a in debugger_thread (arg=0x0) at debugger-agent.c:7156
#4  0x001dcbea in thread_start_routine (args=0x2252b2c) at wthreads.c:287
#5  0x0020441d in GC_start_routine (arg=0x3cdf60) at pthread_support.c:1468
#6  0x90c6aed9 in _pthread_start ()
#7  0x90c6e6de in thread_start ()

Thread 3 (process 4623):
#0  0x900ccc5e in semaphore_wait_trap ()
#1  0x001e4f6a in mono_sem_wait (sem=Cannot access memory at address 0x0
) at mono-semaphore.c:115
#2  0x0010c72a in finalizer_thread (unused=0x0) at gc.c:1066
#3  0x001a9b06 in start_wrapper_internal [inlined] () at :784
#4  0x001a9b06 in start_wrapper (data=0x1b75ac0) at threads.c:832
#5  0x001dcbea in thread_start_routine (args=0x2252a34) at wthreads.c:287
#6  0x0020441d in GC_start_routine (arg=0x3cdf60) at pthread_support.c:1468
#7  0x90c6aed9 in _pthread_start ()
#8  0x90c6e6de in thread_start ()

Thread 2 (process 4623):
#0  0x900ccc22 in mach_msg_trap ()
#1  0x900cc1f6 in mach_msg ()
#2  0x000d7c2a in mach_exception_thread (arg=0x0) at mini-darwin.c:129
#3  0x0020441d in GC_start_routine (arg=0x3cdf60) at pthread_support.c:1468
#4  0x90c6aed9 in _pthread_start ()
#5  0x90c6e6de in thread_start ()

Thread 1 (process 4623):
#0  0x900ce876 in __psynch_mutexwait ()
#1  0x90c696af in pthread_mutex_lock ()
#2  0x99674fa4 in -[NSRecursiveLock lock] ()
#3  0x91fcaf31 in _NSAppKitLock ()
#4  0x920ed610 in -[NSView _clearRememberedEditingFirstResponder] ()
#5  0x920ecdbc in -[NSView _finalizeWithReferenceCounting] ()
#6  0x920eca59 in -[NSView dealloc] ()
#7  0x91df354e in _objc_rootRelease ()
#8  0x91df4c58 in (anonymous namespace)::AutoreleasePoolPage::pop ()
#9  0x95e050a5 in _CFAutoreleasePoolPop ()
#10 0x996737a2 in -[NSAutoreleasePool drain] ()
#11 0x91fcc5fd in -[NSApplication run] ()
#12 0x92260261 in NSApplicationMain ()
#13 0x060e4646 in ?? ()
#14 0x060e4444 in ?? ()
#15 0x0077fff8 in ?? ()
#16 0x00780156 in ?? ()
#17 0x0000d612 in mono_jit_runtime_invoke (method=0x122ca1c, obj=0x0, params=0xbffff638, exc=0x0) at mini.c:5791
#18 0x0016d28e in mono_runtime_invoke (method=0x122ca1c, obj=0x0, params=0xbffff638, exc=0x0) at object.c:2755
#19 0x00171354 in mono_runtime_exec_main (method=0x122ca1c, args=0x3d6d70, exc=0x0) at object.c:3930
#20 0x00176725 in mono_runtime_run_main (method=0x122ca1c, argc=0, argv=0x463bac, exc=0x0) at object.c:3560
#21 0x00069c15 in mono_jit_exec (domain=0x3d1e00, assembly=0x2861ce0, argc=1, argv=0x463bac) at driver.c:944
#22 0x0006c00d in mono_main (argc=4, argv=0x463ba0) at driver.c:1003
#23 0x00002869 in main (argc=1, argv=0xbffff808) at main.c:66

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================



MonoDevelop 2.8.6.4
Runtime:
	Mono 2.10.9 (tarball Fri Feb  3 18:03:38 EST 2012)
	GTK 2.24.9
	GTK# (2.12.0.0)
Apple Developer Tools:
	 Xcode 4.2.1 (834)
	 Build 4D502
Monotouch: 5.2.3
Mono for Android not installed
Build information:
	Release ID: 20806004
	Git revision: ca00645c0f884e6cab8e8794fc7d65b2f6f3e5c3
	Build date: 2012-01-27 21:13:18+0000
Operating System:
	Mac OS X 10.7.3
Comment 1 Martin Baulig 2012-08-21 05:04:17 UTC
I just tested this with the latest MonoMac.dll, using different mono runtimes: master and the framework packages 2.10.9, 2.11.2 and 2.11.3, and I it's working fine for me.
Comment 2 Timothy Risi 2015-02-10 17:28:08 UTC
Tested on the latest mono and xamarin.mac with the provided test case and not getting any crashes, so closing the bug.