[Fixed] Crash in 4.7pre when precaching model textures

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Crash in 4.7pre when precaching model textures

Postby 0mnicydle » Fri Jun 25, 2021 7:51 pm

I’m getting a crash in the current dev build of GZDoom (Win64) that I’m not seeing in 4.6 when preloading model textures in BoA C3 using a quick and dirty brute force mapinfo/gameinfo precachetextures (needed since gl_precache doesn’t cover models for reasons that go over my head). I think I have narrowed it down to the font overhaul in this commit:

https://github.com/coelckers/gzdoom/com ... 3041c96cd7

It’s hard to narrow it down to this commit 100% because along with this commit, there were a few commits after where many things including this mod will fail to launch anyway due to another bug in 5f02b92 regarding empty fonts that was fixed in 36e84a3, but I see the font overhaul hit some of the texture stuff so I’m just guessing it’s more likely to be the culprit than the commits that followed.

It crashes at startup, but only because this mod uses a titlemap instead of a titlepic that itself has some of the models on it, and this crash would otherwise happen at map load not startup. There is no error message unfortunately, or any useful console output that I’ve been able to log.

This is kind of a sporadic bug that can be a bit of a pain to reproduce, and it seems to be a little random unfortunately. I first started seeing this crash when using dev GZDoom with dev BoA, but I’ve since been able to reproduce it with the initial C3 release using dev GZDoom as well.

Load order to reproduce is boa.ipk3 (or dev folder), boa_dt.pk3 (displacement maps, included with the original C3 mod zip, or in the tools/launcher/distribution folder of the current dev BoA), and a mapinfo with gameinfo block that precaches all png and jpg files in the models folder. One very strange thing is whether or not boa_dt.pk3 is loaded can have a big influence on whether or not the crash happens. In my case with BoA dev versions the crash is more likely to occur with it loaded, and in the initial release it’s more likely to happen without it—so try it several times each way if unable to reproduce at first.

I’m really afraid this bug won’t get looked at cuz everyone is gonna read this and be like, ‘aw hell no, ain’t nobody got time for that!’ But I do hope someone can look into this because since gl_precache doesn’t cover models, the hitching w/out this workaround is unbearable and I’d hate to lose this previously reliable workaround.

Welp for anyone willing to be my hero and give this a looksie, here is a mapinfo for the initial C3 release:

Spoiler:


And one for the current dev build:

Spoiler:
User avatar
0mnicydle
 
Joined: 27 Jun 2013

Re: Crash in 4.7pre when precaching model textures

Postby Graf Zahl » Sat Jun 26, 2021 1:05 am

It won't crash for me. I suspect an out of memory condition. What's your system specs?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Crash in 4.7pre when precaching model textures

Postby 0mnicydle » Sat Jun 26, 2021 6:57 am

NVIDIA 2080 Ti 12GB (stock), i9-9900K (stock), 64GB 3600MHz (XMP), SSD storage, Win 10 64-bit, default GZDoom ini. It works every time up until 5f02b92-36e84a3 range, with 36e84a3 being the first time the mod can launch again at all. Ever since then, precaching model textures seems to fail, but not consistently. It seems it at least has to be a very large amount like this, and this is the only mod I have with this many model textures to load.

And like I said, whether or not the displacement textures are also loaded plays a role in if the crash is gonna happen or not, and the fact that it's one way for the dev version and another for the release version is really throwing me for a loop. Did you try running several consecutive times each way? Because another weird thing is sometimes I can get it to work again once and only once by switching back to the other config for a run. So for example, let's say displacement textures loaded seems to be working pretty reliably for me on the release version; first time I switch to displacement textures not being loaded everything works, and then crashes every subsequent launch with that config. If I switch back to using displacement textures to get it working again, and switch back to not loading them, that first time it may work correctly again w/out but crash every subsequent time. It's been really maddening trying to nail it down completely.

