[Fixed] Fatal Crash When FountainColor var Wraps Below 0 To 255

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.

Fatal Crash When FountainColor var Wraps Below 0 To 255

Postby 22alpha22 » Tue Jun 21, 2022 5:48 am

I managed to get GZDoom to reliably crash while doing some experimenting with a few actor variables related to this post: viewtopic.php?f=122&t=75662
For some reason whenever the FountainColor actor variable is wrapped back around to 255 after being subtracted from 0, GZDoom immediately crashes. I thought it might at first be a problem with UInt8s but other UInt8s such as SmokeCounter are able to wrap around without issue.

I've attached a crash report as well as a simple test wad. Load the wad with any iwad that has a Doom Imp and summon a "FountainImp", simply shoot the Imp and it's FountainColor var will begin decreasing by 1 per tick triggering a crash when it attempts to wrap around to 255.
You do not have the required permissions to view the files attached to this post.
User avatar
22alpha22
So lonely...
 
Joined: 21 Feb 2014
Location: Montana, USA
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Fatal Crash When FountainColor var Wraps Below 0 To 255

Postby Player701 » Tue Jun 21, 2022 6:37 am

This field is used as a sole indicator that the actor is a particle fountain, which gets activated when the value is non-zero (no flags or special properties are required). It is therefore inadvisable to use FountainColor for anything else. There is still a bug here, however, because the value is used to index a static array without proper range checking, which results in undefined behavior (manifesting as a crash).
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Fatal Crash When FountainColor var Wraps Below 0 To 255

Postby Graf Zahl » Tue Jun 21, 2022 11:52 am

fixed
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 2 guests