FMultiPatchTexture Infinite Recursion

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
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

FMultiPatchTexture Infinite Recursion

Post by Major Cooke »

Uncertain as to how this happens but I think what goes on is, if someone redefines a sprite while still using the "Patch" word and encounters that sprite, this happens.

Image

Code: Select all

bool FMultiPatchTexture::UseBasePalette() 
{ 
	if (bComplex) return false;
	for(int i=0;i<NumParts;i++)
	{
		if (!Parts[i].Texture->UseBasePalette()) return false;
	}
	return true;
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: FMultiPatchTexture Infinite Recursion

Post by Graf Zahl »

This looks like some texture found itself as patch. Do you have the definition that causes it?
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: FMultiPatchTexture Infinite Recursion

Post by Major Cooke »

Yep. Normally I use this for the sake of rotating things but since that appears dangerous now, I'll avoid this type of practice. Also it doesn't matter if it's patch or sprite defined. Both cause recurrences.

Code: Select all

Sprite X153A0, 256, 256
{
	Offset 128, 128
	Sprite X153A0, 0, -1
	{
		Rotate 90
	}
}
Attachments
test.pk3
Summon A in console.
(9.16 KiB) Downloaded 19 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: FMultiPatchTexture Infinite Recursion

Post by Graf Zahl »

Yeah, not surprising. You actually declared the texture you defined as patch to be used. I'll add a check to skip such definitions and go for the previous one with the same name
Post Reply

Return to “Closed Bugs [GZDoom]”