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 922

Summary: SDL_Quit hangs
Product: SDL Reporter: g.stoet
Component: *don't know*Assignee: Sam Lantinga <slouken>
Status: RESOLVED WORKSFORME QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2 CC: icculus, spam
Version: 1.2.14   
Hardware: All   
OS: Linux   
Attachments: system info

Description g.stoet 2010-01-04 08:14:10 UTC
Created attachment 476 [details]
system info

I found that on Ubuntu (9.10, up to date as of today), SDL_Quit does not respond.
It seems Ubuntu specific (see later).

This happened to me on different computers and hardware all using this Ubuntu 9.10. Mode and resolution do not matter, it always happens. I have coded a lot in SDL, and I am sure I do not make any mistakes.

I use SDL 1.2.14. I have attached system info, but as said, it happened not only with Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller, but also with nvidia. Ubuntu 9.10 uses Xorg 1.6.4.

As a temporary fix, I could not use SDL_Quit, and my software works. But that seems opposite to the SDL recommendations.

I use the same code on Gentoo, with the latest and newest drivers and packages, and this problem does not occur. It thus seems that this is Ubuntu specific. But given that Ubuntu is so much used, I thought you might be interested to hear about this. I also noticed that SDL-Ball (in the ubuntu repositories) has a similar problem, it does not quit, and it leaves the laptop is the wrong resolution; therefore, could it be that when SDL asks Xwindows to go back to a different mode, it hangs?. 

If this is a purely Ubuntu issue, I probably should file the bug there instead of here, but I would love to hear your take on this issue.

Thank you for your time and help in this matter.
Comment 1 Sam Lantinga 2010-07-20 00:23:26 UTC
If you run it under the debugger and break the program while it is hung in SDL_Quit(), what do you get in the stack trace?
Comment 2 abma 2010-11-07 20:00:21 UTC
i've got an similar problem:

http://springrts.com/mantis/view.php?id=2170

maybe the backtrace in comment (0005723) helps...
Comment 3 abma 2011-01-24 15:55:35 UTC
maybe this answers all the problems:
http://stackoverflow.com/questions/4372312/c-sdl-threading-events-break-down
Comment 4 Ryan C. Gordon 2011-12-30 00:48:30 UTC
This appears to have been a bug outside of SDL. We should probably close this as WORKSFORME.

--ryan.
Comment 5 abma 2011-12-30 03:34:41 UTC
i guess its a gpu-driver bug or at least related to a specific driver...