Simulator crash on Mac OS Sonoma

@vlads Tagging you as I thought this was major enough. Not sure if everyone else using the latest build on MacOS 14.0 is facing the same issue but I just upgraded and simulator crashes on all projects immediately on launching.

Had to upgrade from 13.4 because of Xcode-- the FB SDK that is being used in Solar2D is apparently not compatible with older Xcode so I needed to upgrade the OS and am now in the process of updating Xcode.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSMallocBlock__ UTF8String]: unrecognized selector sent to instance 0x600000e300c0'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007ff81027ab5e __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007ff80fd705ff objc_exception_throw + 48
	2   CoreFoundation                      0x00007ff81031fb6d -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007ff8101e8f58 ___forwarding___ + 1379
	4   CoreFoundation                      0x00007ff8101e8968 _CF_forwarding_prep_0 + 120
	5   network.dylib                       0x00000001159df853 -[NetworkRequestState pushToLuaState:] + 1160
	6   network.dylib                       0x00000001159dfdd8 -[LuaCallback callWithNetworkRequestState:] + 272
	7   network.dylib                       0x00000001159ddf0c -[CoronaConnectionDelegate connectionDidFinishLoading:] + 1659
	8   CFNetwork                           0x00007ff8152b8ba8 CFURLRequestSetHTTPCookieStorageAcceptPolicy + 7207
	9   CFNetwork                           0x00007ff8152b8af8 CFURLRequestSetHTTPCookieStorageAcceptPolicy + 7031
	10  CFNetwork                           0x00007ff8152b8a3d CFURLRequestSetHTTPCookieStorageAcceptPolicy + 6844
	11  CFNetwork                           0x00007ff8152cabd6 CFURLResponseSetRecommendedCachePolicy + 3648
	12  CFNetwork                           0x00007ff81541d4b5 _CFNetworkErrorGetLocalizedDescription + 453058
	13  libdispatch.dylib                   0x00007ff80ff8559a _dispatch_client_callout + 8
	14  libdispatch.dylib                   0x00007ff80ff885dc _dispatch_block_invoke_direct + 274
	15  CFNetwork                           0x00007ff81528f570 CFHTTPMessageGetTypeID + 74359
	16  CoreFoundation                      0x00007ff8101cbdc8 CFArrayApplyFunction + 62
	17  CFNetwork                           0x00007ff81528f4ac CFHTTPMessageGetTypeID + 74163
	18  CFNetwork                           0x00007ff81528f361 CFHTTPMessageGetTypeID + 73832
	19  CoreFoundation                      0x00007ff810208a26 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	20  CoreFoundation                      0x00007ff8102089c9 __CFRunLoopDoSource0 + 157
	21  CoreFoundation                      0x00007ff810208798 __CFRunLoopDoSources0 + 215
	22  CoreFoundation                      0x00007ff810207408 __CFRunLoopRun + 919
	23  CoreFoundation                      0x00007ff810206a69 CFRunLoopRunSpecific + 557
	24  HIToolbox                           0x00007ff81af389d9 RunCurrentEventLoopInMode + 292
	25  HIToolbox                           0x00007ff81af387e6 ReceiveNextEventCommon + 665
	26  HIToolbox                           0x00007ff81af38531 _BlockUntilNextEventMatchingListInModeWithFilter + 66
	27  AppKit                              0x00007ff8137700c5 _DPSNextEvent + 880
	28  AppKit                              0x00007ff814061150 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1304
	29  AppKit                              0x00007ff81376163a -[NSApplication run] + 603
	30  AppKit                              0x00007ff813735670 NSApplicationMain + 816
	31  dyld                                0x00000002026bc3a6 start + 1942
)
libc++abi: terminating due to uncaught exception of type NSException
[Finished in 2.8s with exit code -6]
[cmd: '/Applications/Corona-3698/Corona Simulator.app/Contents/MacOS/Corona Simulator' -singleton 1 -no-console 1 '/Users/shashwat/Desktop/ping game May 2022/main.lua']
[dir: /Users/shashwat/Desktop/ping game May 2022/scripts/helperScripts]
[path: /Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin]

While I do run into other compatibility issues on the older 3696 build, the above issue is not present there on the same OS version

Hi,

I am also experiencing crashes in Sonoma (macOS 14+) and the latest Solar SDK build (2023.3698). I have tracked down the reason: a callback in the network request. Please copy/paste the bottom code to main.lua and run it. I believe it is urgent to fix the issue since we cannot build older projects using the network library.

Thanks!


print(“print 1”)

network.request(“https://google.com”, “GET”, function()
–crash is here
print(“crash callback”)
end)

print(“print 2”)

1 Like

this definitely produces a similar crash. I hope that this is the only reason for the crash and appreciate that you were able to make the effort to identify what’s causing this. I don’t recall having much network code in the projects which I tested but some of them are fairly big and the errors were very vague so I doubt I’d have narrowed down on anything anytime soon.

This certainly is something that needs looking at on priority. iOS builds are pretty much impossible at this point.

Build 3696 works. Crashes above build 3696.

For me is crashing with display.captureBounds()

Same stack here network.request and iOS 17 app crashes - #3 by ftsirigotis, which has been fixed.
(Not for crash with display.captureBounds(), it’s for network.request())