[r2204-2232] More than 4 Custom DamageFactors Causes Crash

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
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

[r2204-2232] More than 4 Custom DamageFactors Causes Crash

Post by NeuralStunner »

I didn't think there was that low of a technical limit to how many DamageFactors can be defined. But I'm getting a startup crash, which is technically weird.

I added these to a custom Player Class:

Code: Select all

	DamageFactor "Metal", 0.8 // New Type
	DamageFactor "Magic", 1.0 // New Type
	DamageFactor "Fire", 1.0
	DamageFactor "Electric", 1.0
	DamageFactor "Ice", 1.0
	DamageFactor "Poison", 0.9
	DamageFactor "Disintegrate", 0.9
	DamageFactor "Spirit", 1.0 // New Type
	DamageFactor "Light", 0.9 // New Type
"Disintegrate" was originally "Ether", but having any more new types than this causes an access violation on startup. I don't think it's supposed to do that. (2 of them are only 1.0, and I think that is ignored in the present version, so is the "limit" actually 2?)

Does this happen to anyone else? Can you try the above code in a custom actor, but add (or change Disintegrate into) another DamageType? Doesn't matter what it's called, "TestType" or "HulkSmash" would work.

I won't be able to check in on this until much later, so hopefully that's enough to go on. :|
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Re: [r2204-2232] More than 4 Custom DamageFactors Causes Cra

Post by TheDarkArchon »

Strange, it works for me in r2129.

EDIT: Confirmed crash on r2232
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: [r2204-2232] More than 4 Custom DamageFactors Causes Cra

Post by randi »

NeuralStunner wrote:2 of them are only 1.0, and I think that is ignored in the present version
Ironically, that is why it crashed. They aren't actually ignored but are removed from the damage factors table, and there was a bug there. And it's not like there was any limit, you just got lucky with the names you chose that they exercised this bug.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [r2204-2232] More than 4 Custom DamageFactors Causes Cra

Post by NeuralStunner »

Lucky? Heh. "Well I found a bug, so yes.." :lol:

But nice! This'll come in handy when I get back to my data. :)
User avatar
supergoofy
Posts: 122
Joined: Wed Jan 06, 2010 1:12 am

Re: [r2204-2232] More than 4 Custom DamageFactors Causes Cra

Post by supergoofy »

It's the same with this: http://forum.zdoom.org/viewtopic.php?f=7&t=25402

But yep, you found the bug first :)
Post Reply

Return to “Closed Bugs [GZDoom]”