devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Bug on Windows: game crashes when the PC wakes up from sleep

Open tyomitch opened this issue 5 years ago • 10 comments

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.

tyomitch avatar Apr 05 '20 22:04 tyomitch

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

ghost avatar Apr 05 '20 22:04 ghost

Interesting, ill try and find a laptop to test on :)

AJenbo avatar Apr 05 '20 22:04 AJenbo

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.

tyomitch avatar Apr 06 '20 06:04 tyomitch

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?

AJenbo avatar Apr 06 '20 10:04 AJenbo

Fujitsu Lifebook E752, Windows 10 ver. 1909, SDL 2.0.10: https://youtu.be/obSPmm1D580 (sorry for the shaky phone!)

tyomitch avatar Apr 06 '20 12:04 tyomitch

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?

AJenbo avatar Apr 06 '20 18:04 AJenbo

Looks like it's an Intel GPU

Yes, it's Intel HD Graphics 4000

Could you try SDL 2.0.12?

Still the same :-(

tyomitch avatar Apr 06 '20 18:04 tyomitch

Will it help if I upload a dump file, stopped at a breakpoint after the sleep, with the texture invalidated?

tyomitch avatar Apr 07 '20 17:04 tyomitch

@tyomitch could you test to see if this issue is still present. We are having trouble reproducing it.

AJenbo avatar Oct 22 '21 13:10 AJenbo

@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"

tyomitch avatar Oct 22 '21 14:10 tyomitch