Monogame: SoundEffect not loading on Cross Desktop GL on Mac

Created on 4 Aug 2016  ·  9Comments  ·  Source: MonoGame/MonoGame

This sound works fine on Windows GL, Windows DX, and Windows UWP using the current develop branch. Does not work on MacOS using the cross platform template (Android, iOS, and Xamarin.mac give different errors). On the Mac, it fails at the Content.Load("testsound"). XS gets a spin cursor for a while before it really stops, almost like it is gotten into a nested loop allocating memory or trying to allocate a really large chunk. The error I get isn't very helpful and I do not know where to set the breakpoint to see the actual error.

mono(89898,0xb07a9000) malloc: *** error for object 0x7b9a20a4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

Native stacktrace:

    0   mono                                0x000d7e46 mono_handle_native_sigsegv + 342
    1   mono                                0x001285f1 sigabrt_signal_handler + 129
    2   libsystem_platform.dylib            0x92c4479b _sigtramp + 43
    3   ???                                 0xffffffff 0x0 + 4294967295
    4   libsystem_c.dylib                   0x9597ac38 abort + 156
    5   libsystem_malloc.dylib              0x96d22f31 szone_error + 457
    6   libsystem_malloc.dylib              0x96d22f65 free_list_checksum_botch + 50
    7   libsystem_malloc.dylib              0x96d17a44 tiny_malloc_from_free_list + 403
    8   libsystem_malloc.dylib              0x96d16b35 szone_malloc_should_clear + 271
    9   libsystem_malloc.dylib              0x96d16a1f szone_malloc + 24
    10  libsystem_malloc.dylib              0x96d169c7 malloc_zone_malloc + 75
    11  CoreFoundation                      0x96544c98 __CFAllocatorSystemAllocate + 24
    12  CoreFoundation                      0x96544c36 CFAllocatorAllocate + 134
    13  CoreFoundation                      0x96544a4d _CFRuntimeCreateInstance + 285
    14  CoreFoundation                      0x96566e51 __CFDataInit + 257
    15  CoreFoundation                      0x965890e9 CFDataCreate + 41
    16  CoreGraphics                        0x9bd19af8 event_datagram_handler + 89
    17  CoreGraphics                        0x9bd18f46 _ZN21CGSDatagramReadStream18dispatch_datagramsEv + 1152
    18  CoreGraphics                        0x9bd18a18 CGSDatagramReadStreamDispatchDatagramsWithData + 308
    19  CoreGraphics                        0x9bd18859 CGSSnarfAndDispatchDatagrams + 1232
    20  CoreGraphics                        0x9bd181b5 CGSGetNextEventRecordInternal + 78
    21  CoreGraphics                        0x9bd1811f CGEventCreateNextEvent + 34
    22  HIToolbox                           0x9ce7b53b _ZL38PullEventsFromWindowServerOnConnectionjhP17__CFMachPortBoost + 83
    23  HIToolbox                           0x9ce7b4c3 _ZL14MessageHandlerP12__CFMachPortPvlS1_ + 55
    24  CoreFoundation                      0x965da29e __CFMachPortPerform + 270
    25  CoreFoundation                      0x965da185 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
    26  CoreFoundation                      0x965da0f0 __CFRunLoopDoSource1 + 512
    27  CoreFoundation                      0x965d1639 __CFRunLoopRun + 2649
    28  CoreFoundation                      0x965d0976 CFRunLoopRunSpecific + 390
    29  CoreFoundation                      0x965d07db CFRunLoopRunInMode + 123
    30  AppKit                              0x9181ddde _NSEventThread + 291
    31  libsystem_pthread.dylib             0x900a1780 _pthread_body + 138
    32  libsystem_pthread.dylib             0x900a16f6 _pthread_body + 0
    33  libsystem_pthread.dylib
Needs Testing

Most helpful comment

Found the cause of the problem for me, for some reason the 32bit version of mono was installed on my system instead of the 64bit version...

All 9 comments

