Recently I’ve been experiencing a crash when trying to load in audio at runtime. It happens sporadically with no apparent cause. You can load audio fine for an hour, but then it’ll just randomly crash to desktop. This seems to affect both windows and Mac.
On Mac, the error ‘mono_os_sem_init: semaphore_create failed with error 268640044’.
On windows it gives the error ‘SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’’.
This has been observed in Unity 2018.3.0f2 and 2018.3.14f1.
I get these too occasionally. They are reported to me by end users who run the executable on their mac and pc. They seem to be related to the garbage collector, not to audio. It looks like the GC tries to write to the log file and then crashes.
It may be that this started happening since I turned the “use incremental GC” switch on.
mono_os_sem_init: semaphore_create failed with error 268451842
Obtained 11 stack frames. #0 0x007fff6d5a433a in __pthread_kill #1 0x007fff6d52b808 in abort #2 0x00000112b30df2 in mono_log_write_logfile #3 0x00000112b44dfc in monoeg_g_logv #4 0x00000112b44efd in monoeg_g_log #5 0x00000112b3b3bf in mono_thread_info_attach #6 0x00000112aecaa6 in start_wrapper #7 0x00000112b60d12 in GC_inner_start_routine #8 0x00000112b60ca7 in GC_start_routine #9 0x007fff6d661109 in _pthread_start #10 0x007fff6d65cb8b in thread_start