SDL/src/video/cocoa
Sam Lantinga 5c5ba0e331 Fixed bug 4394 - Crash in SDL_PumpEvents() after SDL_DestroyWindow()
Cameron Gutman

After updating to SDL 2.0.9, I got a user report that my app was crashing when closing a SDL_WINDOW_FULLSCREEN window to return to my Qt-based UI. It looks like the dead SDL window is getting a spurious updateLayer call which is causing SDL to dereference a null SDL_WindowData pointer.

For some reason, this only happens when using SDL_WINDOW_FULLSCREEN and not windowed or SDL_WINDOW_FULLSCREEN_DESKTOP. I was also unsuccessful in my attempt to get a simple reproducer for this crash. The Session.cpp code is available 688c4a90d9/app/streaming/session.cpp but I slightly modified it (adding a SDL_PumpEvents() call at 1179 to immediately trigger the issue, otherwise it happened when Qt next pumped the event loop).

The crashing line is:

    NSMutableArray *contexts = data->nscontexts;
2018-11-19 21:35:59 -08:00
..
SDL_cocoaclipboard.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoaclipboard.m Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoaevents.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoaevents.m Fixed whitespace 2018-09-24 11:49:25 -07:00
SDL_cocoakeyboard.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoakeyboard.m Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoamessagebox.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoamessagebox.m Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoametalview.h metal: Fix high dpi and resizing on macOS, and clean up iOS code. Fixes bug #4250. 2018-10-12 17:55:42 -03:00
SDL_cocoametalview.m metal: Fix high dpi and resizing on macOS, and clean up iOS code. Fixes bug #4250. 2018-10-12 17:55:42 -03:00
SDL_cocoamodes.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoamodes.m Small stack allocations fall back to malloc if they're unexpectedly large. 2018-10-22 20:50:32 -04:00
SDL_cocoamouse.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoamouse.m Temporary fix for bug 3432 - macOS 10.12: small scrolls (1 wheel notch) don't generate events 2018-03-10 21:13:50 -08:00
SDL_cocoamousetap.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoamousetap.m macOS: Fix a crash when the video subsystem quits, if SDL_MAC_NO_SANDBOX was defined when SDL was compiled. 2018-09-30 11:26:41 -03:00
SDL_cocoaopengl.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoaopengl.m cocoa: Put a mutex around GL_SwapBuffers. 2018-10-18 23:38:27 -04:00
SDL_cocoaopengles.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoaopengles.m Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoashape.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoashape.m Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoavideo.h cocoa: Put a mutex around GL_SwapBuffers. 2018-10-18 23:38:27 -04:00
SDL_cocoavideo.m cocoa: Put a mutex around GL_SwapBuffers. 2018-10-18 23:38:27 -04:00
SDL_cocoavulkan.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_cocoavulkan.m macOS: Fixed MoltenVK dynamic library loading code. 2018-10-12 23:23:52 -03:00
SDL_cocoawindow.h Some drag'and'drop improvements. 2018-08-02 16:03:47 -04:00
SDL_cocoawindow.m Fixed bug 4394 - Crash in SDL_PumpEvents() after SDL_DestroyWindow() 2018-11-19 21:35:59 -08:00