Page 1 of 1

SpawnKoraxMissile() lacks a null check for target

Posted: Tue Feb 20, 2018 2:06 pm
by Blue Shadow
Tested with: 3.2.5 (64-bit)

Check this post. It might be very difficult to make it abort with the original Korax class, but if you had a modified one with a code like this for instance:
Spoiler:
It becomes easier, provided the target somehow ceases to exist during the attack sequence (think of a monster that disappears completely after death, like the Lost Soul).

Edit: Here's something to test: https://www.dropbox.com/s/x28gf610dm1ui ... g.pk3?dl=1

Load the file with Hexen and go to MAP40. Enter the first chamber where Korax* is. Summon TestDemon1. It's a friendly chaos serpent which disappears at the end of its death sequence. Let it and Korax fight each other, and if it dies and disappears while Korax is in its attack sequence, you'll get the abort.

* This is a modified Korax, made to make it easier to produce the problem.

Re: SpawnKoraxMissile() lacks a null check for target

Posted: Wed Feb 21, 2018 9:43 am
by _mental_
Is there ready to use sample to reproduce this issue quickly?

Re: SpawnKoraxMissile() lacks a null check for target

Posted: Wed Feb 21, 2018 11:42 am
by Blue Shadow
Load the file with Hexen and go to MAP40. Enter the first chamber where Korax* is. Summon TestDemon1. It's a friendly chaos serpent which disappears at the end of its death sequence. Let it and Korax fight each other, and if it dies and disappears while Korax is in its attack sequence, you'll get the abort.
korax_bug.pk3
* This is a modified Korax, made to make it easier to produce the problem.[/s]

Edit: For convenience, I added this to the first post.

Re: SpawnKoraxMissile() lacks a null check for target

Posted: Thu Feb 22, 2018 8:56 am
by _mental_
Fixed in 12eb760. By the way pre-ZScript versions just crashed in this case.