We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2666

Summary: Mac: SDL_DestroyWindow crashes if the window is FULLSCREEN_DESKTOP and has a large windowed-mode size
Product: SDL Reporter: Alex Szpakowski <amaranth72>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: icculus
Version: HG 2.0   
Hardware: x86_64   
OS: Mac OS X (All)   
Attachments: Test case to trigger the crash

Description Alex Szpakowski 2014-07-30 02:48:52 UTC
Created attachment 1797 [details]
Test case to trigger the crash

When running the current Mercurial revisions of SDL in OS X, SDL_DestroyWindow will cause a crash if the window being destroyed is in FULLSCREEN_DESKTOP mode and its windowed-mode size is as large or nearly as large as the desktop's size.

This seems to be a new bug (or at least the symptoms are new), possibly introduced when changing to/from FULLSCREEN_DESKTOP in OS X with Spaces was changed to block until the transition is complete.

The minimum window size necessary to trigger the crash seems related to the dock size and whether the dock is visible.

I have attached a small test case which can reproduce the issue for me (using Mac OS 10.9.3.)
Comment 1 Ryan C. Gordon 2014-07-31 15:48:53 UTC
Alfred beat me to fixing this last night:

    https://hg.libsdl.org/SDL/rev/e9d67ac0c6f8

--ryan.