Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Getting an SDL2 error (macOS) after entering main loop:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'

*** First throw call stack:
(
0 CoreFoundation 0x00007fffce00b62b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffe32481da objc_exception_throw + 48
2 AppKit 0x00007fffcc1f9ef2 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4480
3 libSDL2.dylib 0x0000000000590c9b Cocoa_PumpEvents + 247
4 libSDL2.dylib 0x0000000000530568 SDL_PumpEvents_REAL + 23
5 libSDL2.dylib 0x00000000005305d0 SDL_WaitEventTimeout_REAL + 57
6 ??? 0x0000000022bfadce 0x0 + 582987214
)