Bug 44173 - Mono crashes intermittently when calling MeasureString (and/or DrawString) on a Mac
Summary: Mono crashes intermittently when calling MeasureString (and/or DrawString) on...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: libgdiplus ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-11 20:27 UTC by Tzach Shabtay
Modified: 2017-11-22 13:28 UTC (History)
1 user (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 for Bug 44173 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Tzach Shabtay 2016-09-11 20:27:42 UTC
My project can be found here: https://github.com/tzachshabtay/MonoAGS

When calling Graphics.MeasureString on a Mac, Mono sometime crashes.
This used to happen a lot when I was sharing the Graphics object in multiple threads, though it only happened on a Mac, it didn't crash at all on Windows10 with dotnet (didn't test on other devices). 
I changed it to be ThreadLocal (see the commit with the changes here: https://github.com/tzachshabtay/MonoAGS/commit/04e0de212efd66ff43a98da6401012f8e168074e) which I thought at the beginning completely solved it. After that fix, it still crashes although not as frequently.

To reproduce: 
Run the game (the startup project should be DemoQuest.Desktop) -> go to the rightmost room -> click on the talk button and speak with the character that it's in the room -> go over all the dialogs until it crashes.
I estimate it can take about 30-40 runs for it to crash.
If you manually revert my commit mentioned above, it should take about 1-3 runs for it to crash.

The crash log (for some reason I never get any error messages when Mono crashes, only a stacktrace):

Last login: Sun Sep 11 16:05:58 on ttys007
Tzachs-MacBook-Pro:~ zachi$ clear; cd "/Users/zachi/Projects/MonoAGS/Source/Demo/DemoQuest.Desktop/bin/Debug"; "/Library/Frameworks/Mono.framework/Versions/4.4.2/bin/mono"  --debug --debugger-agent=transport=dt_socket,address=127.0.0.1:60040 "/Users/zachi/Projects/MonoAGS/Source/Demo/DemoQuest.Desktop/bin/Debug/DemoQuest.Desktop.exe" ; echo $? > /var/folders/vx/70s624nd5y9bdz6bdtmz70g80000gn/T/tmp5eb4dc92.tmp; echo; read -p 'Press any key to continue...' -n1; exit


Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipMeasureString (intptr,string,int,intptr,System.Drawing.RectangleF&,intptr,System.Drawing.RectangleF&,int*,int*) <0x00015>
  at System.Drawing.Graphics.GdipMeasureString (intptr,string,System.Drawing.Font,System.Drawing.RectangleF&,intptr) [0x00030] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System.Drawing/System.Drawing/Graphics.cs:1931
  at System.Drawing.Graphics.MeasureString (string,System.Drawing.Font,int,System.Drawing.StringFormat) [0x00031] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System.Drawing/System.Drawing/Graphics.cs:1966
  at (wrapper remoting-invoke-with-check) System.Drawing.Graphics.MeasureString (string,System.Drawing.Font,int,System.Drawing.StringFormat) <IL 0x00037, 0x001ab>
  at AGS.Engine.Desktop.Extensions.Measure (string,System.Drawing.Font,int) [0x00013] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine.Desktop/Extensions.cs:47
  at AGS.Engine.Desktop.DesktopFont.MeasureString (string,int) [0x00009] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine.Desktop/Drawing/DesktopFont.cs:26
  at AGS.Engine.Extensions.GetTextSize (AGS.API.ITextConfig,string,AGS.API.SizeF) [0x000b6] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Misc/Utils/Extensions.cs:115
  at AGS.Engine.AGSSayLocationProvider.getTextLocation (string,AGS.API.ISayConfig,single,single) [0x0000e] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Objects/Characters/Talking/AGSSayLocationProvider.cs:40
  at AGS.Engine.AGSSayLocationProvider.GetLocation (string,AGS.API.ISayConfig) [0x000c8] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Objects/Characters/Talking/AGSSayLocationProvider.cs:32
  at AGS.Engine.AGSSayBehavior.getLocation (string) [0x0000e] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Objects/Characters/Talking/AGSSayBehavior.cs:160
  at AGS.Engine.AGSSayBehavior/<SayAsync>c__async0.MoveNext () [0x00199] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Objects/Characters/Talking/AGSSayBehavior.cs:66
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner.InvokeMoveNext (object) [0x00000] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1089
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner.Run () [0x0003b] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1070
  at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction (System.Action,bool,System.Threading.Tasks.Task&) [0x00025] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/Tasks/TaskContinuation.cs:821
  at System.Threading.Tasks.Task.FinishContinuations () [0x0007a] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:3624
  at System.Threading.Tasks.Task.FinishStageThree () [0x00045] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2366
  at System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult>.TrySetResult (System.Threading.Tasks.VoidTaskResult) [0x00058] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/Tasks/Future.cs:488
  at System.Threading.Tasks.Task/DelayPromise.Complete () [0x00051] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:5940
  at System.Threading.Tasks.Task.<Delay>m__1 (object) [0x00000] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:5894
  at System.Threading.Timer/Scheduler.TimerCB (object) [0x00007] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Threading/Timer.cs:327
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00019] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/threadpool.cs:1280
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/threadpool.cs:857
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/threadpool.cs:1212
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <IL 0x0001f, 0x000c6>

Native stacktrace:


Debug info from gdb:

(lldb) command source -s 0 '/tmp/mono-gdb-commands.hhMiJg'
Executing commands in '/private/tmp/mono-gdb-commands.hhMiJg'.
(lldb) process attach --pid 827
Process 827 stopped
Executable module set to "/Library/Frameworks/Mono.framework/Versions/4.4.2/bin/mono".
Architecture set to: i386-apple-macosx.
(lldb) thread list
Process 827 stopped
* thread #1: tid = 0xa957, 0x9bf4754a libsystem_kernel.dylib`__psynch_mutexwait + 10, name = 'tid_50b', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0xa958, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #3: tid = 0xa95a, 0x9bf41a0a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'tid_1403'
  thread #4: tid = 0xa95b, 0x9bf488ce libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
  thread #5: tid = 0xa95c, 0x9bf4776e libsystem_kernel.dylib`__recvfrom + 10, name = 'tid_1307'
  thread #6: tid = 0xa9c2, 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.audio.IOThread.client'
  thread #7: tid = 0xa9e0, 0x9bf4754a libsystem_kernel.dylib`__psynch_mutexwait + 10, name = 'tid_ca1f'
  thread #8: tid = 0xa9e1, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_cb2b'
  thread #9: tid = 0xa9e2, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_ce0b'
  thread #10: tid = 0xa9e3, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_d10b'
  thread #11: tid = 0xa9f0, 0x9bf47e16 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_ee3f'
  thread #12: tid = 0xa9f1, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_ed1f'
  thread #13: tid = 0xa9f2, 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10
  thread #14: tid = 0xa9f3, 0x9bf478f6 libsystem_kernel.dylib`__semwait_signal + 10, name = 'tid_10f03'
  thread #15: tid = 0xa9fb, 0x9bf4754a libsystem_kernel.dylib`__psynch_mutexwait + 10, name = 'tid_11413'
  thread #16: tid = 0xa9ff, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_1170b'
  thread #17: tid = 0xaa06, 0x0dff5806, name = 'tid_11363'
  thread #18: tid = 0xaa08, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_11d53'
  thread #19: tid = 0xaa26, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_4d07'
