keeperfx icon indicating copy to clipboard operation
keeperfx copied to clipboard

Parchment crash fix (attempt)

Open rainlizard opened this issue 1 year ago • 2 comments

Reported by Pleb Crusher, I'm unable to reproduce this issue myself.

Here is his crash log: keeperfx.log

rainlizard avatar Jun 30 '24 16:06 rainlizard

I had this crash sometimes before 1.0 and haven't found a way to reproduce it either. My observations at the time were that this happened if I click-spam while the cursor is not yet displayed (so shortly after loading).

walt253 avatar Jul 01 '24 12:07 walt253

I had this crash sometimes before 1.0 and haven't found a way to reproduce it either. My observations at the time were that this happened if I click-spam while the cursor is not yet displayed (so shortly after loading).

Reproduce by disabling splash screens and heart zoom and press M on a level with rooms asap. Or have the cursor top left and click to open the map.

Loobinex avatar Jul 01 '24 19:07 Loobinex

I have investigated and it crashed because the render_ghost is initialized when the level is drawn. With the skip heart zoom option it is possible to go to the map before display_drawlist is called, and thus render_ghost is not initialized before entering the map.

The render_ghost is then used while drawing resized sprites on the parchment map, crashing the game. I updated the fix to initialize the variables on the map too in case they are uninitialized.

Loobinex avatar Jul 04 '24 00:07 Loobinex