Rare freeze in Total Chaos with recent devbuilds
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.
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.
- 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
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.
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.
Re: Rare freeze in Total Chaos with recent devbuilds
What's the last version that doesn't freeze?
- 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
It's going to take me quite a while to bisect this. Hold on.
Re: Rare freeze in Total Chaos with recent devbuilds
You mentioned recent devbuilds, so I thought you know some versions that don't freeze.
- 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
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.
- Graf Zahl
- 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
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.
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.
- 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
Then the vintage build will hang as well, there are devbuilds for it as well.
Re: Rare freeze in Total Chaos with recent devbuilds
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?
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?
- 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
The freeze still happens in Debug. The while loop on shared_sbar.cpp at line 788 just goes on endlessly.
Re: Rare freeze in Total Chaos with recent devbuilds
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?
- 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
From what I'm getting by stepping repeatedly in gdb, it is exactly that while loop.