(lldb) thread backtrace all
* thread #1: tid = 0xa957, 0x9bf4754a libsystem_kernel.dylib`__psynch_mutexwait + 10, name = 'tid_50b', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x9bf4754a libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x90aec130 libsystem_pthread.dylib`_pthread_mutex_lock + 520
    frame #2: 0x90aebf23 libsystem_pthread.dylib`pthread_mutex_lock + 16
    frame #3: 0x0024c366 mono`sgen_gc_lock [inlined] mono_os_mutex_lock(mutex=0x003622f4) + 8 at mono-os-mutex.h:70
    frame #4: 0x0024c35e mono`sgen_gc_lock [inlined] mono_coop_mutex_lock(mutex=0x003622f4) + 43 at mono-coop-mutex.h:55
    frame #5: 0x0024c333 mono`sgen_gc_lock + 3 at sgen-gc.c:3152
    frame #6: 0x0023ebaf mono`mono_gc_alloc_vector(vtable=<unavailable>, size=<unavailable>, max_length=<unavailable>) + 111 at sgen-mono.c:1733
    frame #7: 0x024504e3
    frame #8: 0x007dc8fc
    frame #9: 0x0e0e3dd4
    frame #10: 0x0e0e38d4
    frame #11: 0x0e0dff1b
    frame #12: 0x0dff83fc
    frame #13: 0x0dff23bc
    frame #14: 0x0b8dcd38
    frame #15: 0x0b8d9e2a
    frame #16: 0x0a7f8e1c
    frame #17: 0x0b8d951c
    frame #18: 0x0b8d9492
    frame #19: 0x0b8d8f74
    frame #20: 0x0a7f8464
    frame #21: 0x07b4a40c
    frame #22: 0x07b49ec4
    frame #23: 0x06aa1058
    frame #24: 0x05dbbb01
    frame #25: 0x007da35c
    frame #26: 0x007da563
    frame #27: 0x0002d487 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 951 at mini-runtime.c:2578
    frame #28: 0x00205b26 mono`mono_runtime_invoke(method=0x7b96fac0, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 150 at object.c:2897
    frame #29: 0x0020bae1 mono`mono_runtime_exec_main(method=0x7b96fac0, args=<unavailable>, exc=0x00000000) + 401 at object.c:4223
    frame #30: 0x0020b898 mono`mono_runtime_run_main(method=0x00800250, argc=<unavailable>, argv=<unavailable>, exc=<unavailable>) + 632 at object.c:3837
    frame #31: 0x000ab8e5 mono`mono_jit_exec(domain=<unavailable>, assembly=<unavailable>, argc=<unavailable>, argv=<unavailable>) + 213 at driver.g.c:1031
    frame #32: 0x000addac mono`mono_main [inlined] main_thread_handler + 8396 at driver.g.c:1091
    frame #33: 0x000add74 mono`mono_main(argc=<unavailable>, argv=<unavailable>) + 8340 at driver.g.c:2162
    frame #34: 0x0001e6c1 mono`main [inlined] mono_main_with_options(argc=4, argc=4, argc=4, argv=0xbffe4a6c, argv=0xbffe4a6c, argv=0xbffe4a6c) + 33 at main.c:28
    frame #35: 0x0001e6a0 mono`main(argc=4, argv=0xbffe4a6c) + 1184 at main.c:177
    frame #36: 0x0001e1f5 mono`start + 53

  thread #2: tid = 0xa958, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2528 libsystem_pthread.dylib`pthread_cond_wait$UNIX2003 + 71
    frame #3: 0x0026728b mono`thread_func [inlined] mono_os_cond_wait(mutex=0xb00810b0) + 18 at mono-os-mutex.h:105
    frame #4: 0x00267279 mono`thread_func(thread_data=0x00000000) + 457 at sgen-thread-pool.c:118
    frame #5: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #6: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #7: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #3: tid = 0xa95a, 0x9bf41a0a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'tid_1403'
    frame #0: 0x9bf41a0a libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x0020340e mono`finalizer_thread [inlined] mono_os_sem_wait(flags=<unavailable>) + 14 at mono-os-semaphore.h:72
    frame #2: 0x00203400 mono`finalizer_thread [inlined] mono_coop_sem_wait(flags=<unavailable>) + 10 at mono-coop-semaphore.h:40
    frame #3: 0x002033f6 mono`finalizer_thread(unused=0x00000000) + 118 at gc.c:711
    frame #4: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #5: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #6: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #7: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #8: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #9: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #4: tid = 0xa95b, 0x9bf488ce libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x9bf488ce libsystem_kernel.dylib`kevent64 + 10
    frame #1: 0x94b5c73f libdispatch.dylib`_dispatch_mgr_invoke + 245
    frame #2: 0x94b5c3a2 libdispatch.dylib`_dispatch_mgr_thread + 52

  thread #5: tid = 0xa95c, 0x9bf4776e libsystem_kernel.dylib`__recvfrom + 10, name = 'tid_1307'
    frame #0: 0x9bf4776e libsystem_kernel.dylib`__recvfrom + 10
    frame #1: 0x90b75d26 libsystem_c.dylib`recv$UNIX2003 + 55
    frame #2: 0x0011e298 mono`socket_transport_recv(buf=<unavailable>, len=<unavailable>) + 168 at debugger-agent.c:1129
    frame #3: 0x0010f043 mono`debugger_thread [inlined] transport_recv(len=<unavailable>) + 29 at debugger-agent.c:1514
    frame #4: 0x0010f026 mono`debugger_thread(arg=0x00000000) + 1494 at debugger-agent.c:9617
    frame #5: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #6: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #7: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #8: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #6: tid = 0xa9c2, 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.audio.IOThread.client'
    frame #0: 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x9bf40a70 libsystem_kernel.dylib`mach_msg + 68
    frame #2: 0x99ac4bb0 CoreAudio`HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned long, unsigned long, mach_msg_header_t*, bool, unsigned int) + 142
    frame #3: 0x99abd6fe CoreAudio`HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 72
    frame #4: 0x99abbc1e CoreAudio`HALC_ProxyIOContext::IOWorkLoop() + 1148
    frame #5: 0x99abb67a CoreAudio`HALC_ProxyIOContext::IOThreadEntry(void*) + 156
    frame #6: 0x99ac7d09 CoreAudio`___ZN19HALC_ProxyIOContextC2Emj_block_invoke + 20
    frame #7: 0x99abb591 CoreAudio`HALB_IOThread::Entry(void*) + 173
    frame #8: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #9: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #10: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #7: tid = 0xa9e0, 0x9bf4754a libsystem_kernel.dylib`__psynch_mutexwait + 10, name = 'tid_ca1f'
    frame #0: 0x9bf4754a libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x90aec130 libsystem_pthread.dylib`_pthread_mutex_lock + 520
    frame #2: 0x90aebf23 libsystem_pthread.dylib`pthread_mutex_lock + 16
    frame #3: 0x0024c366 mono`sgen_gc_lock [inlined] mono_os_mutex_lock(mutex=0x003622f4) + 8 at mono-os-mutex.h:70
    frame #4: 0x0024c35e mono`sgen_gc_lock [inlined] mono_coop_mutex_lock(mutex=0x003622f4) + 43 at mono-coop-mutex.h:55
    frame #5: 0x0024c333 mono`sgen_gc_lock + 3 at sgen-gc.c:3152
    frame #6: 0x0023fea4 mono`mono_gc_set_skip_thread(skip=0) + 20 at sgen-mono.c:2259
    frame #7: 0x001e04bf mono`monitor_thread + 783 at threadpool-ms.c:897
    frame #8: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #9: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #10: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #11: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #12: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #13: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #8: tid = 0xa9e1, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_cb2b'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x001df909 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=0x7f0382e0, mutex=0x7f0382fc, timeout_ms=<unavailable>) + 133 at mono-os-mutex.h:134
    frame #4: 0x001df884 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x001df884 mono`worker_thread [inlined] worker_park + 336 at threadpool-ms.c:525
    frame #6: 0x001df734 mono`worker_thread(data=0x00000000) + 820 at threadpool-ms.c:615
    frame #7: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #8: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #9: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #9: tid = 0xa9e2, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_ce0b'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x001df909 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=0x7f0382e0, mutex=0x7f0382fc, timeout_ms=<unavailable>) + 133 at mono-os-mutex.h:134
    frame #4: 0x001df884 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x001df884 mono`worker_thread [inlined] worker_park + 336 at threadpool-ms.c:525
    frame #6: 0x001df734 mono`worker_thread(data=0x00000000) + 820 at threadpool-ms.c:615
    frame #7: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #8: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #9: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #10: tid = 0xa9e3, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_d10b'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x0026d877 mono`mono_os_cond_timedwait(cond=<unavailable>, mutex=<unavailable>, timeout_ms=<unavailable>) + 135 at mono-os-mutex.h:134
    frame #4: 0x0026d62b mono`_wapi_handle_timedwait_signal_handle(handle=0x0000040e, timeout=<unavailable>, alertable=<unavailable>, poll=<unavailable>, alerted=0x497340ca) + 507 at handles.c:1554
    frame #5: 0x0028089b mono`wapi_WaitForSingleObjectEx(handle=<unavailable>, timeout=<unavailable>, alertable=<unavailable>) + 731 at wait.c:189
    frame #6: 0x001d744c mono`mono_wait_uninterrupted(alertable=<unavailable>, thread=<unavailable>, multiple=<unavailable>, numhandles=<unavailable>, handles=<unavailable>, waitall=<unavailable>, ms=<unavailable>) + 108 at threads.c:1518
    frame #7: 0x001d7683 mono`ves_icall_System_Threading_WaitHandle_WaitOne_internal(this_obj=0x1172ddd0, handle=0x0000040e, ms=-1, exitContext=0) + 99 at threads.c:1652
    frame #8: 0x0a7f0e84
    frame #9: 0x0a7f0cdc
    frame #10: 0x0a7f06ea
    frame #11: 0x0a7ecde3
    frame #12: 0x0a7da0c0
    frame #13: 0x0a7d1042
    frame #14: 0x0a7d096c
    frame #15: 0x0a7d9ad0
    frame #16: 0x0a7d97d0
    frame #17: 0x0267eb45
    frame #18: 0x0002d487 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 951 at mini-runtime.c:2578
    frame #19: 0x00205b26 mono`mono_runtime_invoke(method=0x7d71e428, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 150 at object.c:2897
    frame #20: 0x0020b27c mono`mono_runtime_delegate_invoke(delegate=0x00a3b800, params=<unavailable>, exc=<unavailable>) + 92 at object.c:3657
    frame #21: 0x001dc9f5 mono`start_wrapper [inlined] start_wrapper_internal + 664 at threads.c:723
    frame #22: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #23: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #24: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #25: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #26: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #11: tid = 0xa9f0, 0x9bf47e16 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_ee3f'
    frame #0: 0x9bf47e16 libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x90b75b19 libsystem_c.dylib`waitpid$UNIX2003 + 48
    frame #2: 0x000e749d mono`mono_handle_native_sigsegv(signal=11, ctx=0x0b8e7fe0, info=0x0b8e7fa0) + 541 at mini-exceptions.c:2348
    frame #3: 0x00137512 mono`mono_arch_handle_altstack_exception(sigctx=<unavailable>, siginfo=<unavailable>, fault_addr=<unavailable>, stack_ovf=0) + 162 at exceptions-x86.c:1107
    frame #4: 0x00029c53 mono`mono_sigsegv_signal_handler(_dummy=<unavailable>, _info=<unavailable>, context=<unavailable>) + 467 at mini-runtime.c:2888
    frame #5: 0x946a303b libsystem_platform.dylib`_sigtramp + 43
    frame #6: 0x066391d3 libfreetype.6.dylib`Ins_MDRP + 915
    frame #7: 0x06633318 libfreetype.6.dylib`TT_RunIns + 5544
    frame #8: 0x066417ba libfreetype.6.dylib`TT_Run_Context + 378
    frame #9: 0x06641405 libfreetype.6.dylib`TT_Hint_Glyph + 885
    frame #10: 0x066407de libfreetype.6.dylib`TT_Process_Simple_Glyph + 990
    frame #11: 0x0663edcb libfreetype.6.dylib`load_truetype_glyph + 1643
    frame #12: 0x0663dfee libfreetype.6.dylib`TT_Load_Glyph + 638
    frame #13: 0x0663180b libfreetype.6.dylib`tt_glyph_load + 363
    frame #14: 0x06617cf6 libfreetype.6.dylib`FT_Load_Glyph + 902
    frame #15: 0x06092589 libcairo.2.dylib`_cairo_ft_scaled_glyph_init(abstract_font=0x7f733bd0, scaled_glyph=0x7c40b2c4, info=CAIRO_SCALED_GLYPH_INFO_METRICS) + 297 at cairo-ft-font.c:2159
    frame #16: 0x060270bc libcairo.2.dylib`_cairo_scaled_glyph_lookup(scaled_font=0x7f733bd0, index=78, info=CAIRO_SCALED_GLYPH_INFO_METRICS, scaled_glyph_ret=0xb09cb970) + 380 at cairo-scaled-font.c:2978
    frame #17: 0x06026c17 libcairo.2.dylib`cairo_scaled_font_glyph_extents(scaled_font=0x7f733bd0, glyphs=0x7f5cd240, num_glyphs=1, extents=0xb09cbac8) + 343 at cairo-scaled-font.c:1602
    frame #18: 0x05fccd38 libcairo.2.dylib`_cairo_gstate_glyph_extents(gstate=0x7d120220, glyphs=0x7f5cd240, num_glyphs=1, extents=0xb09cbac8) + 104 at cairo-gstate.c:1904
    frame #19: 0x05fc4138 libcairo.2.dylib`_cairo_default_context_glyph_extents(abstract_cr=0x7d120200, glyphs=0x7f5cd240, num_glyphs=1, extents=0xb09cbac8) + 72 at cairo-default-context.c:1318
    frame #20: 0x05fb6bb2 libcairo.2.dylib`cairo_text_extents(cr=0x7d120200, utf8=0xb09cbabf, extents=0xb09cbac8) + 370 at cairo.c:3097
    frame #21: 0x05e3f8f9 libgdiplus.dylib`CalculateStringWidths(ct=0x7d120200, gdiFont=0x7f49d000, stringUnicode=0x7f4dcb20, StringDetailElements=95, StringDetails=0x7b51f400) + 121 at text-cairo.c:56
    frame #22: 0x05e3c084 libgdiplus.dylib`MeasureString(graphics=0x7f4dc9e0, stringUnicode=0x015ccb2c, length=0xb09cbdf0, font=0x7f49d000, rc_org=0xb09cc08c, format=0x7f4dcaf0, brush=0x00000000, boundingBox=0xb09cc00c, codepointsFitted=0x00000000, linesFilled=0x00000000, CleanString=0x7f4dcb20, StringDetails=0x7b51f400, data=0x00000000) + 2164 at text-cairo.c:336
    frame #23: 0x05e3ef20 libgdiplus.dylib`cairo_MeasureString(graphics=0x7f4dc9e0, stringUnicode=0x015ccb2c, length=95, font=0x7f49d000, rc=0xb09cc08c, format=0x7f4dcaf0, boundingBox=0xb09cc00c, codepointsFitted=0x00000000, linesFilled=0x00000000) + 432 at text-cairo.c:1075
    frame #24: 0x05e3b320 libgdiplus.dylib`GdipMeasureString(graphics=0x7f4dc9e0, string=0x015ccb2c, length=95, font=0x7f49d000, layoutRect=0xb09cc08c, stringFormat=0x7f4dcaf0, boundingBox=0xb09cc00c, codepointsFitted=0x00000000, linesFilled=0x00000000) + 512 at text.c:113
    frame #25: 0x0e0d54f4
    frame #26: 0x0dffdaa8
    frame #27: 0x0dffd710
    frame #28: 0x0dffd58c
    frame #29: 0x0dffad30
    frame #30: 0x0dffab30
    frame #31: 0x1067186c
    frame #32: 0x10670624
    frame #33: 0x1066f8a4
    frame #34: 0x1066ea27
    frame #35: 0x1066b0ec
    frame #36: 0x0a7fa134
    frame #37: 0x0a7d1042
    frame #38: 0x0a7d096c
    frame #39: 0x0a7f9f48
    frame #40: 0x0b9bf5c1
    frame #41: 0x0a7edcc8
    frame #42: 0x0a7dab98
    frame #43: 0x0a7f753c
    frame #44: 0x0a7f72e4
    frame #45: 0x0a7f70d4
    frame #46: 0x0a7f6f7e
    frame #47: 0x0a7f6dbe
    frame #48: 0x0a7ba500
    frame #49: 0x0a7b9f40
    frame #50: 0x0245d2f7
    frame #51: 0x0002d487 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 951 at mini-runtime.c:2578
    frame #52: 0x00205b26 mono`mono_runtime_invoke(method=0x7b979b20, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 150 at object.c:2897
    frame #53: 0x001dfb58 mono`worker_thread(data=0x00000000) + 1880 at threadpool-ms.c:647
    frame #54: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #55: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #56: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #57: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #58: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #59: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #12: tid = 0xa9f1, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_ed1f'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x001df909 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=0x7f0382e0, mutex=0x7f0382fc, timeout_ms=<unavailable>) + 133 at mono-os-mutex.h:134
    frame #4: 0x001df884 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x001df884 mono`worker_thread [inlined] worker_park + 336 at threadpool-ms.c:525
    frame #6: 0x001df734 mono`worker_thread(data=0x00000000) + 820 at threadpool-ms.c:615
    frame #7: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #8: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #9: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #13: tid = 0xa9f2, 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10
    frame #0: 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x9bf40a70 libsystem_kernel.dylib`mach_msg + 68
    frame #2: 0x97e4aef6 CoreFoundation`__CFRunLoopServiceMachPort + 214
    frame #3: 0x97e4a309 CoreFoundation`__CFRunLoopRun + 1529
    frame #4: 0x97e49aa6 CoreFoundation`CFRunLoopRunSpecific + 390
    frame #5: 0x97e4990b CoreFoundation`CFRunLoopRunInMode + 123
    frame #6: 0x96fd82d0 AppKit`_NSEventThread + 283
    frame #7: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #8: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #9: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #14: tid = 0xa9f3, 0x9bf478f6 libsystem_kernel.dylib`__semwait_signal + 10, name = 'tid_10f03'
    frame #0: 0x9bf478f6 libsystem_kernel.dylib`__semwait_signal + 10
    frame #1: 0x90b75c0a libsystem_c.dylib`nanosleep$UNIX2003 + 218
    frame #2: 0x002a7bd6 mono`monoeg_g_usleep(microseconds=<unavailable>) + 86 at gdate-unix.c:53
    frame #3: 0x0023bb6b mono`sgen_client_stop_world [inlined] restart_threads_until_none_in_managed_allocator + 445 at sgen-stw.c:160
    frame #4: 0x0023b9ae mono`sgen_client_stop_world(generation=<unavailable>) + 1038 at sgen-stw.c:234
    frame #5: 0x0024b372 mono`sgen_stop_world(generation=0) + 82 at sgen-gc.c:3202
    frame #6: 0x0024ad8f mono`sgen_perform_collection(requested_size=<unavailable>, generation_to_collect=0, reason=<unavailable>, wait_to_finish=<unavailable>) + 95 at sgen-gc.c:2222
    frame #7: 0x0024ad1b mono`sgen_ensure_free_space(size=<unavailable>) + 187 at sgen-gc.c:2198
    frame #8: 0x0024178f mono`sgen_alloc_obj_nolock(vtable=0x7d81b340, size=80) + 831 at sgen-alloc.c:291
    frame #9: 0x0023ed61 mono`mono_gc_alloc_string(vtable=<unavailable>, size=<unavailable>, len=<unavailable>) + 129 at sgen-mono.c:1824
    frame #10: 0x002078ca mono`mono_string_new_size(domain=<unavailable>, len=31) + 106 at object.c:5052
    frame #11: 0x001d49fb mono`ves_icall_System_String_InternalAllocateStr(length=31) + 27 at string-icalls.c:39
    frame #12: 0x007e3464
    frame #13: 0x01fb78ec
    frame #14: 0x01fb77e0
    frame #15: 0x007e7fd0
    frame #16: 0x06abe570
    frame #17: 0x0dff508c
    frame #18: 0x026a2e45
    frame #19: 0x026a23cc
    frame #20: 0x026a1958
    frame #21: 0x026a174c
    frame #22: 0x026a15e0
    frame #23: 0x103cd340
    frame #24: 0x103cce20
    frame #25: 0x0b9b8e31
    frame #26: 0x0b9b729c
    frame #27: 0x0b9b6db0
    frame #28: 0x0b8dbcb5
    frame #29: 0x0a7fa134
    frame #30: 0x0a7d1042
    frame #31: 0x0a7d096c
    frame #32: 0x0a7f9f48
    frame #33: 0x0b9bf5c1
    frame #34: 0x0a7edcc8
    frame #35: 0x0a7dab98
    frame #36: 0x0a7f753c
    frame #37: 0x0a7f72e4
    frame #38: 0x0a7f70d4
    frame #39: 0x0a7f6f7e
    frame #40: 0x0a7f6dbe
    frame #41: 0x0a7ba500
    frame #42: 0x0a7b9f40
    frame #43: 0x0245d2f7
    frame #44: 0x0002d487 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 951 at mini-runtime.c:2578
    frame #45: 0x00205b26 mono`mono_runtime_invoke(method=0x7b979b20, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 150 at object.c:2897
    frame #46: 0x001dfb58 mono`worker_thread(data=0x00000000) + 1880 at threadpool-ms.c:647
    frame #47: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #48: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #49: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #50: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #51: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #52: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #15: tid = 0xa9fb, 0x9bf4754a libsystem_kernel.dylib`__psynch_mutexwait + 10, name = 'tid_11413'
    frame #0: 0x9bf4754a libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x90aec130 libsystem_pthread.dylib`_pthread_mutex_lock + 520
    frame #2: 0x90aebf23 libsystem_pthread.dylib`pthread_mutex_lock + 16
    frame #3: 0x0024c366 mono`sgen_gc_lock [inlined] mono_os_mutex_lock(mutex=0x003622f4) + 8 at mono-os-mutex.h:70
    frame #4: 0x0024c35e mono`sgen_gc_lock [inlined] mono_coop_mutex_lock(mutex=0x003622f4) + 43 at mono-coop-mutex.h:55
    frame #5: 0x0024c333 mono`sgen_gc_lock + 3 at sgen-gc.c:3152
    frame #6: 0x0023fea4 mono`mono_gc_set_skip_thread(skip=0) + 20 at sgen-mono.c:2259
    frame #7: 0x001df97a mono`worker_thread [inlined] worker_park + 582 at threadpool-ms.c:537
    frame #8: 0x001df734 mono`worker_thread(data=0x00000000) + 820 at threadpool-ms.c:615
    frame #9: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #10: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #11: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #12: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #13: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #14: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #16: tid = 0xa9ff, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_1170b'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x001df909 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=0x7f0382e0, mutex=0x7f0382fc, timeout_ms=<unavailable>) + 133 at mono-os-mutex.h:134
    frame #4: 0x001df884 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x001df884 mono`worker_thread [inlined] worker_park + 336 at threadpool-ms.c:525
    frame #6: 0x001df734 mono`worker_thread(data=0x00000000) + 820 at threadpool-ms.c:615
    frame #7: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #8: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #9: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #17: tid = 0xaa06, 0x0dff5806, name = 'tid_11363'
    frame #0: 0x0dff5806
    frame #1: 0x0dff4bd4
    frame #2: 0x026a367b
    frame #3: 0x026a2b64
    frame #4: 0x026a23cc
    frame #5: 0x026a1958
    frame #6: 0x026a174c
    frame #7: 0x026a15e0
    frame #8: 0x103cd340
    frame #9: 0x103cce20
    frame #10: 0x0b9b8e31
    frame #11: 0x0b9b729c
    frame #12: 0x0b9b6db0
    frame #13: 0x0b8dbcb5
    frame #14: 0x0a7fa134
    frame #15: 0x0a7d1042
    frame #16: 0x0a7d096c
    frame #17: 0x0a7f9f48
    frame #18: 0x0b9bf5c1
    frame #19: 0x0a7edcc8
    frame #20: 0x0a7dab98
    frame #21: 0x0a7f753c
    frame #22: 0x0a7f72e4
    frame #23: 0x0a7f70d4
    frame #24: 0x0a7f6f7e
    frame #25: 0x0a7f6dbe
    frame #26: 0x0a7ba500
    frame #27: 0x0a7b9f40
    frame #28: 0x0245d2f7
    frame #29: 0x0002d487 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 951 at mini-runtime.c:2578
    frame #30: 0x00205b26 mono`mono_runtime_invoke(method=0x7b979b20, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 150 at object.c:2897
    frame #31: 0x001dfb58 mono`worker_thread(data=0x00000000) + 1880 at threadpool-ms.c:647
    frame #32: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #33: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #34: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #35: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #36: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #37: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #18: tid = 0xaa08, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_11d53'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x001df909 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=0x7f0382e0, mutex=0x7f0382fc, timeout_ms=<unavailable>) + 133 at mono-os-mutex.h:134
    frame #4: 0x001df884 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x001df884 mono`worker_thread [inlined] worker_park + 336 at threadpool-ms.c:525
    frame #6: 0x001df734 mono`worker_thread(data=0x00000000) + 820 at threadpool-ms.c:615
    frame #7: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #8: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #9: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #19: tid = 0xaa26, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_4d07'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x001df909 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=0x7f0382e0, mutex=0x7f0382fc, timeout_ms=<unavailable>) + 133 at mono-os-mutex.h:134
    frame #4: 0x001df884 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x001df884 mono`worker_thread [inlined] worker_park + 336 at threadpool-ms.c:525
    frame #6: 0x001df734 mono`worker_thread(data=0x00000000) + 820 at threadpool-ms.c:615
    frame #7: 0x001dc979 mono`start_wrapper [inlined] start_wrapper_internal + 540 at threads.c:717
    frame #8: 0x001dc75d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:764
    frame #9: 0x002969bd mono`inner_start_thread(arg=<unavailable>) + 349 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34
