Pushing result of GetDefaultByType into array causes crash.

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
Posts: 2380
Joined: Thu Feb 11, 2016 9:59 am

Pushing result of GetDefaultByType into array causes crash.

Post by Accensus »

Tested with GZDoom 4.4.1 x64.

The title may be misleading due to character limit. The array is a class array.

Can be reproduced like this:
1. Get Bullet-Eye (that's where I discovered it; guaranteed to crash)
2. Open the mod and navigate to ZActors/Weapons/BEWeaponBase.zsc, Line 345. Where it says

Code: Select all

change that to

Code: Select all

then start a new game, type "summon newweaponcapsule", and shoot it. It will immediately crash to desktop.

I could try to cook up a smaller example if deemed necessary.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48598
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Pushing result of GetDefaultByType into array causes cra

Post by Graf Zahl »

The example is fine. This should have aborted at compile time for a type mismatch, but the compiler does not catch this particular one.

Return to “Bugs [GZDoom]”