SpawnKoraxMissile() lacks a null check for target

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: SpawnKoraxMissile() lacks a null check for target

Re: SpawnKoraxMissile() lacks a null check for target

by _mental_ » Thu Feb 22, 2018 8:56 am

Fixed in 12eb760. By the way pre-ZScript versions just crashed in this case.

Re: SpawnKoraxMissile() lacks a null check for target

by Blue Shadow » Wed Feb 21, 2018 11:42 am

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

by _mental_ » Wed Feb 21, 2018 9:43 am

Is there ready to use sample to reproduce this issue quickly?

SpawnKoraxMissile() lacks a null check for target

by Blue Shadow » Tue Feb 20, 2018 2:06 pm

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.

Top