Using Last Warrior again, if I go down into the arena, use the ripper heart and then fight the monster and die, the game crashes.
Here is the save file.
[Shadow Warrior] [0.4.0] Crash with the Heart weapon
Moderator: Raze Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
-
Dynamo
- Posts: 1044
- Joined: Sat Jun 07, 2008 5:58 am
- Location: Industrial District
-
Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [Shadow Warrior] [0.4.0] Crash with the Heart weapon
Same cause as all the other SW crashes I saw so far: When the player dies, some associated data gets invalidated and filled with garbage values but all references to this invalidated data is retained - and when it gets accessed later the game crashes. In this case things are made worse by the inability to check for the data being invalid.
-
Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [Shadow Warrior] [0.4.0] Crash with the Heart weapon
Found the place where I could hook in. This simply did not invalidate pointers to a deleted sprite and later could access stale data. I added code to clean out these pointers, so now they are null. This most likely means it will crash more often now, because instead of reading invalid data and making bogus decisions based on it, it will now outright crash in the place where the invalid access takes place, making them easier to fix.
-
sinisterseed
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: [Shadow Warrior] [0.4.0] Crash with the Heart weapon
So essentially breaking first in order to fix? I like this
.
-
Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [Shadow Warrior] [0.4.0] Crash with the Heart weapon
No, making the existing breakage show itself more clearly.
-
sinisterseed
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: [Shadow Warrior] [0.4.0] Crash with the Heart weapon
Ah, I got it backwards I guess.
I wonder what other causes for crashes are there, because they can occur under other circumstances too - see my other Random Crash topic for instance, that one was a crash I experienced while warping between levels.
I wonder what other causes for crashes are there, because they can occur under other circumstances too - see my other Random Crash topic for instance, that one was a crash I experienced while warping between levels.
-
Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [Shadow Warrior] [0.4.0] Crash with the Heart weapon
Probably the same thing. The general problem here was that when the player died, the enemies' target pointers to it weren't cleared and pointed to invalid data, so depending on what that data contained it could randomly crash a lot later.