(lldb) detach
Process 827 detached
(lldb) quit
(lldb) XR1L
error: 'XR1L' is not a valid command.

=================================================================
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.
=================================================================

Abort trap: 6

Press any key to continue...
Comment 1 Tzach Shabtay 2016-10-07 01:36:02 UTC
It also crashes on DrawString, not just on MeasureString.

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipDrawString (intptr,string,int,intptr,System.Drawing.RectangleF&,intptr,intptr) <0x00012>
  at System.Drawing.Graphics.DrawString (string,System.Drawing.Font,System.Drawing.Brush,System.Drawing.RectangleF,System.Drawing.StringFormat) [0x00034] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System.Drawing/System.Drawing/Graphics.cs:1184
  at System.Drawing.Graphics.DrawString (string,System.Drawing.Font,System.Drawing.Brush,single,single,System.Drawing.StringFormat) [0x00000] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System.Drawing/System.Drawing/Graphics.cs:1172
  at (wrapper remoting-invoke-with-check) System.Drawing.Graphics.DrawString (string,System.Drawing.Font,System.Drawing.Brush,single,single,System.Drawing.StringFormat) <IL 0x0003b, 0x001d3>
  at AGS.Engine.Desktop.DesktopBitmapTextDraw.drawString (System.Drawing.Graphics,AGS.API.IBrush,single,single) [0x00081] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine.Desktop/Drawing/DesktopBitmapTextDraw.cs:92
  at AGS.Engine.Desktop.DesktopBitmapTextDraw.DrawText (string,AGS.API.ITextConfig,AGS.API.SizeF,AGS.API.SizeF,int,int,single) [0x0018c] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine.Desktop/Drawing/DesktopBitmapTextDraw.cs:66
  at AGS.Engine.GLText.drawToBitmap () [0x0024b] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/UI/Text/GLText.cs:177
  at AGS.Engine.GLText.SetProperties (AGS.API.SizeF,string,AGS.API.ITextConfig,System.Nullable`1<int>,int,bool,System.Nullable`1<bool>) [0x00127] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/UI/Text/GLText.cs:79
  at AGS.Engine.GLLabelRenderer.updateText (AGS.API.SizeF,System.Nullable`1<int>,System.Nullable`1<bool>) [0x0002e] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/UI/Text/GLLabelRenderer.cs:240
  at AGS.Engine.GLLabelRenderer.updateBoundingBoxes (AGS.API.AutoFit,AGS.Engine.IGLMatrices,AGS.Engine.IGLMatrices,AGS.API.PointF,bool,bool) [0x0021c] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/UI/Text/GLLabelRenderer.cs:187
  at AGS.Engine.GLLabelRenderer.updateBoundingBoxes (AGS.API.IObject,AGS.API.IDrawableInfo,AGS.API.IInObjectTree,AGS.API.IViewport,AGS.API.PointF) [0x001e2] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/UI/Text/GLLabelRenderer.cs:158
  at AGS.Engine.GLLabelRenderer.Prepare (AGS.API.IObject,AGS.API.IDrawableInfo,AGS.API.IInObjectTree,AGS.API.IViewport,AGS.API.PointF) [0x00031] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/UI/Text/GLLabelRenderer.cs:98
  at AGS.Engine.AGSRendererLoop.renderObject (AGS.API.IRoom,AGS.API.IObject) [0x00087] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Graphics/Logic/AGSRendererLoop.cs:138
  at AGS.Engine.AGSRendererLoop.renderRoom (AGS.API.IRoom) [0x00028] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Graphics/Logic/AGSRendererLoop.cs:124
  at AGS.Engine.AGSRendererLoop.Tick () [0x0007d] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Graphics/Logic/AGSRendererLoop.cs:52
  at AGS.Engine.AGSGame/<Start>c__AnonStorey0.<>m__3 (object,OpenTK.FrameEventArgs) [0x00047] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Game/AGSGame.cs:153
  at (wrapper delegate-invoke) System.EventHandler`1<TEventArgs_REF>.invoke_void_object_TEventArgs (object,TEventArgs_REF) <IL 0x00073, 0x001db>
  at OpenTK.GameWindow.OnRenderFrame (OpenTK.FrameEventArgs) <IL 0x00009, 0x0005b>
  at OpenTK.GameWindow.OnRenderFrameInternal (OpenTK.FrameEventArgs) <IL 0x00019, 0x00099>
  at OpenTK.GameWindow.RaiseRenderFrame (double,double&) <IL 0x00014, 0x0008b>
  at OpenTK.GameWindow.DispatchUpdateAndRenderFrame (object,System.EventArgs) <IL 0x00101, 0x00413>
  at OpenTK.GameWindow.Run (double,double) <IL 0x000f7, 0x0050b>
  at OpenTK.GameWindow.Run (double) <IL 0x0000c, 0x00053>
  at AGS.Engine.AGSGame.Start (AGS.API.IGameSettings) [0x00189] in /Users/zachi/Projects/MonoAGS/Source/Engine/AGS.Engine/Game/AGSGame.cs:171
  at DemoGame.DemoStarter.Run () [0x0007c] in /Users/zachi/Projects/MonoAGS/Source/Demo/DemoQuest/Program.cs:42
  at DemoQuest.Desktop.MainClass.Main (string[]) [0x00006] in /Users/zachi/Projects/MonoAGS/Source/Demo/DemoQuest.Desktop/Program.cs:12
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00051, 0x001d2>

Native stacktrace:


Debug info from gdb:

(lldb) command source -s 0 '/tmp/mono-gdb-commands.ao4dtH'
Executing commands in '/private/tmp/mono-gdb-commands.ao4dtH'.
(lldb) process attach --pid 11633
warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.6.0/lib/libglib-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
Process 11633 stopped
Executable module set to "/Library/Frameworks/Mono.framework/Versions/4.6.0/bin/mono".
Architecture set to: i386-apple-macosx.
(lldb) thread list
Process 11633 stopped
* thread #1: tid = 0x1679f0, 0x9bf47e16 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50b', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0x1679f3, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
  thread #3: tid = 0x1679f5, 0x9bf41a0a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
  thread #4: tid = 0x1679f6, 0x9bf488ce libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
  thread #5: tid = 0x1679f7, 0x9bf4776e libsystem_kernel.dylib`__recvfrom + 10, name = 'Debugger agent'
  thread #6: tid = 0x167a9f, 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.audio.IOThread.client'
  thread #7: tid = 0x167aa6, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_c907'
  thread #8: tid = 0x167aa7, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
  thread #9: tid = 0x167aa8, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
  thread #10: tid = 0x167aaa, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Timer-Scheduler'
  thread #11: tid = 0x167ac1, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
  thread #12: tid = 0x167ac2, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
  thread #13: tid = 0x167ac7, 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10
  thread #14: tid = 0x167ac8, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
  thread #15: tid = 0x167aca, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
  thread #16: tid = 0x167ad1, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
  thread #17: tid = 0x167ad2, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
  thread #18: tid = 0x167ae0, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
  thread #19: tid = 0x167c6a, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
