VISTA: Crash as a result of Ctrl+Alt+Del/Sleep

Archives Forums/BlitzMax Bug Reports/VISTA: Crash as a result of Ctrl+Alt+Del/Sleep

anawiki(Posted 2007) [#1]
Hi
I received an email that says that my game (Runes of Avalon) crashes as a result of Ctrl+Alt+Del/Sleep on VISTA. It doesn't crash on XP so I guess it's something Vista related. I don't have Vista, so I cannot provide more feedback.

Game was built against the newest 1.24 and mods synced.

best
Roman


Dreamora(Posted 2007) [#2]
The same thing will happen on XP if you set it to Win2k Style, ie when the selection menu appears after ctrl-alt-del which lets you choose the process manager etc.
Thats because the graphics context dies when this specific screen appears and no you can not prevent that. That is meant to happen in the Admin Menu.

You will need to end graphics and reinit graphics in this case. The pixmaps should still be present ie your graphics shouldn't need a reload.

Currently the main problem is that you have no direct function that tells you that this happend (similar to the one B3D got in 1.99).


MGE(Posted 2007) [#3]
I'm not having any problems with this on Vista. I do something like this:

If AppSuspended()
 Try to GrabPixMap() the entire screen.
 If this fails, then I assume the device is lost and needs to be restored coming out of the wait loop. So I set a flag, restore = true.
 While AppSuspended()
  DoWhatEver()
 Wend
 If restore ; re init Graphics()
EndIf



marksibly(Posted 2007) [#4]
Sleep/hibernate etc crash Vista for me regardless of what's going on, so it'll be hard to fix even with sample code...


Dreamora(Posted 2007) [#5]
At least Ctrl-Alt-Del can be solved by correctly resurrecting the graphics device.


marksibly(Posted 2007) [#6]

At least Ctrl-Alt-Del can be solved by correctly resurrecting the graphics device.


Just tried a few samples and they all survived ctrl-alt-del.

Have you got any code that doesn't? If so, post it, otherwise please don't confuse the issue!


anawiki(Posted 2007) [#7]
Well, I installed "resurrecting the graphics device" code, but Oberon say it still crashes. I don't have separated code sample yet except for the game itself.

best
Roman


Leon Drake(Posted 2007) [#8]
i have the same problem with canvas gadgets, i do catch when it goes to and from standby, but when it resumes it seems there is a moment that directx isnt able to perform any operations.