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 - Message boxes crash on X11 if cursor is hidden
Summary: Message boxes crash on X11 if cursor is hidden
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.0
Depends on:
Blocks:
 
Reported: 2013-07-13 09:07 UTC by Sik
Modified: 2013-07-15 14:39 UTC (History)
1 user (show)

See Also:


Attachments
test program that doesn't trigger issue. (457 bytes, text/plain)
2013-07-15 00:56 UTC, Ryan C. Gordon
Details
Test program that shows the behavior (236 bytes, text/plain)
2013-07-15 07:03 UTC, Sik
Details

Note You need to log in before you can comment on or make changes to this bug.
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.