I ran some memory tests just to make sure I didn't have a faulty module or something, but found nothing, and I never get the crash under any circumstances prior to 5f02b92. One thing I will try is running my RAM at JEDEC defaults and report back...
User avatar
0mnicydle
 
Joined: 27 Jun 2013

Re: Crash in 4.7pre when precaching model textures

Postby _mental_ » Sat Jun 26, 2021 7:15 am

Please post a complete crash report. Without it, all these long explanations are mostly useless.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Crash in 4.7pre when precaching model textures

Postby 0mnicydle » Sat Jun 26, 2021 7:27 am

Removing the RAM OC did not improve the situation.

How do I post a crash report? There is no error message with this crash, and there is nothing relevant if I log the console. Is there something I can look for in Windows Event Viewer that could shed light on this?
User avatar
0mnicydle
 
Joined: 27 Jun 2013

Re: Crash in 4.7pre when precaching model textures

Postby 0mnicydle » Sat Jun 26, 2021 7:29 am

I see some errors like this in Event Viwer:

Faulting application name: gzdoom.exe, version: 4.6.9999.0, time stamp: 0x60d675ec
Faulting module name: ntdll.dll, version: 10.0.19041.1081, time stamp: 0x088bf621
Exception code: 0xc0000374
Fault offset: 0x00000000000ff199
Faulting process id: 0x1da4
Faulting application start time: 0x01d76a8e5bb573c3
Faulting application path: D:\Games\DOOM\gzdoom\gzdoom.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 2016cccc-552c-435e-bcaa-718b8d7ce99f
Faulting package full name:
Faulting package-relative application ID:
User avatar
0mnicydle
 
Joined: 27 Jun 2013

Re: Crash in 4.7pre when precaching model textures

Postby _mental_ » Sat Jun 26, 2021 8:07 am

When GZDoom crashes, it should display this window. In some rare circumstances, it may not pop up. Although, I have no idea how you managed to trigger stack overflow.
Post exact versions of everything you loaded, and files loading order too.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Crash in 4.7pre when precaching model textures

Postby 0mnicydle » Sat Jun 26, 2021 8:51 am

As I said, there are no error messages/windows. Straight CTD.

Files:

