Simulator Crashes with Big Sur 11.7.4

Hi Everyone!

After taking a long break from development I’m getting back into one of my projects. My project in 2023.3700 builds/runs normally on Windows 10, but the entire simulator is crashing on MacOSX Big Sur 11.7.4 where I do most of my development. The sample projects seem to be working but not my project.

I tried starting with a sample project and adding my code function by function to see where the problem was. I got it working to the point where it partially loaded the first scene, but it crashes if the scene event listeners are set up. I tried removing everything custom from the scene event handlers. They are just empty functions and it still crashes. This leads me to believe something deep in the framework is broken.

–putting these in breaks it on OSX.
scene:addEventListener( “create”, scene )
scene:addEventListener( “show”, scene )
scene:addEventListener( “hide”, scene )
scene:addEventListener( “destroy”, scene )

Removing plugin references also did not solve the problem. I mostly wanted to see here if anyone else has problems with a given project running on Windows but not OSX. I’m wondering if I need to upgrade my OS… this computer is almost 8 years old.

Here’s part of the dump from the app crash that looked most useful:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libc++abi.dylib 0x00007fff20440371 __cxxabiv1::scan_eh_tab(__cxxabiv1::(anonymous namespace)::scan_results&, _Unwind_Action, bool, _Unwind_Exception*, _Unwind_Context*) + 789
1 libc++abi.dylib 0x00007fff2043ffc5 __gxx_personality_v0 + 181
2 libunwind.dylib 0x00007fff2a621a65 _Unwind_RaiseException + 266
3 libc++abi.dylib 0x00007fff2043fbaa __cxa_throw + 108
4 libobjc.A.dylib 0x00007fff20325ec0 objc_exception_throw + 350
5 com.coronalabs.Corona_Simulator 0x000000010f7e4d72 luai_objcthrow + 16
6 com.coronalabs.Corona_Simulator 0x000000010f7e1d2b luaX_lexerror + 184
7 com.coronalabs.Corona_Simulator 0x000000010f7e56f6 luaY_parser + 138
8 com.coronalabs.Corona_Simulator 0x000000010f7df0e1 f_parser + 89
9 com.coronalabs.Corona_Simulator 0x000000010f7e4b81 luai_objcttry + 25
10 com.coronalabs.Corona_Simulator 0x000000010f7def2e luaD_pcall + 106
11 com.coronalabs.Corona_Simulator 0x000000010f7df065 luaD_protectedparser + 67
12 com.coronalabs.Corona_Simulator 0x000000010f7d7ca3 lua_load + 65
13 com.coronalabs.Corona_Simulator 0x000000010f7d90f7 luaL_loadfile + 383
14 com.coronalabs.Corona_Simulator 0x000000010f7e3e1e loader_Lua + 59
15 com.coronalabs.Corona_Simulator 0x000000010f7de819 luaD_precall + 487
16 com.coronalabs.Corona_Simulator 0x000000010f7dec5e luaD_call + 93
17 com.coronalabs.Corona_Simulator 0x000000010f7d7af7 lua_call + 31
18 com.coronalabs.Corona_Simulator 0x000000010f7e439a ll_require + 330
19 com.coronalabs.Corona_Simulator 0x000000010f7de819 luaD_precall + 487
20 com.coronalabs.Corona_Simulator 0x000000010f7ede8e luaV_execute + 3260
21 com.coronalabs.Corona_Simulator 0x000000010f7dec6f luaD_call + 110
22 com.coronalabs.Corona_Simulator 0x000000010f7e4b81 luai_objcttry + 25
23 com.coronalabs.Corona_Simulator 0x000000010f7def2e luaD_pcall + 106
24 com.coronalabs.Corona_Simulator 0x000000010f7d7b76 lua_pcall + 98
25 com.coronalabs.Corona_Simulator 0x000000010f7d9b45 luaB_pcall + 45
26 com.coronalabs.Corona_Simulator 0x000000010f7de819 luaD_precall + 487
27 com.coronalabs.Corona_Simulator 0x000000010f7ede34 luaV_execute + 3170
28 com.coronalabs.Corona_Simulator 0x000000010f7dec6f luaD_call + 110
29 com.coronalabs.Corona_Simulator 0x000000010f7e4b81 luai_objcttry + 25
30 com.coronalabs.Corona_Simulator 0x000000010f7def2e luaD_pcall + 106
31 com.coronalabs.Corona_Simulator 0x000000010f7d7b76 lua_pcall + 98
32 com.coronalabs.Corona_Simulator 0x000000010f817c4d Rtt::LuaContext::DoCall(lua_State*, int, int) + 99
33 com.coronalabs.Corona_Simulator 0x000000010f817e34 Rtt::LuaContext::DoFile(lua_State*, char const*, int, bool) + 70
34 com.coronalabs.Corona_Simulator 0x000000010f84b97b Rtt::LoadMainTask::operator()(Rtt::Scheduler&) + 279
35 com.coronalabs.Corona_Simulator 0x000000010f84f0b3 Rtt::Scheduler::Run() + 99
36 com.coronalabs.Corona_Simulator 0x000000010f84d7c5 Rtt::Runtime::operator()() + 61
37 com.coronalabs.Corona_Simulator 0x000000010f7a8daa Rtt::MacViewCallback::operator()() + 18
38 com.apple.Foundation 0x00007fff21343e4f __NSFireTimer + 67
39 com.apple.CoreFoundation 0x00007fff2058b629 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
40 com.apple.CoreFoundation 0x00007fff2058b11d __CFRunLoopDoTimer + 927
41 com.apple.CoreFoundation 0x00007fff2058ac7a __CFRunLoopDoTimers + 307
42 com.apple.CoreFoundation 0x00007fff20571883 __CFRunLoopRun + 1988
43 com.apple.CoreFoundation 0x00007fff205709fc CFRunLoopRunSpecific + 563
44 com.apple.HIToolbox 0x00007fff287ba1f3 RunCurrentEventLoopInMode + 292
45 com.apple.HIToolbox 0x00007fff287b9f55 ReceiveNextEventCommon + 587
46 com.apple.HIToolbox 0x00007fff287b9cf3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
47 com.apple.AppKit 0x00007fff22d79b12 _DPSNextEvent + 864
48 com.apple.AppKit 0x00007fff22d782e5 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
49 com.apple.AppKit 0x00007fff22d6a609 -[NSApplication run] + 586
50 com.apple.AppKit 0x00007fff22d3e80c NSApplicationMain + 816
51 libdyld.dylib 0x00007fff20495f3d start + 1

OK, it turns out it was actually was a reference to the admit plugin.

local admob = require( “plugin.admob” )

I had more than one reference to it and hadn’t cleaned them in all the files. Now that I know this is the problem I think I can move forward in troubleshooting. I’ll reply when I find the solution.

I’m genuinely curious as to why you chose mac over windows for development?

I only use a mac for iOS builds because the platform is awful compared to windows 11 for me.

@anon63346430 - honestly the main reason is that my primary computer is a MacBook that I got years ago for school. It still works fine even though it’s older. I do have a nice Windows desktop but it’s downstairs and isolates me from the family. I’m a hobbyist with three young kids and full time job so it’s hard to find time away. The other reason is that I do use Logic Pro extensively and it’s nice to have all my hobby work in one place.

The other reason is that I fix Windows problems all day at work and sometimes it’s nice to use something different. :slight_smile:

So far I can’t figure out why the admob reference crashes the simulator. I verified the plug-in references are all up to date from the latest build. It’s doing this in Big Sur and also the previous OS Catalina.

Update: I determined this bug was introduced in 2023.3697
which looks like it was an update for a newer version of Xcode. Makes sense that it’s crashing on the apple platform. At this point until I upgrade my OS I’ll be stuck at 3696 which still works.