GZDoom Crash on Starting Dragon Sector

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
Daryn
Posts: 122
Joined: Wed Jan 23, 2019 10:22 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Professional X64
Graphics Processor: nVidia with Vulkan support

Re: GZDoom Crash on Starting Dragon Sector

Post by Daryn »

The level of detail we're trying for kind of makes it necessary to use a lot of resources. Up to this point, it's not been an issue. Even on a 4GB card we've never had problems. Even with GLPrecache on a GTX 1050 at 1080p, it's been fine. I do plan to look for optimizations we can make, though.

So we're still left with a version of GZDoom that crashes, and one that does not in the same scenario. And given it happens only with Melt, I'm not sure VRAM is the culprit here. Not going to say I know better than you guys, but something about this feels different. Like it's exhibiting a symptom of one problem, but is actually something else.

I don't mean to be stubborn about this, Graf, I'm genuinely perplexed, here.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom Crash on Starting Dragon Sector

Post by Graf Zahl »

If that 6 GB figure with precaching on is correct it WILL crash without precaching as well, just later in the level as the textures get gradually added as needed.
In clear English: If you know there's memory spikes that go above 4 GB you will get problems on such hardware, no matter how it is configured.
The main thing that really changed between 4.7 and 4.10 is IQM model support which adds new info to some buffers that may increase memory use.

On OpenGL the crash occurs in an external worker thread I have no control over, and for Vulkan the best I could do is to error out instead of crashing - but on my side there's very little that can be done once the system runs out of memory.
User avatar
Daryn
Posts: 122
Joined: Wed Jan 23, 2019 10:22 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Professional X64
Graphics Processor: nVidia with Vulkan support

Re: GZDoom Crash on Starting Dragon Sector

Post by Daryn »

Well, Graf, if it wouldn't be too much to ask, could you try it with 4.7.1? The lowest card I have on hand is a GT 1030 2GB, but I can't get its display to work. HDMI port seems to be mangled on it.

I mean, we're okay with being a high-spec map pack, but when I have the VRAM for it, and it's still crashing, it does make me wonder.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom Crash on Starting Dragon Sector

Post by Graf Zahl »

I only had 4.6.1 available - that one does not crash - GPU usage is right below 3GB.
But here's the problem. Some time between 4.7.1 and now the FModelVertex struct got major baggage added, it expanded from 24 bytes to 48 bytes, where most stuff never uses the added data. And your mod loads a lot of models.
My suspicion is that this requires so much more memory that some internal resource gets exhausted far more quickly now.
The same happened with map vertices but these won't eat so much memory because the static array allocates 2'000'000 of them.
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

Re: GZDoom Crash on Starting Dragon Sector

Post by Marisa the Magician »

Well, I can see there are several hundreds of individual models in this.
User avatar
Daryn
Posts: 122
Joined: Wed Jan 23, 2019 10:22 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Professional X64
Graphics Processor: nVidia with Vulkan support

Re: GZDoom Crash on Starting Dragon Sector

Post by Daryn »

Marisa the Magician wrote: Mon Jan 23, 2023 3:36 pm Well, I can see there are several hundreds of individual models in this.
Yes, there are a lot of models in there, but not all of them are in use. A good chunk are, but there's many that are in there 'just in case' right now. I wasn't aware that unused models were loaded too.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom Crash on Starting Dragon Sector

Post by Graf Zahl »

They aren't. The vertex buffers are the only thing that got larger between versions, though.
User avatar
Daryn
Posts: 122
Joined: Wed Jan 23, 2019 10:22 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Professional X64
Graphics Processor: nVidia with Vulkan support

Re: GZDoom Crash on Starting Dragon Sector

Post by Daryn »

Graf Zahl wrote: Mon Jan 23, 2023 1:33 pm I only had 4.6.1 available - that one does not crash - GPU usage is right below 3GB.
But here's the problem. Some time between 4.7.1 and now the FModelVertex struct got major baggage added, it expanded from 24 bytes to 48 bytes, where most stuff never uses the added data. And your mod loads a lot of models.
My suspicion is that this requires so much more memory that some internal resource gets exhausted far more quickly now.
The same happened with map vertices but these won't eat so much memory because the static array allocates 2'000'000 of them.
I suspect you may be onto something, there. Let me propose a theory, and you can tell me I'm an idiot (or not, depending if it's valid. :) ) on what could be happening.