(lldb) thread backtrace all
* thread #1: tid = 0x1679f0, 0x9bf47e16 libsystem_kernel.dylib`__wait4 + 10, name = 'tid_50b', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x9bf47e16 libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x90b75b19 libsystem_c.dylib`waitpid$UNIX2003 + 48
    frame #2: 0x001497fd mono`mono_handle_native_sigsegv(signal=11, ctx=0x0068bfe0, info=0x0068bfa0) + 541 at mini-exceptions.c:2427
    frame #3: 0x001997e2 mono`mono_arch_handle_altstack_exception(sigctx=<unavailable>, siginfo=<unavailable>, fault_addr=<unavailable>, stack_ovf=0) + 162 at exceptions-x86.c:1103
    frame #4: 0x00088303 mono`mono_sigsegv_signal_handler(_dummy=<unavailable>, _info=<unavailable>, context=<unavailable>) + 467 at mini-runtime.c:2865
    frame #5: 0x946a303b libsystem_platform.dylib`_sigtramp + 43
    frame #6: 0x066c324a libfreetype.6.dylib`Direct_Move_Y + 58
    frame #7: 0x066bfc55 libfreetype.6.dylib`Ins_MIAP + 517
    frame #8: 0x066bb82f libfreetype.6.dylib`TT_RunIns + 2751
    frame #9: 0x066ca7ba libfreetype.6.dylib`TT_Run_Context + 378
    frame #10: 0x066ca405 libfreetype.6.dylib`TT_Hint_Glyph + 885
    frame #11: 0x066c97de libfreetype.6.dylib`TT_Process_Simple_Glyph + 990
    frame #12: 0x066c7dcb libfreetype.6.dylib`load_truetype_glyph + 1643
    frame #13: 0x066c6fee libfreetype.6.dylib`TT_Load_Glyph + 638
    frame #14: 0x066ba80b libfreetype.6.dylib`tt_glyph_load + 363
    frame #15: 0x066a0cf6 libfreetype.6.dylib`FT_Load_Glyph + 902
    frame #16: 0x0611b589 libcairo.2.dylib`_cairo_ft_scaled_glyph_init(abstract_font=0x7ff268d0, scaled_glyph=0x80a7d7dc, info=CAIRO_SCALED_GLYPH_INFO_SURFACE) + 297 at cairo-ft-font.c:2159
    frame #17: 0x060b016a libcairo.2.dylib`_cairo_scaled_glyph_lookup(scaled_font=0x7ff268d0, index=78, info=CAIRO_SCALED_GLYPH_INFO_SURFACE, scaled_glyph_ret=0xbff824b0) + 554 at cairo-scaled-font.c:3000
    frame #18: 0x0605ad05 libcairo.2.dylib`composite_glyphs(_dst=0x7ff17b80, op=CAIRO_OPERATOR_OVER, _src=0x7ff17d40, src_x=0, src_y=0, dst_x=0, dst_y=0, info=0xbff82ea8) + 645 at cairo-image-compositor.c:840
    frame #19: 0x060d9cdd libcairo.2.dylib`composite_glyphs(compositor=0x06157854, dst=0x7ff17b80, closure=0xbff82ea8, op=CAIRO_OPERATOR_OVER, src=0x7ff17d40, src_x=0, src_y=0, dst_x=0, dst_y=0, extents=0xbff82f90, clip=0x7f8abd30) + 237 at cairo-traps-compositor.c:2273
    frame #20: 0x060d9afd libcairo.2.dylib`clip_and_composite(compositor=0x06157854, extents=0xbff82f58, draw_func=0x060d9bf0, mask_func=0x00000000, draw_closure=0xbff82ea8, need_clip=1) + 1037 at cairo-traps-compositor.c:1038
    frame #21: 0x060d96d0 libcairo.2.dylib`_cairo_traps_compositor_glyphs(_compositor=0x06157854, extents=0xbff82f58, scaled_font=0x7ff268d0, glyphs=0xbff83fa8, num_glyphs=12, overlap=0) + 400 at cairo-traps-compositor.c:2316
    frame #22: 0x06048167 libcairo.2.dylib`_cairo_compositor_glyphs(compositor=0x06157854, surface=0x7ff17b80, op=CAIRO_OPERATOR_OVER, source=0xbff836a0, glyphs=0xbff83fa8, num_glyphs=12, scaled_font=0x7ff268d0, clip=0x00000000) + 359 at cairo-compositor.c:250
    frame #23: 0x06065d2d libcairo.2.dylib`_cairo_image_surface_glyphs(abstract_surface=0x7ff17b80, op=CAIRO_OPERATOR_OVER, source=0xbff836a0, glyphs=0xbff83fa8, num_glyphs=12, scaled_font=0x7ff268d0, clip=0x00000000) + 141 at cairo-image-surface.c:996
    frame #24: 0x060bf609 libcairo.2.dylib`_cairo_surface_show_text_glyphs(surface=0x7ff17b80, op=CAIRO_OPERATOR_OVER, source=0xbff836a0, utf8=0x00000000, utf8_len=0, glyphs=0xbff83fa8, num_glyphs=12, clusters=0x00000000, num_clusters=0, cluster_flags=0, scaled_font=0x7ff268d0, clip=0x00000000) + 1097 at cairo-surface.c:2503
    frame #25: 0x06056210 libcairo.2.dylib`_cairo_gstate_show_text_glyphs(gstate=0x7cddfc20, glyphs=0xbff85080, num_glyphs=12, info=0x00000000) + 1200 at cairo-gstate.c:2008
    frame #26: 0x0604d098 libcairo.2.dylib`_cairo_default_context_glyphs(abstract_cr=0x7cddfc00, glyphs=0xbff85080, num_glyphs=12, info=0x00000000) + 72 at cairo-default-context.c:1295
    frame #27: 0x0604005f libcairo.2.dylib`cairo_show_text(cr=0x7cddfc00, utf8=0x7ff1eb20) + 639 at cairo.c:3259
    frame #28: 0x05ec6d67 libgdiplus.dylib`DrawString(graphics=0x7ff11f20, stringUnicode=0x00b91a14, length=12, font=0x7fb58bb0, rc_org=0xbff85d90, fmt=0x7ff17d10, brush=0x7fda4c00, CleanString=0x7ff11c70, StringDetails=0x7ff121c0, data=0xbff85b90) + 2071 at text-cairo.c:856
    frame #29: 0x05ec46f6 libgdiplus.dylib`cairo_DrawString(graphics=0x7ff11f20, stringUnicode=0x00b91a14, length=12, font=0x7fb58bb0, rc=0xbff85d90, format=0x7ff17d10, brush=0x7fda4c00) + 582 at text-cairo.c:1033
    frame #30: 0x05ec40b5 libgdiplus.dylib`GdipDrawString(graphics=0x7ff11f20, string=0x00b91a14, length=12, font=0x7fb58bb0, layoutRect=0xbff85d90, stringFormat=0x7ff17d10, brush=0x7fda4c00) + 341 at text.c:64
    frame #31: 0x0dcf812c
    frame #32: 0x0dcf371c
    frame #33: 0x0dcf3470
    frame #34: 0x0dcf332c
    frame #35: 0x0dcf2414
    frame #36: 0x0dcf1b04
    frame #37: 0x0dcebbde
    frame #38: 0x0dcf63c0
    frame #39: 0x0dcf5da4
    frame #40: 0x0dcfcad4
    frame #41: 0x0dcf52b8
    frame #42: 0x0dcea5c8
    frame #43: 0x0dce9c2f
    frame #44: 0x0dce45cc
    frame #45: 0x0b981cb0
    frame #46: 0x0b97ea94
    frame #47: 0x0a890424
    frame #48: 0x0b97e2d4
    frame #49: 0x0b97e212
    frame #50: 0x0b97e08c
    frame #51: 0x0a88fa6c
    frame #52: 0x07632854
    frame #53: 0x0763230c
    frame #54: 0x06adcd30
    frame #55: 0x05e44769
    frame #56: 0x005f583c
    frame #57: 0x005f5a43
    frame #58: 0x0008bc07 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, error=<unavailable>) + 1527 at mini-runtime.c:2547
    frame #59: 0x00270340 mono`do_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>, error=<unavailable>) + 96 at object.c:2949
    frame #60: 0x00272b8d mono`mono_runtime_exec_main [inlined] mono_runtime_invoke_checked(method=<unavailable>, params=0x008002b0, error=0x00000000) + 1005 at object.c:3107
    frame #61: 0x00272b3d mono`mono_runtime_exec_main(method=0x7c0f0ac0, args=<unavailable>, exc=0x00000000) + 925 at object.c:4724
    frame #62: 0x002726bf mono`mono_runtime_run_main(method=0x008002b0, argc=<unavailable>, argv=<unavailable>, exc=0x00000000) + 895 at object.c:4274
    frame #63: 0x0010e009 mono`mono_jit_exec(domain=<unavailable>, assembly=<unavailable>, argc=<unavailable>, argv=<unavailable>) + 265 at driver.g.c:1048
    frame #64: 0x001106b2 mono`mono_main [inlined] main_thread_handler + 8850 at driver.g.c:1108
    frame #65: 0x00110674 mono`mono_main(argc=<unavailable>, argv=<unavailable>) + 8788 at driver.g.c:2186
    frame #66: 0x0007b9e1 mono`main [inlined] mono_main_with_options(argc=4, argc=4, argc=4, argv=0xbff87908, argv=0xbff87908, argv=0xbff87908) + 33 at main.c:28
    frame #67: 0x0007b9c0 mono`main(argc=4, argv=0xbff87908) + 1184 at main.c:177
    frame #68: 0x0007b515 mono`start + 53

  thread #2: tid = 0x1679f3, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2528 libsystem_pthread.dylib`pthread_cond_wait$UNIX2003 + 71
    frame #3: 0x002dbdd5 mono`thread_func [inlined] mono_os_cond_wait(mutex=0xb00810b0) + 18 at mono-os-mutex.h:107
    frame #4: 0x002dbdc3 mono`thread_func(thread_data=<unavailable>) + 195 at sgen-thread-pool.c:110
    frame #5: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #6: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #7: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #3: tid = 0x1679f5, 0x9bf41a0a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
    frame #0: 0x9bf41a0a libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x002697f7 mono`finalizer_thread [inlined] mono_os_sem_wait(flags=<unavailable>) + 14 at mono-os-semaphore.h:72
    frame #2: 0x002697e9 mono`finalizer_thread [inlined] mono_coop_sem_wait(flags=<unavailable>) + 10 at mono-coop-semaphore.h:40
    frame #3: 0x002697df mono`finalizer_thread(unused=0x00000000) + 191 at gc.c:761
    frame #4: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #5: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #6: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #7: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #8: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #9: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #4: tid = 0x1679f6, 0x9bf488ce libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x9bf488ce libsystem_kernel.dylib`kevent64 + 10
    frame #1: 0x94b5c73f libdispatch.dylib`_dispatch_mgr_invoke + 245
    frame #2: 0x94b5c3a2 libdispatch.dylib`_dispatch_mgr_thread + 52

  thread #5: tid = 0x1679f7, 0x9bf4776e libsystem_kernel.dylib`__recvfrom + 10, name = 'Debugger agent'
    frame #0: 0x9bf4776e libsystem_kernel.dylib`__recvfrom + 10
    frame #1: 0x90b75d26 libsystem_c.dylib`recv$UNIX2003 + 55
    frame #2: 0x00181b58 mono`socket_transport_recv(buf=<unavailable>, len=<unavailable>) + 184 at debugger-agent.c:1130
    frame #3: 0x00172427 mono`debugger_thread [inlined] transport_recv(len=<unavailable>) + 25 at debugger-agent.c:1536
    frame #4: 0x0017240e mono`debugger_thread(arg=0x00000000) + 1582 at debugger-agent.c:9847
    frame #5: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #6: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #7: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #8: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #6: tid = 0x167a9f, 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.audio.IOThread.client'
    frame #0: 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x9bf40a70 libsystem_kernel.dylib`mach_msg + 68
    frame #2: 0x99ac4bb0 CoreAudio`HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned long, unsigned long, mach_msg_header_t*, bool, unsigned int) + 142
    frame #3: 0x99abd6fe CoreAudio`HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 72
    frame #4: 0x99abbc1e CoreAudio`HALC_ProxyIOContext::IOWorkLoop() + 1148
    frame #5: 0x99abb67a CoreAudio`HALC_ProxyIOContext::IOThreadEntry(void*) + 156
    frame #6: 0x99ac7d09 CoreAudio`___ZN19HALC_ProxyIOContextC2Emj_block_invoke + 20
    frame #7: 0x99abb591 CoreAudio`HALB_IOThread::Entry(void*) + 173
    frame #8: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #9: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #10: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #7: tid = 0x167aa6, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_c907'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x0030992b mono`mono_thread_info_sleep [inlined] mono_os_cond_timedwait(cond=0x003d921c, mutex=0x003d91f0) + 104 at mono-os-mutex.h:136
    frame #4: 0x003098c3 mono`mono_thread_info_sleep [inlined] mono_coop_cond_timedwait(cond=0x003d921c, mutex=0x003d91f0) at mono-coop-mutex.h:107
    frame #5: 0x003098c3 mono`mono_thread_info_sleep [inlined] sleep_interruptable(ms=<unavailable>, alerted=0xb05c4eb0) + 445 at mono-threads.c:1213
    frame #6: 0x00309706 mono`mono_thread_info_sleep(ms=<unavailable>, alerted=0xb05c4eb0) + 278 at mono-threads.c:1245
    frame #7: 0x00245fd6 mono`monitor_thread + 742 at threadpool-ms.c:905
    frame #8: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #9: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #10: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #11: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #12: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #13: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #8: tid = 0x167aa7, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #9: tid = 0x167aa8, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #10: tid = 0x167aaa, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Timer-Scheduler'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002e2687 mono`mono_os_cond_timedwait(cond=<unavailable>, mutex=<unavailable>, timeout_ms=<unavailable>) + 135 at mono-os-mutex.h:136
    frame #4: 0x002e243b mono`_wapi_handle_timedwait_signal_handle(handle=0x0000040e, timeout=<unavailable>, alertable=<unavailable>, poll=<unavailable>, alerted=0x94876d01) + 507 at handles.c:1555
    frame #5: 0x002f588b mono`wapi_WaitForSingleObjectEx(handle=<unavailable>, timeout=<unavailable>, alertable=<unavailable>) + 731 at wait.c:189
    frame #6: 0x0023c7fe mono`mono_wait_uninterrupted(thread=<unavailable>, numhandles=<unavailable>, handles=<unavailable>, waitall=<unavailable>, ms=<unavailable>, error=<unavailable>) + 110 at threads.c:1595
    frame #7: 0x0023ca5b mono`ves_icall_System_Threading_WaitHandle_WaitOne_internal(handle=0x0000040e, ms=3189) + 107 at threads.c:1731
    frame #8: 0x0a880054
    frame #9: 0x0a87fafc
    frame #10: 0x0a87f97c
    frame #11: 0x0a87f848
    frame #12: 0x0a87f6a0
    frame #13: 0x0a87f4a2
    frame #14: 0x0a87cf3b
    frame #15: 0x0a87ae10
    frame #16: 0x0a860cca
    frame #17: 0x0a8606d4
    frame #18: 0x0a87aa00
    frame #19: 0x0a879d10
    frame #20: 0x02706b45
    frame #21: 0x0008bc07 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, error=<unavailable>) + 1527 at mini-runtime.c:2547
    frame #22: 0x00270340 mono`do_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>, error=<unavailable>) + 96 at object.c:2949
    frame #23: 0x00271f19 mono`mono_runtime_delegate_try_invoke [inlined] mono_runtime_invoke_checked(method=<unavailable>, params=<unavailable>, error=<unavailable>) + 329 at object.c:3107
    frame #24: 0x00271ec8 mono`mono_runtime_delegate_try_invoke(delegate=<unavailable>, params=<unavailable>, exc=<unavailable>, error=<unavailable>) + 248 at object.c:4052
    frame #25: 0x00271f82 mono`mono_runtime_delegate_invoke_checked(delegate=0x00a5a540, params=0xb08caef8, error=0xb08caf00) + 50 at object.c:4073
    frame #26: 0x00242294 mono`start_wrapper [inlined] start_wrapper_internal + 679 at threads.c:746
    frame #27: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #28: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #29: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #30: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #31: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #11: tid = 0x167ac1, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #12: tid = 0x167ac2, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #13: tid = 0x167ac7, 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10
    frame #0: 0x9bf419ce libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x9bf40a70 libsystem_kernel.dylib`mach_msg + 68
    frame #2: 0x97e4aef6 CoreFoundation`__CFRunLoopServiceMachPort + 214
    frame #3: 0x97e4a309 CoreFoundation`__CFRunLoopRun + 1529
    frame #4: 0x97e49aa6 CoreFoundation`CFRunLoopRunSpecific + 390
    frame #5: 0x97e4990b CoreFoundation`CFRunLoopRunInMode + 123
    frame #6: 0x96fd82d0 AppKit`_NSEventThread + 283
    frame #7: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #8: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #9: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #14: tid = 0x167ac8, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #15: tid = 0x167aca, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #16: tid = 0x167ad1, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #17: tid = 0x167ad2, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #18: tid = 0x167ae0, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34

  thread #19: tid = 0x167c6a, 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    frame #0: 0x9bf47512 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x90aef163 libsystem_pthread.dylib`_pthread_cond_wait + 726
    frame #2: 0x90af2574 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
    frame #3: 0x002453c0 mono`worker_thread [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x7d9a5d4c, timeout_ms=<unavailable>) + 152 at mono-os-mutex.h:136
    frame #4: 0x00245328 mono`worker_thread [inlined] mono_coop_cond_timedwait(timeout_ms=<unavailable>) at mono-coop-mutex.h:107
    frame #5: 0x00245328 mono`worker_thread [inlined] worker_park + 388 at threadpool-ms.c:532
    frame #6: 0x002451a4 mono`worker_thread(data=0x00000000) + 932 at threadpool-ms.c:624
    frame #7: 0x0024220f mono`start_wrapper [inlined] start_wrapper_internal + 546 at threads.c:740
    frame #8: 0x00241fed mono`start_wrapper(data=<unavailable>) + 29 at threads.c:788
    frame #9: 0x0030be3a mono`inner_start_thread(arg=<unavailable>) + 474 at mono-threads-posix.c:92
    frame #10: 0x90aeec25 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x90aeeb9b libsystem_pthread.dylib`_pthread_start + 162
    frame #12: 0x90aebe32 libsystem_pthread.dylib`thread_start + 34
