Bug on Windows: game crashes when the PC wakes up from sleep
If I close and reopen my laptop during the game, it crashes with
SDL Error LockRect(): INVALIDCALL The error occurred at: ....\SourceX\dx.cpp line 264
I have absolutely no experience with SDL, but I've managed to put together a workaround. Improvements are welcome.
Congratulations :tada:. DeepCode analyzed your code in 1.109 seconds and we found no issues. Enjoy a moment of no bugs :sunny:.
👉 View analysis in DeepCode’s Dashboard
Interesting, ill try and find a laptop to test on :)
Interesting, ill try and find a laptop to test on :)
I don't currently have a desktop PC, but I suppose you can get the same effect there by pressing the power button during the game, to send the PC to sleep.
I was unable to replicate this both on Linux, and windows 10.
Could you give some specs for you machine and sdl version your using?
Fujitsu Lifebook E752, Windows 10 ver. 1909, SDL 2.0.10: https://youtu.be/obSPmm1D580 (sorry for the shaky phone!)
Looks like it's an Intel GPU, the Windows machine I tested on had an AMD GPU. I do have a machine with an Intel GPU, but it doesn't have Windows installed.
Could you try SDL 2.0.12?
Looks like it's an Intel GPU
Yes, it's Intel HD Graphics 4000
Could you try SDL 2.0.12?
Still the same :-(
Will it help if I upload a dump file, stopped at a breakpoint after the sleep, with the texture invalidated?
@tyomitch could you test to see if this issue is still present. We are having trouble reproducing it.
@tyomitch could you test to see if this issue is still present. We are having trouble reproducing it.
Yes, the same, except that the failing assertion is now at "....\Source\dx.cpp line 313"