Any GZDoom dev build 36e84a3 or newer (first version after 5f02b92 that doesn't have the divide by zero empty font error with BoA, which did have the error window btw).

Nothing in dir except GZDoom requisites (libraries taken either from 4.6 release in case of building myself, otherwise whatever comes with DRD dev builds--makes no difference either way) and the following files:

boa.ipk3 (from initial C3 release that was subsequently taken down due to controversy)
boa_dt.pk3 (included in initial C3 release package)
mapinfo.txt (in my first post)

command line:

Code: Select allExpand view
gzdoom -file boa_dt.pk3 mapinfo.txt


In my case boa_dt.pk3 will either have to be included or not to trigger the crash depending on if you are doing this with the initial BoA C3 release or dev version. The same crash will happen with dev versions of BoA, in which case I make a dummy ipk3 that just has the iwadinfo in it and load the mod as a folder, with command line like this:

Code: Select allExpand view
gzdoom -file .\wolfendoom-master .\wolfendoom-master\tools\launcher\distribution\boa_dt.pk3 mapinfo.txt


Again, whether you load boa_dt.pk3 or not has a big influence on whether or not the crash happens, but I can't tell you for sure which way is more likely because it seems to differ between release and dev BoA for some reason, which is incredibly weird to me.

Also, the list of textures is slightly different between release and dev, so make sure to use the right one in my first post with the one for dev being at least accurate as of the time of my posting: current BoA dev commit ebb816eec04626b8de7d653dc09f36d4ec932820
User avatar
0mnicydle
 
Joined: 27 Jun 2013

Re: Crash in 4.7pre when precaching model textures

Postby _mental_ » Sun Jun 27, 2021 1:18 am

The given BoA commit doesn't crash for me even with Debug configuration using the latest GZDoom commit at the moment.
Are you sure that it crashes without config and autoexec files?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Crash in 4.7pre when precaching model textures

Postby 0mnicydle » Sun Jun 27, 2021 8:06 am

_mental_ wrote:Are you sure that it crashes without config and autoexec files?


Yes absolutely. Doesn't matter if I built it myself, or download from DRD, all I have to do is place a current dev build of GZDoom in an empty directory, place the BoA files in that directory, place my mapinfo in that directory, and use the command line I gave.

But here's the thing, it may crash only very infrequently depending on if boa_dt.pk3 is also loaded or not. Let's say without it, it will only crash 1 out of 10 times, or 1 out of 20, or whatever the exact average works out to... But with boa_dt.pk3 the situation is reversed and I'd have to launch 10 or 20 times before I get one successful launch. But whether it's more or less likely to fail w/ or w/out boa_dt.pk3 depends on which version of BoA I'm using. So I will just speak to how it works for me on dev right now since that's what you're using:

With boa_dt.pk3 loaded and no model precaching: never crash
Without boa_dt.pk3 loaded and no model precaching: never crash

With boa_dt.pk3 loaded and with model precaching via mapinfo: crashes most of the time, occasionally works
Without boa_dt.pk3 loaded and with model precaching via mapinfo: works most of the time, occasionally crashes

I have done everything I can think of to troubleshoot on my end and move my Windows config etc closer to baseline defaults to find any strange interactions at work and I can't find anything that influences it. Windows is up to date, all my drivers are up to date etc. I've tried everything short of trying on a fresh install of Windows. I don't have any hardware faults I can find, or problems with other software etc, and builds prior to 5f02b92 don't have this issue.

I am not a programmer but I have a working VS environment that I use to build a number of projects that I follow. I am open to the possibility of building a debug build if someone can tell me what to do to at least capture some useful information about this crash.
User avatar
0mnicydle
 
Joined: 27 Jun 2013

Re: Crash in 4.7pre when precaching model textures

Postby _mental_ » Sun Jun 27, 2021 8:53 am

If you can build GZDoom yourself, post callstack from Debug build. It's much slower than Release, but it loads BoA in a reasonable amount of time.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Crash in 4.7pre when precaching model textures

Postby 0mnicydle » Sun Jun 27, 2021 10:07 am

OK I am having a REALLY hard time getting it to crash in the debug build for some reason (which might explain why no one has been able to reproduce so far), but I will keep at it. In the meantime, here is the call stack from the release build crash:

Spoiler:
User avatar
0mnicydle
 
Joined: 27 Jun 2013

Re: Crash in 4.7pre when precaching model textures

Postby Rachael » Sun Jun 27, 2021 10:13 am

It's crashing in ntdll which means that the problem is system related. Is it maybe running out of memory? Is it actually able to access the files in question without errors? If the disk is corrupt in that specific spot it can cause odd errors like that.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Crash in 4.7pre when precaching model textures

Postby _mental_ » Sun Jun 27, 2021 10:16 am

It’s mostly useless. Strange that it crashes in sndfile though.
Please load symbols for system libraries like ntdll. It's in context menu of callstack window.

EDIT: To enable debug information in Release build, add /Zi to CMAKE_C_FLAGS_RELEASE and CMAKE_CXX_FLAGS_RELEASE CMake variables, and /DEBUG to CMAKE_EXE_LINKER_FLAGS_RELEASE variable.
The same can be done for ZMusic. The third variable should be CMAKE_SHARED_LINKER_FLAGS.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Crash in 4.7pre when precaching model textures

Postby 0mnicydle » Sun Jun 27, 2021 10:32 am

I only see "Load Symbols" on project related files, the option isn't there on ntdll.dll... do I have to do something else first? Sorry for being so useless :(

I still haven't been able to get a single crash in the debug version. Did anyone else try with a release build already?


EDIT/ reviewing the extra info in your edit now mental, maybe it answers my question...
User avatar
0mnicydle
 
Joined: 27 Jun 2013

Next

Return to Closed Bugs

Who is online

Users browsing this forum: Warrex and 1 guest