I'm already up really late and tired, but I think I've pinned it down further as to what might be causing it (if my brain could be considered functional now
). A "minimal" code sample is not that easy as the engine is running python scripts, and it can be a bit large to understand the whole layout. But here is a portion my main loop:
// Create the window
Create(title, width, height, bpp, depth, stencil, antialiasing);
// Check that it opened correctly
if (!IsOpened())
{
printf("ERROR: Window could not be opened\n");
return;
}
// Set maximum framerate
SetFramerateLimit(maxfps);
// Enable VSync
EnableVerticalSync(true);
// Enable key repeat
EnableKeyRepeat(false);
// Initialize OpenGL
InitializeGL();
// Initialize state
InitializeState();
// Swap buffers
Display();
// Start main loop
while (IsRunning())
{
// Process events
while (IsEventFull())
{
// Window close
if (GetEventType() == SCREEN_EVENT_CLOSED)
{
// End game
EndGame();
}
// Check input from controllers
CheckInput();
}
// Update State
InputState();
UpdateState();
// Swap buffers
Display();
Now, I have a thin wrapper around SFML stuff, so that's why those methods are different than the standard ones. The error pops up only when closing the program with Command Q. If I close it with checking the red close button, or do a command W and then command Q, it doesn't occur. So it might be something in the registered quit command (the apple menu one, that is autogenerated, because I know I didn't code it
). A program on my end that is just a simple print hello world still does it (just an empty graphical window). With the above input checking code commented out still creates the error. When the IsEventFull (which just calls window.GetEvent(event)) part commented out, it becomes impossible to close the app without hard forcing it.
I hope this info is useful. Of course the source code is online too in those previous links I gave you in case you need to look at something else.
Now off to sleep (hate insomnia)