[3.7.0] A_CustomPunch armorbonustype param causing VM abort

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
Kinsie
Posts: 7399
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

[3.7.0] A_CustomPunch armorbonustype param causing VM abort

Post by Kinsie »

I'm not entirely sure exactly when this was introduced commit-wise, but 3.7.0 is the first mainline release I was able to find this issue in.

REPRO STEPS:
1.) Load the included DECORATE file into GZDoom.
2.) Give yourself the "TestFist" weapon.
3.) Punch a monster. Preferably right in the nose.

EXPECTED RESULTS:
The monster takes damage or dies, and the player receives some of the inflicted damage back as BasicArmorBonus armor.

OBSERVED RESULTS (FROM 3.7.2):
VM execution aborted: tried to read from address zero.
Called from StateProvider.A_CustomPunch at gzdoom.pk3:zscript/inventory/stateprovider.txt, line 301
Called from TestFist.StateFunction.4 at decorate.txt:DECORATE, line 22
Called from PSprite.Tick at gzdoom.pk3:zscript/shared/player.txt, line 2265
Called from PlayerPawn.TickPSprites at gzdoom.pk3:zscript/shared/player.txt, line 429
Called from PlayerPawn.PlayerThink at gzdoom.pk3:zscript/shared/player.txt, line 1449
Called from weapon state TestFist.4 in TestFist
Called from PSprite.SetState [Native]
Attachments
decorate.txt
Test Weapon
(527 Bytes) Downloaded 31 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [3.7.0] A_CustomPunch armorbonustype param causing VM ab

Post by Graf Zahl »

I think this got introduced when A_CustomPunch was scriptified. There's a bad type cast on the offending line.
User avatar
Kinsie
Posts: 7399
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Re: [3.7.0] A_CustomPunch armorbonustype param causing VM ab

Post by Kinsie »

Thanks for the speedy fix!
Post Reply

Return to “Closed Bugs [GZDoom]”