override bool Morph crashes

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom 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.
Post Reply
User avatar
SPZ1
Posts: 388
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois
Contact:

override bool Morph crashes

Post by SPZ1 »

For some reason, adding this code to my DoomPlayer caused it to crash.

https://1drv.ms/u/c/f562b31d53640a9e/Ef ... A?e=HffrDg

Code: Select all

override bool Morph(Actor activator, class<PlayerPawn> playerclass, class<MorphedMonster> monsterclass, int duration, int style, class<Actor> morphflash, class<Actor>unmorphflash){
		
	super.Morph(activator, playerclass, monsterclass, duration, style, morphflash, unmorphflash);
}
User avatar
Rachael
Posts: 13934
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: override bool Morph crashes

Post by Rachael »

Yet another bug with the file system, I can't fix this one because I am not familiar with what Graf was doing with the new system or how it works.

In the future it really does help if you post minimal examples that can be easily run without requiring assembly - that is infinitely more useful than just posting code snippets, and even the crash logs themselves as well.
Attachments
this-crashes-gzdoom.pk3
(443 Bytes) Downloaded 38 times
Boondorl
Posts: 165
Joined: Wed Jul 11, 2018 10:57 pm

Re: override bool Morph crashes

Post by Boondorl »

It's because you're missing the return value. This is a currently known bug with the ZScript parser where for some reason functions that expect a return that don't have one simply crash instead of throwing an error. The likely cause is a missing null check
Post Reply

Return to “Closed Bugs [GZDoom]”