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 1969

Summary: Message boxes crash on X11 if cursor is hidden
Product: SDL Reporter: Sik <sik.the.hedgehog>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: 2.0.0Keywords: target-2.0.0
Hardware: x86_64   
OS: Linux   
Attachments: test program that doesn't trigger issue.
Test program that shows the behavior

Description Sik 2013-07-13 09:07:52 UTC
X11 specific bug. If the program calls SDL_ShowCursor(SDL_FALSE) at some point, it results in message boxes crashing (as they can't seem to create the cursor needed for some reason).

Workaround until bug is fixed: make sure to call SDL_ShowCursor(SDL_TRUE) before showing the message box.
Comment 1 Ryan C. Gordon 2013-07-14 22:05:22 UTC
Taking this one.

--ryan.
Comment 2 Ryan C. Gordon 2013-07-15 00:56:48 UTC
Created attachment 1234 [details]
test program that doesn't trigger issue.


I can't reproduce this here. I've attached my simple test program. Do you have something that's a little more complex that triggers it?

--ryan.
Comment 3 Sik 2013-07-15 07:03:19 UTC
Created attachment 1235 [details]
Test program that shows the behavior

Turns out to be more specific than I thought at first. One needs to call SDL_ShowCursor(SDL_FALSE) and then SDL_Quit() in order for it to trigger. Given this is one of the few functions supposed to work even when SDL isn't initialized (as one of its main purposes is to show error messages), this is probably a rather important bug.

This bug doesn't happen if the function is called without SDL having been ever initialized, nor if the cursor is visible when SDL is deinitialized.
Comment 4 Sik 2013-07-15 07:05:38 UTC
Comment on attachment 1235 [details]
Test program that shows the behavior

Turns out to be more specific than I thought at first. One needs to call SDL_ShowCursor(SDL_FALSE) and then SDL_Quit() in order for it to trigger. Given this is one of the few functions supposed to work even when SDL isn't initialized (as one of its main purposes is to show error messages), this is probably a rather important bug.

This bug doesn't happen if the function is called without SDL having been ever initialized, nor if the cursor is visible when SDL is deinitialized.
Comment 5 Ryan C. Gordon 2013-07-15 14:26:33 UTC
Ok, Attachment #1235 [details] definitely crashes for me. Looking into this.

--ryan.
Comment 6 Ryan C. Gordon 2013-07-15 14:39:03 UTC
Fixed in http://hg.libsdl.org/SDL/rev/f2f794cf85c0

Thanks!

--ryan.