(lldb) detach

=================================================================
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.
=================================================================

Process 11633 detached
(lldb) quit
(lldb) XR1LX.platform/Developer/SDKs/MacOSX10.10.sdk
error: 'XR1L' is not a valid command.
Comment 2 Tzach Shabtay 2017-11-22 13:28:29 UTC
Hi, has anybody looked at this yet?

I have a suspicion that it might be a bug in libfreetype which has already been fixed but mono is using an old version.

I found this bug: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/983213, which has a similar stack trace, and it's a reported duplicated of this bug: https://bugs.launchpad.net/ubuntu/+source/freetype/+bug/1199571, which apparently fixed a bunch of multithreading issues in the library in early 2015.

So the question is do mono use the version with the fix?
I'm not sure how to find that out, I ran otools on libfreetype.6.dylib and got: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/libfreetype.6.dylib (compatibility version 17.0.0, current version 17.2.0).
I don't know how to map that file version to the library version, and also how to map the linux library version (2.5.2-2ubuntu2) to a mac version (or is it the same version). Simply googling 17.2.0, however, I found this issue: https://github.com/Homebrew/homebrew-php/issues/419, somebody did otools and got the same version number in 2013, making me reach the conclusion that the library mono uses is old and before the fix.

If I'm correct, can mono be updated to use a newer version?

Btw, if anybody is trying to reproduce this issue now, I've since added caching to the text measurements which reduces the frequency of this bug, so remove the measurements before reproducing (i.e in Engine/AGS.Engine.Desktop/Extensions change Measure to be public static System.Drawing.SizeF Measure(this string text, Font font, int maxWidth = int.MaxValue)
		{
            return _graphics.Value.MeasureString(text, font, maxWidth, StringFormat.GenericTypographic); }, and then repeat the repro instuctions above).