#193 crash/hang upon invalid mode string

open
nobody
moderate (59)
5
2013-02-08
2013-02-08
galtgendo
No

I'm probably a bit late for 2.8.1, but...
As of r1499, progs/demos/One crashes/hangs upon pressing Escape.
The error is:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 150 (XFree86-VidModeExtension)
Minor opcode of failed request: 10 (XF86VidModeSwitchToMode)
Value in failed request: 0x10e
Serial number of failed request: 1238
Current serial number in output stream: 1240
Terminated.

("Terminated" comes from killall)
This is caused by
glutGameModeString( "640x480:37@300" );
glutEnterGameMode();
which doesn't seem to fail gracefully.
If I put a comment on that glutGameModeString call, so that the previous, completely invalid string is used, the failure is semi graceful - there's no crash/hang, but the fullscreen window is in an incorrect position and once Escape is pressed, there's a dead region in one of the normal windows (that is a region that's not being redrawn).

Discussion