[HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

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.
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: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Graf Zahl »

Actually, what ZDoom is doing here is fundamentally unsafe.
The safest thing to do is to clear the TabCommands in NameManager's destructor - because we know for sure that afterward it points to invalid data.

The fact that this array is the only thing in the game that contains special handling for preventing the constructor to run should be a big warning sign that it's also a bad thing to let the destructor run uncontrolled.
vanfanel
Posts: 97
Joined: Thu Mar 24, 2016 6:04 pm

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by vanfanel »

@Graf Zahl: I have just built ZDOOM + SmoothDoom with latest git (Using both GCC 5.x and gcc 6.xx, on X86) and it's still crashing on exit...
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: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Graf Zahl »

Then this is a different crash.
vanfanel
Posts: 97
Joined: Thu Mar 24, 2016 6:04 pm

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by vanfanel »

Can you replicate it? You have to build with GCC 5.x or 6.x on x86.
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: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Graf Zahl »

I do not use Linux, so no.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Edward-san »

The crash didn't change much:
Spoiler:
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by JPL »

My (x86-64) system has GCC 6.2.1 20160830 and GZDoom + SmoothDoom doesn't crash on exit when compiled with that.
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: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Graf Zahl »

Ok, seems like there was another possibility to call FindName in there. Should be fixed now.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Edward-san »

Now valgrind is clear, but I guess running with '-norun' doesn't show the issue shown by the crash report in OP. See the attached valgrind's result with this zdoom command line:

Code: Select all

zdoom -iwad DOOM2.WAD -file SmoothDoom.pk3 -warp 01 -nosound
then open menu and quit.

I had to zip it because the output is too big...

(also I removed some valgrind output which can be reproduced also without SmoothDoom.pk3)
Attachments
valgrind_smoothdoom.zip
(5.27 KiB) Downloaded 29 times
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Edward-san »

This should be moved back to 'Bugs' section, since the original issue is not yet fixed.
User avatar
Hetdegon
Posts: 321
Joined: Sat Oct 30, 2004 12:55 pm
Graphics Processor: nVidia with Vulkan support
Location: Chireiden

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Hetdegon »

Hey, just to confirm, I get this issue too, although it seems to happen with pretty much anything. It's not much of a problem for regular usage except it never gets to save config changes. The error I get is exactly the same as the first post (using gzdoom, current git 2.3pre on ubuntu 64b). Should I post a log and extra info for reference?
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Matt »

I seem to be getting this with pretty much every pk3 or folder weapon mod except ww-doomnukem and Demonsteele while playing as Shihong (while spawning as Hae-Lin results in the crash). No idea why those two are fine.

EDIT:
On the HD thread, Hetdegon wrote:...but it's a bit painful when changing options as it doesn't save the changes.
Is this at all helpful as a lead? Maybe something to do with saving configuration settings on exit? (I'm taking a wild guess that it might be related to how and where this stuff is saved, which is why there's no problem in Windows)
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Matt »

Was playing HD running around with the chainsaw on map01, quit, no crash but got this:

Code: Select all

*** Error in `/home/mchan223/doom/./gzdoom': corrupted double-linked list: 0x0000000002f57770 ***
Related?
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Matt »

Is it just me or does the crash not happen when you exit while your weapon is in a raising or lowering state?
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: [HEAD, Linux, X86] Zdoom + SmoothDoom.pk3 crash on exit

Post by Graf Zahl »

Can be, because since P_BringUpWeapon is in the call trace and that won't be called if the weapon is already being raised or lowered.

Can you please retry with my latest commit? The destruction of the inventory list was heavily littered with side effects, so I went the extra route of cleaning all the inventory links before destroying the items, making sure that they no longer are in a list or linked to an owner. Normally this should be enough to fix this problem.
Post Reply

Return to “Closed Bugs [GZDoom]”