There are two other renderers available, so I tried them both, and tried with the problematic Melt effect enabled.

GLES just straight up refused to load into the map no matter which effect I used. Software Renderer, on the other hand, did load into the map, with Melt, but it took an astonishingly long time to do it.

Meanwhile, with Vulkan or OpenGL, the load time is much faster, but with Melt, I crash out. What if it's not so much running out of VRAM as it is timing out? I'm just taking shots in the dark based on what I'm observing.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom Crash on Starting Dragon Sector

Post by Graf Zahl »

It crashes for me regardless of wipe style. But I have less RAM on my GPU.

Regarding GLES or software rendering, that is rather meaningless. The software renderer does not use any hardware textures or models at all and GLES is meant for low end systems and therefore possibly lacking some features this mod needs.
User avatar
Daryn
Posts: 122
Joined: Wed Jan 23, 2019 10:22 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Professional X64
Graphics Processor: nVidia with Vulkan support

Re: GZDoom Crash on Starting Dragon Sector

Post by Daryn »

Graf Zahl wrote: Mon Jan 23, 2023 4:53 pm It crashes for me regardless of wipe style. But I have less RAM on my GPU.

Regarding GLES or software rendering, that is rather meaningless. The software renderer does not use any hardware textures or models at all and GLES is meant for low end systems and therefore possibly lacking some features this mod needs.
I gotcha. I was only doing those as a test anyway. I noticed models didn't load, but I felt I ought to just try everything I could.
User avatar
CandiceJoy
Posts: 95
Joined: Thu Jul 13, 2017 3:04 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Win11, MacOS Ventura
Graphics Processor: Apple M1

Re: GZDoom Crash on Starting Dragon Sector

Post by CandiceJoy »

So, I've tried several different mods with HEAD (debug builds), and a bunch of mods crash with this error that didn't before. Walpurgis, Project Brutality 3, Heretical Doom, for example. They all crash in exactly the same way as Dragon Sector. These mods all work perfectly fine in release builds. It seems that assertion is just constantly being hit by some mods or somesuch?
User avatar
CandiceJoy
Posts: 95
Joined: Thu Jul 13, 2017 3:04 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Win11, MacOS Ventura
Graphics Processor: Apple M1

Re: GZDoom Crash on Starting Dragon Sector

Post by CandiceJoy »

User avatar
Daryn
Posts: 122
Joined: Wed Jan 23, 2019 10:22 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Professional X64
Graphics Processor: nVidia with Vulkan support

Re: GZDoom Crash on Starting Dragon Sector

Post by Daryn »

Just went through and read the whole conversation. Really insightful, thank you. Just wanted to say thanks again for looking into it, and I absolutely appreciate all the help this community has given us.
User avatar
CandiceJoy
Posts: 95
Joined: Thu Jul 13, 2017 3:04 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Win11, MacOS Ventura
Graphics Processor: Apple M1

Re: GZDoom Crash on Starting Dragon Sector

Post by CandiceJoy »

Daryn wrote: Thu Jan 26, 2023 9:07 pm Just went through and read the whole conversation. Really insightful, thank you. Just wanted to say thanks again for looking into it, and I absolutely appreciate all the help this community has given us.
Of course! <3 Anything I can do to help, just let me know ^_^ <3 This bug *should* only happen in dev builds, so if you're not running a release version, switch over to a release version, and that should fix it for you. That still doesn't explain why debug builds don't work, of course, but :P
User avatar
Daryn
Posts: 122
Joined: Wed Jan 23, 2019 10:22 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Professional X64
Graphics Processor: nVidia with Vulkan support

Re: GZDoom Crash on Starting Dragon Sector

Post by Daryn »

CandiceJoy wrote: Fri Jan 27, 2023 2:34 am
Daryn wrote: Thu Jan 26, 2023 9:07 pm Just went through and read the whole conversation. Really insightful, thank you. Just wanted to say thanks again for looking into it, and I absolutely appreciate all the help this community has given us.
Of course! <3 Anything I can do to help, just let me know ^_^ <3 This bug *should* only happen in dev builds, so if you're not running a release version, switch over to a release version, and that should fix it for you. That still doesn't explain why debug builds don't work, of course, but :P
Hm, well, I'm getting the crash on the 4.10 release. Unless the crash I'm getting is another thing. My yeah, my crash dumps were from 4.10.

Return to “Closed Bugs [GZDoom]”