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 2027 - Full-screen appears to be broken - crash in SDL_DestroyWindow
Summary: Full-screen appears to be broken - crash in SDL_DestroyWindow
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 critical
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.0
Depends on:
Blocks:
 
Reported: 2013-08-10 06:02 UTC by Rainer Deyke
Modified: 2013-08-11 22:57 UTC (History)
0 users

See Also:


Attachments
test program (1.63 KB, text/x-c++src)
2013-08-10 06:02 UTC, Rainer Deyke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Deyke 2013-08-10 06:02:01 UTC
Created attachment 1281 [details]
test program

I'm running Linux Mint 15 with the Cinnamon window manager.  SDL_DestroyWindow consistently locks up for me when the window if fullscreen.  See the attached test program: test case 0 (windowed mode) works, but test cases 1-3 (SDL_WINDOW_FULLSCREEN_DESKTOP, SDL_WINDOW_FULLSCREEN without mode change, and SDL_WINDOW_FULLSCREEN with mode change respectively) all lock up in the call to SDL_DestroyWindow, requiring a 'kill -9'.
Comment 1 Sam Lantinga 2013-08-10 13:59:49 UTC
This sounds pretty serious and I'd like to get a fix for this before release on Monday.  I haven't seen this before. Have you attached a debugger to find out what's happening?
Comment 2 Rainer Deyke 2013-08-11 02:57:00 UTC
The problem seems to be on line 1194 of SDL_x11window.c, in the X11_EndWindowFullscreenLegacy function.  The line looks like this:

    XIfEvent(display, &ev, &isMapNotify, (XPointer)&data->xwindow);

Replacing the blocking XIfEvent call with a non-blocking XCheckIfEvent seems to fix the problem, but I can't tell if this is actually correct or if this breaks something else.
Comment 3 Sam Lantinga 2013-08-11 22:57:34 UTC
I think that fix is okay here.  Thanks!
http://hg.libsdl.org/SDL/rev/d6a8fa507a45