Rare freeze in Total Chaos with recent devbuilds

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Rare freeze in Total Chaos with recent devbuilds

Postby Marisa Kirisame » Fri Nov 02, 2018 5:30 am

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.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa

Re: Rare freeze in Total Chaos with recent devbuilds

Postby _mental_ » Fri Nov 02, 2018 6:08 am

What's the last version that doesn't freeze?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Rare freeze in Total Chaos with recent devbuilds

Postby Marisa Kirisame » Fri Nov 02, 2018 8:28 am

It's going to take me quite a while to bisect this. Hold on.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa

Re: Rare freeze in Total Chaos with recent devbuilds

Postby _mental_ » Fri Nov 02, 2018 9:52 am

You mentioned recent devbuilds, so I thought you know some versions that don't freeze.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Rare freeze in Total Chaos with recent devbuilds

Postby Marisa Kirisame » Fri Nov 02, 2018 10:17 am

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
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa

Re: Rare freeze in Total Chaos with recent devbuilds

Postby Graf Zahl » Fri Nov 02, 2018 11:24 am

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
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Rare freeze in Total Chaos with recent devbuilds

Postby drfrag » Fri Nov 02, 2018 2:31 pm

Then the vintage build will hang as well, there are devbuilds for it as well.
User avatar
drfrag
I.R developer, I.R smart
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain

Re: Rare freeze in Total Chaos with recent devbuilds

Postby _mental_ » Sat Nov 03, 2018 4:38 am

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?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Rare freeze in Total Chaos with recent devbuilds

Postby Marisa Kirisame » Sat Nov 03, 2018 5:15 am

The freeze still happens in Debug. The while loop on shared_sbar.cpp at line 788 just goes on endlessly.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa

Re: Rare freeze in Total Chaos with recent devbuilds

Postby _mental_ » Sat Nov 03, 2018 7:49 am

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?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Rare freeze in Total Chaos with recent devbuilds

Postby Marisa Kirisame » Sat Nov 03, 2018 5:15 pm

From what I'm getting by stepping repeatedly in gdb, it is exactly that while loop.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa


Return to Bugs

Who is online

Users browsing this forum: No registered users and 2 guests