Page 1 of 2

[4.1.2->4.2.3] Random hard crashes with outsidefog

Posted: Tue Sep 03, 2019 12:18 pm
by Jimmy
faithless-e2-crashreport.zip
(135.75 KiB) Downloaded 243 times
Happens on E2M6 of my current project.

The project pk3 I'm currently working on and its accompanying level layouts (all heavily WIP) can be found here: https://www.dropbox.com/s/o2mebikkf1ohg ... h.zip?dl=0
No other wads were loaded.

It's difficult to reproduce this crash terribly reliably, but it seems to only occur in maps that use "outsidefog" as defined in MAPINFO. Nine times out of ten, the crash will be a hard freeze and will exit to desktop without an error report at all. Luckily I was able to finally get one by flying around the map a whole bunch.

There are clearly a number of custom factors at play in the map in question, including weather effects, new monsters, new decorations, etc. but I am fairly certain I'm not mistaken in that the fog is the source of the issue. The same random crash seems to occur in E2M9 (if you de-comment the outsidefog parameter in MAPINFO.maps).

Re: [4.1.2/4.2.0] Random hard crashes in maps that use fog

Posted: Thu Sep 05, 2019 12:59 pm
by _mental_
The crash happened here. Does it crash with hardware renderer?

Re: [4.1.2/4.2.0] Random hard crashes in maps that use fog

Posted: Fri Sep 06, 2019 10:38 am
by Jimmy
Haven't gotten a crash in the hardware renderer yet, no. Software renderer was certainly heavily crash-prone for a while. Hard to say if the upgrade to 4.2.0 made the crashes rarer.

Re: [4.1.2/4.2.0] Random hard crashes in maps that use fog

Posted: Sat Sep 07, 2019 1:10 am
by Graf Zahl
So, how could this be fixed? I'm sorry but this is code where I can't do much and I'd prefer to have this gone for the upcoming release.

Re: [4.1.2/4.2.0] Random hard crashes in maps that use fog

Posted: Sat Sep 07, 2019 1:42 am
by _mental_
Hard to say as it doesn't crash for me. Could be related to particular set of options though.

Re: [4.1.2/4.2.0] Random hard crashes in maps that use fog

Posted: Tue Sep 10, 2019 6:32 am
by Jimmy
I can post my config if it helps.

https://www.dropbox.com/s/3o5jrbqy6j0u4 ... 9.ini?dl=1

I just got another crash on E2M9 (again, this map is intended to have fog but the MAPINFO parameter is commented out in the pk3). Sadly didn't get a report this time. Was still using 4.2.0. I'll check if it still happens in 4.2.1.

The crashes are definitely hard to reproduce, it can take maybe 10 minutes of roaming around.

Re: [4.1.2/4.2.0] Random hard crashes in maps that use fog

Posted: Thu Sep 12, 2019 1:25 am
by Jimmy
Confirmed to still happen in 4.2.1.

Re: [4.1.2->4.2.1] Random hard crashes in maps that use fog

Posted: Thu Sep 12, 2019 1:31 am
by Graf Zahl
Well, the software renderer wasn't touched between 4.2.0 and 4.2.1, so this is hardly surprising.

Re: [4.1.2->4.2.1] Random hard crashes in maps that use fog

Posted: Thu Sep 12, 2019 4:22 am
by Rachael
The fog boundary crash is one of those vexing bugs that I haven't been able to fix for years, and it's not for lack of trying. I'm almost convinced that it's unfixable without completely rewriting the whole thing from scratch, and that's not something anyone has time for.

I've run the software renderer under a debugger several times, trying every conceivable fix I could think of, including bounds checking without writing such a horrific thing directly into the actual drawer, to no avail.

If someone finds a way to fix this damn thing, it'd make a ton of maps a lot more playable in the Software renderer, especially Stronghold's "Desert Storm" map, which suffers greatly from this bug. (And if you need a reliable test case for this bug, this is the best one I've found so far)

For whatever it's worth, it seems like the crash happens a lot more frequently when both fog and transparency are at play. Disabling the fog boundary certainly makes it crash less often, but I suspect that it's not the only thing causing issues, here.

Re: [4.1.2->4.2.1] Random hard crashes in maps that use fog

Posted: Thu Sep 12, 2019 4:48 am
by drfrag
I'd swear i moved this to Software Renderer Bugs. Is it okay to move viewtopic.php?f=35&t=62409 there too?

Re: [4.1.2->4.2.1] Random hard crashes in maps that use fog

Posted: Thu Sep 12, 2019 4:50 am
by Rachael
No, leave that where it is. If it's moved it'd have to be merged and it'd just confuse things because that topic is old.

Re: [4.1.2->4.2.1] Random hard crashes in maps that use fog

Posted: Fri Sep 13, 2019 8:01 am
by Rachael
Please try this build (or the next devbuild dated after this post) - it has this commit which seems to solve the STR12 problem for me. More extensive testing will be required, though.

Re: [4.1.2->4.2.1] Random hard crashes in maps that use fog

Posted: Fri Nov 01, 2019 1:11 am
by Jimmy
I just got another hard crash (no report...) with a map that uses outsidefog within two seconds of the level start, using the build posted. outsidefog seems to be the deciding factor, I don't believe I've had a map that just uses fade crash the engine yet.

Should I try 4.2.3 or have there been no changes in this regard between the above build and the latest release?

Re: [4.1.2->4.2.1] Random hard crashes in maps that use fog

Posted: Fri Nov 01, 2019 3:37 am
by drfrag
You should try the latest version. Could be a different crash, what about LZDoom? Where's the map in question?

Re: [4.1.2->4.2.1] Random hard crashes in maps that use fog

Posted: Fri Nov 01, 2019 5:50 am
by Rachael
Jimmy wrote:Should I try 4.2.3 or have there been no changes in this regard between the above build and the latest release?
Yeah, you really need to try 4.2.3 because there have been a ton of changes to the software renderer between 4.2.1 and 4.2.3.

In fact, please always assume to use the latest version (and in the case of crashes, test with a dev build, too)