This still fails on Mac GL after using code that includes PR#5086.

Would you mind step-by-step debugging the Content.Load<SoundEffect>() call?
My local sources are one month old and are working fine, probably a recent changes (sorry, I'm unable to update and test this right now).

I stepped into as deep as it would go. Below is the XS call stack just prior to it going wacko.

OpenAL.AL.BufferData(int bid, OpenAL.ALFormat format, byte[] data, int size, int freq) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Audio/OpenAL.cs:186
Microsoft.Xna.Framework.Audio.OALSoundBuffer.BindDataBuffer(byte[] dataBuffer, OpenAL.ALFormat format, int size, int sampleRate, int alignment) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Audio/OALSoundBuffer.cs:75
Microsoft.Xna.Framework.Audio.SoundEffect.PlatformInitializePcm(byte[] buffer, int offset, int count, int sampleRate, Microsoft.Xna.Framework.Audio.AudioChannels channels, int loopStart, int loopLength) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Audio/SoundEffect.OpenAL.cs:126
Microsoft.Xna.Framework.Audio.SoundEffect..ctor(byte[] header, byte[] buffer, int bufferSize, int durationMs, int loopStart, int loopLength) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Audio/SoundEffect.cs:55
Microsoft.Xna.Framework.Content.SoundEffectReader.Read(Microsoft.Xna.Framework.Content.ContentReader input, Microsoft.Xna.Framework.Audio.SoundEffect existingInstance) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentReaders/SoundEffectReader.cs:51
Microsoft.Xna.Framework.Content.ContentTypeReader<Microsoft.Xna.Framework.Audio.SoundEffect>.Read(Microsoft.Xna.Framework.Content.ContentReader input, object existingInstance) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentTypeReader.cs:57
Microsoft.Xna.Framework.Content.ContentReader.InnerReadObject<Microsoft.Xna.Framework.Audio.SoundEffect>(Microsoft.Xna.Framework.Audio.SoundEffect existingInstance) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentReader.cs:188
Microsoft.Xna.Framework.Content.ContentReader.ReadObject<Microsoft.Xna.Framework.Audio.SoundEffect>() in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentReader.cs:163
Microsoft.Xna.Framework.Content.ContentReader.ReadAsset<Microsoft.Xna.Framework.Audio.SoundEffect>() in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentReader.cs:72
Microsoft.Xna.Framework.Content.ContentManager.ReadAsset<Microsoft.Xna.Framework.Audio.SoundEffect>(string assetName, System.Action<System.IDisposable> recordDisposableObject) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentManager.cs:306
Microsoft.Xna.Framework.Content.ContentManager.Load<Microsoft.Xna.Framework.Audio.SoundEffect>(string assetName) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentManager.cs:228
TestMonoCommon.Game1.LoadContent() in /Users/ksuda/Documents/My Xarmarin Projects/TestMono/TestMonoCommon/Game1.cs:188
Microsoft.Xna.Framework.Game.Initialize() in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Game.cs:543
TestMonoCommon.Game1.Initialize() in /Users/ksuda/Documents/My Xarmarin Projects/TestMono/TestMonoCommon/Game1.cs:122
Microsoft.Xna.Framework.Game.DoInitialize() in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Game.cs:681
Microsoft.Xna.Framework.Game.Run(Microsoft.Xna.Framework.GameRunBehavior runBehavior) in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Game.cs:384
Microsoft.Xna.Framework.Game.Run() in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Game.cs:370
TestMonoMacDesktopGL.Program.RunGame() in /Users/ksuda/Documents/My Xarmarin Projects/TestMono/TestMonoMacDesktopGL/Program.cs:32
TestMonoMacDesktopGL.Program.Main(string[] args) in /Users/ksuda/Documents/My Xarmarin Projects/TestMono/TestMonoMacDesktopGL/Program.cs:56

If I hit step into at this point, I get the following uglier trace:

Stacktrace:

  at <unknown> <0xffffffff>
  at Microsoft.Xna.Framework.Content.ContentReader.InnerReadObject<TResult_REF> (TResult_REF) [0x00041] in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentReader.cs:188
  at Microsoft.Xna.Framework.Content.ContentReader.ReadObject<TResult_REF> () [0x0000b] in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentReader.cs:163
  at Microsoft.Xna.Framework.Content.ContentReader.ReadAsset<TResult_REF> () [0x00008] in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentReader.cs:72
  at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset<TResult_REF> (string,System.Action`1<System.IDisposable>) [0x00096] in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentManager.cs:306
  at Microsoft.Xna.Framework.Content.ContentManager.Load<TResult_REF> (string) [0x00077] in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Content/ContentManager.cs:228
  at TestMonoCommon.Game1.LoadContent () [0x00401] in /Users/ksuda/Documents/My Xarmarin Projects/TestMono/TestMonoCommon/Game1.cs:188
  at Microsoft.Xna.Framework.Game.Initialize () [0x00050] in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Game.cs:543
  at TestMonoCommon.Game1.Initialize () [0x0000d] in /Users/ksuda/Documents/My Xarmarin Projects/TestMono/TestMonoCommon/Game1.cs:122
  at Microsoft.Xna.Framework.Game.DoInitialize () [0x00013] in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Game.cs:681
  at Microsoft.Xna.Framework.Game.Run (Microsoft.Xna.Framework.GameRunBehavior) [0x0003b] in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Game.cs:384
  at Microsoft.Xna.Framework.Game.Run () [0x0000d] in /Users/ksuda/Documents/My Xarmarin Projects/MonoGameSource/MonoGame/MonoGame.Framework/Game.cs:370
  at TestMonoMacDesktopGL.Program.RunGame () [0x00010] in /Users/ksuda/Documents/My Xarmarin Projects/TestMono/TestMonoMacDesktopGL/Program.cs:32
  at TestMonoMacDesktopGL.Program.Main (string[]) [0x00001] in /Users/ksuda/Documents/My Xarmarin Projects/TestMono/TestMonoMacDesktopGL/Program.cs:56
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00058, 0xffffffff>

Native stacktrace:


Debug info from gdb:

(lldb) command source -s 0 '/tmp/mono-gdb-commands.7bjlg8'
Executing commands in '/tmp/mono-gdb-commands.7bjlg8'.
(lldb) process attach --pid 3990
Process 3990 stopped
* thread #1: tid = 0x12c009, 0x9e00ccee libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x9e00ccee libsystem_kernel.dylib`__wait4 + 10
libsystem_kernel.dylib`__wait4:
->  0x9e00ccee <+10>: jae    0x9e00ccfe                ; <+26>
    0x9e00ccf0 <+12>: calll  0x9e00ccf5                ; <+17>
    0x9e00ccf5 <+17>: popl   %edx
    0x9e00ccf6 <+18>: movl   0x63e832f(%edx), %edx

Executable module set to "/Library/Frameworks/Mono.framework/Versions/4.2.3/bin/mono".
Architecture set to: i386-apple-macosx.
(lldb) thread list
Process 3990 stopped
* thread #1: tid = 0x12c009, 0x9e00ccee libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0x12c010, 0x9e00c3ea libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #3: tid = 0x12c026, 0x9e0054d6 libsystem_kernel.dylib`semaphore_wait_trap + 10
  thread #4: tid = 0x12c029, 0x9e00d7fa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
  thread #5: tid = 0x12c02c, 0x9e00c646 libsystem_kernel.dylib`__recvfrom + 10
  thread #6: tid = 0x12c048, 0x9e00cd5e libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #7: tid = 0x12c0ff, 0x9e00549a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.audio.IOThread.client'
  thread #8: tid = 0x12c109, 0x9e00c7ce libsystem_kernel.dylib`__semwait_signal + 10
  thread #9: tid = 0x12c163, 0x9e00549a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSEventThread'
(lldb) thread backtrace all
* thread #1: tid = 0x12c009, 0x9e00ccee libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x9e00ccee libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x97d377e0 libsystem_c.dylib`waitpid$UNIX2003 + 48
    frame #2: 0x0015cf0d mono`mono_handle_native_sigsegv(signal=11, ctx=0x0078bfe0, info=0x0078bfa0) + 541 at mini-exceptions.c:2193 [opt]
    frame #3: 0x001a9462 mono`mono_arch_handle_altstack_exception(sigctx=<unavailable>, siginfo=<unavailable>, fault_addr=<unavailable>, stack_ovf=0) + 162 at exceptions-x86.c:1097 [opt]
    frame #4: 0x000aa33e mono`mono_sigsegv_signal_handler(_dummy=<unavailable>, _info=<unavailable>, context=<unavailable>) + 446 at mini-runtime.c:2471 [opt]
    frame #5: 0x95d3279b libsystem_platform.dylib`_sigtramp + 43
    frame #6: 0x002fed71 mono`monoeg_g_hash_table_lookup [inlined] monoeg_g_hash_table_lookup_extended(hash=<unavailable>, key=<unavailable>, value=<unavailable>) + 40 at ghashtable.c:331 [opt]
    frame #7: 0x002fed49 mono`monoeg_g_hash_table_lookup(hash=<unavailable>, key=0x7bb429d0) + 25 at ghashtable.c:311 [opt]
    frame #8: 0x0016923b mono`mono_class_get_runtime_generic_context_template [inlined] class_lookup_rgctx_template + 25 at mini-generic-sharing.c:247 [opt]
    frame #9: 0x00169222 mono`mono_class_get_runtime_generic_context_template(class=0x7bb429d0) + 34 at mini-generic-sharing.c:750 [opt]
    frame #10: 0x00165afc mono`fill_runtime_generic_context [inlined] get_shared_class(class=<unavailable>, class=<unavailable>, type_argc=<unavailable>, temporary=1, shared=1, do_free=0x00000000) + 5 at mini-generic-sharing.c:839 [opt]
    frame #11: 0x00165af7 mono`fill_runtime_generic_context(class_vtable=<unavailable>, rgctx=<unavailable>, slot=<unavailable>, method_inst=<unavailable>) + 311 at mini-generic-sharing.c:1851 [opt]
    frame #12: 0x00165cae mono`mono_method_fill_runtime_generic_context(mrgctx=0x79a6eea8, slot=3) + 30 at mini-generic-sharing.c:1932 [opt]
    frame #13: 0x0015fd0c mono`mono_rgctx_lazy_fetch_trampoline(regs=0xbff62b90, code="\x8bЋE܋J\x04\x89T$\b\x89L$\x04\x89\x04$�T���\x89E萐\x90\x90\x90\x90\x90\x8bƉE�E�E��\x90\x90\x90\x90\x90\x8bE�$\x90����\x8bЋE�M�L$\x04\x89\x04$�PV", data=<unavailable>, tramp=0x00000000) + 108 at mini-trampolines.c:935 [opt]
    frame #14: 0x006d2489

  thread #2: tid = 0x12c010, 0x9e00c3ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #0: 0x9e00c3ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x96343538 libsystem_pthread.dylib`_pthread_cond_wait + 757
    frame #2: 0x96345276 libsystem_pthread.dylib`pthread_cond_wait$UNIX2003 + 71
    frame #3: 0x002d07d2 mono`thread_func(thread_data=0x00000000) + 466 at sgen-thread-pool.c:118 [opt]
    frame #4: 0x96342780 libsystem_pthread.dylib`_pthread_body + 138
    frame #5: 0x963426f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #6: 0x9633ff7a libsystem_pthread.dylib`thread_start + 34

  thread #3: tid = 0x12c026, 0x9e0054d6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #0: 0x9e0054d6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x002f32ca mono`mono_sem_wait(sem=0x003d3090, alertable=1) + 26 at mono-semaphore.c:109 [opt]
    frame #2: 0x002703fe mono`finalizer_thread(unused=0x00000000) + 158 at gc.c:1096 [opt]
    frame #3: 0x0024a441 mono`start_wrapper [inlined] start_wrapper_internal + 516 at threads.c:725 [opt]
    frame #4: 0x0024a23d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:772 [opt]
    frame #5: 0x002fae60 mono`inner_start_thread(arg=<unavailable>) + 240 at mono-threads-posix.c:97 [opt]
    frame #6: 0x96342780 libsystem_pthread.dylib`_pthread_body + 138
    frame #7: 0x963426f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #8: 0x9633ff7a libsystem_pthread.dylib`thread_start + 34

  thread #4: tid = 0x12c029, 0x9e00d7fa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x9e00d7fa libsystem_kernel.dylib`kevent_qos + 10
    frame #1: 0x9008b7ea libdispatch.dylib`_dispatch_mgr_invoke + 234
    frame #2: 0x9008b3be libdispatch.dylib`_dispatch_mgr_thread + 52

  thread #5: tid = 0x12c02c, 0x9e00c646 libsystem_kernel.dylib`__recvfrom + 10
    frame #0: 0x9e00c646 libsystem_kernel.dylib`__recvfrom + 10
    frame #1: 0x97d379e3 libsystem_c.dylib`recv$UNIX2003 + 55
    frame #2: 0x00191948 mono`socket_transport_recv(buf=<unavailable>, len=<unavailable>) + 168 at debugger-agent.c:1130 [opt]
    frame #3: 0x00182b37 mono`debugger_thread [inlined] transport_recv(len=11) + 35 at debugger-agent.c:1515 [opt]
    frame #4: 0x00182b14 mono`debugger_thread(arg=0x00000000) + 1572 at debugger-agent.c:9573 [opt]
    frame #5: 0x002fae60 mono`inner_start_thread(arg=<unavailable>) + 240 at mono-threads-posix.c:97 [opt]
    frame #6: 0x96342780 libsystem_pthread.dylib`_pthread_body + 138
    frame #7: 0x963426f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #8: 0x9633ff7a libsystem_pthread.dylib`thread_start + 34

  thread #6: tid = 0x12c048, 0x9e00cd5e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x9e00cd5e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x9634234b libsystem_pthread.dylib`_pthread_wqthread + 1289
    frame #2: 0x9633ff56 libsystem_pthread.dylib`start_wqthread + 34

  thread #7: tid = 0x12c0ff, 0x9e00549a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.audio.IOThread.client'
    frame #0: 0x9e00549a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x9e004884 libsystem_kernel.dylib`mach_msg + 68
    frame #2: 0x9d49d8ac CoreAudio`HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned long, unsigned long, mach_msg_header_t*, bool, unsigned int) + 140
    frame #3: 0x9d496ab2 CoreAudio`HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 72
    frame #4: 0x9d494f20 CoreAudio`HALC_ProxyIOContext::IOWorkLoop() + 1392
    frame #5: 0x9d494894 CoreAudio`HALC_ProxyIOContext::IOThreadEntry(void*) + 156
    frame #6: 0x9d4a09ec CoreAudio`___ZN19HALC_ProxyIOContextC2Emj_block_invoke + 20
    frame #7: 0x9d4947b9 CoreAudio`HALB_IOThread::Entry(void*) + 71
    frame #8: 0x96342780 libsystem_pthread.dylib`_pthread_body + 138
    frame #9: 0x963426f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #10: 0x9633ff7a libsystem_pthread.dylib`thread_start + 34

  thread #8: tid = 0x12c109, 0x9e00c7ce libsystem_kernel.dylib`__semwait_signal + 10
    frame #0: 0x9e00c7ce libsystem_kernel.dylib`__semwait_signal + 10
    frame #1: 0x97d378d1 libsystem_c.dylib`nanosleep$UNIX2003 + 218
    frame #2: 0x002e78e7 mono`wapi_SleepEx(ms=<unavailable>, alertable=1) + 199 at wthreads.c:289 [opt]
    frame #3: 0x002457be mono`ves_icall_System_Threading_Thread_Sleep_internal(ms=100) + 94 at threads.c:1200 [opt]
    frame #4: 0x007eed84
    frame #5: 0x007eebc4
    frame #6: 0x007edb7c
    frame #7: 0x007ed048
    frame #8: 0x007ec898
    frame #9: 0x007ec49c
    frame #10: 0x007ec2cc
    frame #11: 0x007ec078
    frame #12: 0x0077785a
    frame #13: 0x000ad1aa mono`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, exc=<unavailable>) + 714 at mini-runtime.c:2344 [opt]
    frame #14: 0x002724ff mono`mono_runtime_invoke(method=0x7a9c4538, obj=0x00803238, params=<unavailable>, exc=<unavailable>) + 127 at object.c:2783 [opt]
    frame #15: 0x002779fc mono`mono_runtime_delegate_invoke(delegate=0x00803238, params=<unavailable>, exc=<unavailable>) + 92 at object.c:3494 [opt]
    frame #16: 0x0024a4c8 mono`start_wrapper [inlined] start_wrapper_internal + 651 at threads.c:731 [opt]
    frame #17: 0x0024a23d mono`start_wrapper(data=<unavailable>) + 29 at threads.c:772 [opt]
    frame #18: 0x002fae60 mono`inner_start_thread(arg=<unavailable>) + 240 at mono-threads-posix.c:97 [opt]
    frame #19: 0x96342780 libsystem_pthread.dylib`_pthread_body + 138
    frame #20: 0x963426f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #21: 0x9633ff7a libsystem_pthread.dylib`thread_start + 34

  thread #9: tid = 0x12c163, 0x9e00549a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSEventThread'
    frame #0: 0x9e00549a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x9e004884 libsystem_kernel.dylib`mach_msg + 68
    frame #2: 0x9a3a0dc6 CoreFoundation`__CFRunLoopServiceMachPort + 214
    frame #3: 0x9a3a01d1 CoreFoundation`__CFRunLoopRun + 1521
    frame #4: 0x9a39f976 CoreFoundation`CFRunLoopRunSpecific + 390
    frame #5: 0x9a39f7db CoreFoundation`CFRunLoopRunInMode + 123
    frame #6: 0x94bdcdde AppKit`_NSEventThread + 291
    frame #7: 0x96342780 libsystem_pthread.dylib`_pthread_body + 138
    frame #8: 0x963426f6 libsystem_pthread.dylib`_pthread_start + 155
    frame #9: 0x9633ff7a 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.
=================================================================

(lldb) quit

Sometimes when running, I get this message instead:

* Assertion at jit-info.c:175, condition `left < right' not met

mono(3968,0xa3725000) malloc: *** error for object 0x7bc1c564: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

The variables for the public static void BufferData(int bid, ALFormat format, byte[] data, int size, int freq) call are:

bid = 258
data = {byte[4194304]}
format = Mono16
freq = 44100
handle = {System.Runtime.InteropServices.GCHandle}
size = 49774

Did you ever find a solution to this? I'm using the latest dev builds and having the exact same issue you describe here.

Found the cause of the problem for me, for some reason the 32bit version of mono was installed on my system instead of the 64bit version...

I ran into the same issue on my Mac and setting the configuration to x64 fixed it for me, but it seems like there still exists an x86 OpenAL issue in MG that needs to be looked into.

Seems like a bug in Mono. We should test if this still happens.

Since we moved to a different dependencies management and loading method, I believe this have been fixed. Not to mention that MonoKickstart (https://github.com/MonoGame/MonoKickstart/releases/tag/v0.0.12) now uses Mono 5.10 (and is a universal binary) and that OpenAL-Soft is now shipped with MonoGame as universal binary as well.

What I can tell is that none of our games have issues on Mac OS.

Alright, thanks for chiming in! Closing :)

Was this page helpful?
0 / 5 - 0 ratings