Rare freeze in Total Chaos with recent devbuilds

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
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Rare freeze in Total Chaos with recent devbuilds

Post by Marisa the Magician »

Sometimes while doing inventory management in the mod, there's a chance gzdoom will freeze up completely out of the blue. I haven't been able to figure out what exactly causes this, as the mod only provides compiled ACS.

Here's a stack trace, here. From what I've been able to tell in gdb, DBaseStatusBar::DetachMessage enters an infinite loop. I'd send in a full coredump but it's 5GB in size. Even compressed it's still supermassive.

I'm linking a save here. Just open the inventory and hover over some items, move them around, etc. Eventually the freeze should happen.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Rare freeze in Total Chaos with recent devbuilds

Post by _mental_ »

What's the last version that doesn't freeze?
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Rare freeze in Total Chaos with recent devbuilds

Post by Marisa the Magician »

It's going to take me quite a while to bisect this. Hold on.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Rare freeze in Total Chaos with recent devbuilds

Post by _mental_ »

You mentioned recent devbuilds, so I thought you know some versions that don't freeze.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Rare freeze in Total Chaos with recent devbuilds

Post by Marisa the Magician »

I have bad news. The last commit that doesn't seem to have the bug no matter how hard I try is e4d2ec8, and, unfortunately, I cannot track down which of the commits after it introduced the bug, because the vast majority of them won't compile or just crash on launch. a388b6c is the oldest commit that works AND has the bug, and it's 20 commits apart from the last good one. I would first go for anything that touches the DHUDMessage class.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Rare freeze in Total Chaos with recent devbuilds

Post by Graf Zahl »

So it was probably the thing I added just for you - i.e. serialization of the BrokenText class. All changes in that area are connected to it.
Do I need to say that I absolutely hate linked list data structures? They provide little to no advantage in most cases but endless trouble if something goes wrong.

This is a textbook example where a vector would have been better, but this code is simply too old.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Rare freeze in Total Chaos with recent devbuilds

Post by drfrag »

Then the vintage build will hang as well, there are devbuilds for it as well.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Rare freeze in Total Chaos with recent devbuilds

Post by _mental_ »

Did someone else experience this problem? Because I cannot reproduce it and there are no other reports in Total Chaos topic.
Now let me guess. It freezes with GZDoom built by GCC with -O3 optimization level (and maybe with -O2), right? Did you tried with Debug configuration?
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Rare freeze in Total Chaos with recent devbuilds

Post by Marisa the Magician »

The freeze still happens in Debug. The while loop on shared_sbar.cpp at line 788 just goes on endlessly.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Rare freeze in Total Chaos with recent devbuilds

Post by _mental_ »

OK, this rules out the misoptimization. Still, are you sure that this loop executes infinitely? I'm trying to figure out, do we really have a cycle in that linked list?
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Rare freeze in Total Chaos with recent devbuilds

Post by Marisa the Magician »

From what I'm getting by stepping repeatedly in gdb, it is exactly that while loop.
Post Reply

Return to “Closed Bugs [GZDoom]”