Builds on MacOS BigSur crashing with EXC_BAD_ACCESS

Hey there!

My team and I have been developing a desktop application for Windows and Mac on Unity 2019.4 LTS.

We’ve spent a few weeks debugging this and haven’t been able to nail down the cause. Application has no issues on Windows, and no crashes on Catalina and some big sur machines. But many Big Sur Users have frequent application crashes. The crash usually starts with a prompt requesting LLDB. Both users that have it and don’t have it still crash.

I’ve attached the crash-report here. We haven’t found anything in here actionable to fix but we’re hoping someone else might know better and point us in the right direction. It seems to point to Unity.Player.dylib and libmono?

6976082–822731–log (1).txt (135 KB)

This is the callstack of the crashed thread:

Thread 64 Crashed:
0   libsystem_kernel.dylib           0x00007fff204bb462 __pthread_kill + 10
1   libsystem_pthread.dylib           0x00007fff204e9610 pthread_kill + 263
2   libsystem_c.dylib                 0x00007fff2043c720 abort + 120
3   UnityPlayer.dylib                 0x0000000100e19712 0x100597000 + 8922898
4   libmonobdwgc-2.0.dylib           0x00000001092c59bd mono_chain_signal + 79
5   libsystem_platform.dylib         0x00007fff2052dd7d _sigtramp + 29
6   ???                               000000000000000000 0 + 0
7                                     0x000000011ea5d78a Normal::Realtime::Client::AutoDisconnectRunLoop() + 90
8                                     0x000000011ea64bde void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (Normal::Realtime::Client::*)(), Normal::Realtime::Client*> >(void*) + 62
9   libsystem_pthread.dylib           0x00007fff204e9950 _pthread_start + 224
10  libsystem_pthread.dylib           0x00007fff204e547b thread_start + 15

Any idea what Normal::Realtime::Client is? Any chance it’s something in your project?

Normal is our networking library that we use. Similar to Photon…

I guess I should talk to the Normal devs instead about this? Is there anything else in this callstack that’s illuminating?

That is probably the best course of action.

Not really. It seems something in Normal dereferences a null pointer. Then it goes into Mono’s signal handler, which checks if it happened in managed code (which would throw a null reference exception). Since it didn’t happen in managed code, it just aborts as it cannot do anything else about it.