[4.1.2->4.2.3] Random hard crashes with outsidefog

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.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [4.1.2->4.2.3] Random hard crashes with outsidefog

Re: [4.1.2->4.2.3] Random hard crashes with outsidefog

by drfrag » Sun Nov 03, 2019 5:50 pm

I know why it doesn't crash in LZDoom, i disabled models by default for the Carmack renderer with a new CVAR.

Re: [4.1.2->4.2.3] Random hard crashes with outsidefog

by Graf Zahl » Sat Nov 02, 2019 10:17 am

Open Paint, create image of size 256x256, save as sky1.png and put it in a zip inside the textures/ folder.

Re: [4.1.2->4.2.3] Random hard crashes with outsidefog

by drfrag » Sat Nov 02, 2019 10:11 am

Any wad with a 256 pixel tall sky for testing? To find the new "magic numbers".

Re: [4.1.2->4.2.3] Random hard crashes with outsidefog

by drfrag » Fri Nov 01, 2019 12:01 pm

Crashes drawing fog boudaries again, takes a while.

Code: Select all

 	[Inline Frame] gzdoom.exe!swrenderer::DrawFogBoundaryLinePalCommand::Execute(DrawerThread *) Line 3012	C++
 	[Inline Frame] gzdoom.exe!DrawerCommandQueue::Push(const swrenderer::SpanDrawerArgs &) Line 207	C++
 	gzdoom.exe!swrenderer::SWPalDrawers::DrawFogBoundaryLine(const swrenderer::SpanDrawerArgs & args) Line 289	C++
 	[Inline Frame] gzdoom.exe!swrenderer::SpanDrawerArgs::DrawFogBoundaryLine(swrenderer::RenderThread * x2, int) Line 149	C++
 	gzdoom.exe!swrenderer::RenderFogBoundary::RenderSection(swrenderer::RenderThread * thread, int y, int y2, int x1) Line 155	C++
>	gzdoom.exe!swrenderer::RenderFogBoundary::Render(swrenderer::RenderThread * thread, int x1, int x2, const short * uclip, const short * dclip, const swrenderer::ProjectedWallLight & wallLight) Line 149	C++
 	gzdoom.exe!swrenderer::RenderDrawSegment::Render(swrenderer::DrawSegment * ds, int x1, int x2, swrenderer::Fake3DTranslucent clip3DFloor) Line 126	C++

		b2	18587	int
		rcolormap	13	int
		t2	0	int
-		this	0x00000029ea4e4860 {spanend=0x00000029ea4e4860 {1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, ...} ...}	swrenderer::RenderFogBoundary *
+		spanend	0x00000029ea4e4860 {1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, ...}	short[5000]
+		drawerargs	{dc_normal={X=9.96917072e-36 Y=9.96917072e-36 Z=9.96917072e-36 } dc_viewpos={X=9.96917072e-36 Y=9.96917072e-36 ...} ...}	swrenderer::SpanDrawerArgs
-		thread	0x000001f47659d050 {Scene=0x000001f476dc6a78 {dontmaplines=false clearcolor=0 Threads={ size=1 } ...} ...}	swrenderer::RenderThread *
+		Scene	0x000001f476dc6a78 {dontmaplines=false clearcolor=0 Threads={ size=1 } ...}	swrenderer::RenderScene *
		X1	0	int
		X2	1366	int
		MainThread	true	bool
+		FrameMemory	unique_ptr {UsedBlocks={ size=2 } FreeBlocks={ size=3 } }	std::unique_ptr<RenderMemory,std::default_delete<RenderMemory> >
+		OpaquePass	unique_ptr {floorclip=0x000001f47736cca0 {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ...} ...}	std::unique_ptr<swrenderer::RenderOpaquePass,std::default_delete<swrenderer::RenderOpaquePass> >
+		TranslucentPass	unique_ptr {Thread=0x000001f47659d050 {Scene=0x000001f476dc6a78 {dontmaplines=false clearcolor=0 Threads={ size=1 } ...} ...} ...}	std::unique_ptr<swrenderer::RenderTranslucentPass,std::default_delete<swrenderer::RenderTranslucentPass> >
+		SpriteList	unique_ptr {SortedSprites=Size = 71 Sprites=Size = 71 StartIndices=Size = 0 }	std::unique_ptr<swrenderer::VisibleSpriteList,std::default_delete<swrenderer::VisibleSpriteList> >
+		Portal	unique_ptr {Thread=0x000001f47659d050 {Scene=0x000001f476dc6a78 {dontmaplines=false clearcolor=0 Threads={ size=1 } ...} ...} ...}	std::unique_ptr<swrenderer::RenderPortal,std::default_delete<swrenderer::RenderPortal> >
+		Clip3D	unique_ptr {Thread=0x000001f47659d050 {Scene=0x000001f476dc6a78 {dontmaplines=false clearcolor=0 Threads={ size=1 } ...} ...} ...}	std::unique_ptr<swrenderer::Clip3DFloors,std::default_delete<swrenderer::Clip3DFloors> >
+		PlayerSprites	unique_ptr {Thread=0x000001f47659d050 {Scene=0x000001f476dc6a78 {dontmaplines=false clearcolor=0 Threads={ size=1 } ...} ...} ...}	std::unique_ptr<swrenderer::RenderPlayerSprites,std::default_delete<swrenderer::RenderPlayerSprites> >
+		PlaneList	unique_ptr {Thread=0x000001f47659d050 {Scene=0x000001f476dc6a78 {dontmaplines=false clearcolor=0 Threads={ size=1 } ...} ...} ...}	std::unique_ptr<swrenderer::VisiblePlaneList,std::default_delete<swrenderer::VisiblePlaneList> >
+		DrawSegments	unique_ptr {SegmentGroups=Size = 1 Thread=0x000001f47659d050 {Scene=0x000001f476dc6a78 {dontmaplines=false clearcolor=...} ...} ...}	std::unique_ptr<swrenderer::DrawSegmentList,std::default_delete<swrenderer::DrawSegmentList> >
+		ClipSegments	unique_ptr {newend=0x000001f4772d8428 {first=0 last=0 } solidsegs=0x000001f4772d8408 {{first=-32767 last=32767 }, ...} }	std::unique_ptr<swrenderer::RenderClipSegment,std::default_delete<swrenderer::RenderClipSegment> >
+		Viewport	unique_ptr {WorldToView={Matrix=0x000001f476b19020 {-0.990902662, 0.000000000, 0.134580702, 0.000000000, 0.134580702, ...} } ...}	std::unique_ptr<swrenderer::RenderViewport,std::default_delete<swrenderer::RenderViewport> >
+		Light	unique_ptr {BaseVisibility=8.0000000000000000 WallVisibility=1761.5946335280241 FloorVisibility=2.1361814905496854 ...}	std::unique_ptr<swrenderer::LightVisibility,std::default_delete<swrenderer::LightVisibility> >
+		DrawQueue	shared_ptr {commands={ size=0 } FrameMemory=0x000001f46e75d960 {UsedBlocks={ size=2 } FreeBlocks={ size=3 } } } [3 strong refs] [default]	std::shared_ptr<DrawerCommandQueue>
+		AddedLightsArray	Size = 0	TArray<FDynamicLight *,FDynamicLight *>
+		thread	{_Thr={_Hnd=0x0000000000000000 _Id=0 } }	std::thread
+		clipbot	0x000001f47659d0f8 {707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, ...}	short[12000]
+		cliptop	0x000001f4765a2eb8 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...}	short[12000]
+		tc_drawers	unique_ptr {...}	std::unique_ptr<swrenderer::SWTruecolorDrawers,std::default_delete<swrenderer::SWTruecolorDrawers> >
+		pal_drawers	unique_ptr {...}	std::unique_ptr<swrenderer::SWPalDrawers,std::default_delete<swrenderer::SWPalDrawers> >
		x1	1365	int
BTW 240 tall skies are not properly stretched (r_skymode 1), will fix it later, i said tall skies needed testing. There's another one 544 pixels tall but that's too big.

Re: [4.1.2->4.2.3] Random hard crashes with outsidefog

by drfrag » Fri Nov 01, 2019 11:33 am

Just got a crash with changemap here in FLevelLocals::DoCompleted, this line:

Code: Select all

	if (deathmatch &&
->		(*dmflags & DF_SAME_LEVEL) &&
		!(flags & LEVEL_CHANGEMAPCHEAT))
I already warned about that, looked suspicious to me.

Code: Select all

>	gzdoom.exe!FLevelLocals::DoCompleted(FString nextlevel, wbstartstruct_t & wminfo) Line 851	C++
 	gzdoom.exe!G_DoCompleted() Line 814	C++
 	gzdoom.exe!G_Ticker() Line 1087	C++
 	gzdoom.exe!TryRunTics() Line 1994	C++
 	gzdoom.exe!D_DoomLoop() Line 1046	C++
 	gzdoom.exe!D_DoomMain_Internal() Line 2807	C++
 	gzdoom.exe!D_DoomMain() Line 2819	C++
 	gzdoom.exe!DoMain(HINSTANCE__ * hInstance) Line 953	C++
 	gzdoom.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * nothing, wchar_t * cmdline, int nCmdShow) Line 1281	C++

Re: [4.1.2->4.2.3] Random hard crashes with outsidefog

by drfrag » Fri Nov 01, 2019 10:40 am

I've reproduced the crash in GZDoom but not in LZDoom, there was another crash and i thought GZDoom was not affected.
It was this commit: "- Fixed another crash in the software renderer now with transparent sprites (Stronghold STR12), it's a bit hacky and now you get a white flash instead."
But might be something else.

Re: [4.1.2->4.2.3] Random hard crashes with outsidefog

by Rachael » Fri Nov 01, 2019 9:59 am

Thank you, I will take a look when I can.

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

by Jimmy » Fri Nov 01, 2019 9:47 am

The crash is persisting in 4.2.3.

Check out the following maps in this Heretic set - E2M6, E2M9, and E3M7. The crashes have suddenly gotten very frequent for me. All you have to do is walk around engaging with gameplay for maybe up to a minute and before long a CTD with no report will occur.

E3M6 is a map with fade as opposed to outsidefog, and hasn't crashed once.

https://www.dropbox.com/s/3qzvc50c9m0p1 ... p.pk3?dl=1

Config:
https://www.dropbox.com/s/cv8a1n6hjh90z ... 9.ini?dl=1

EDIT: If it helps, I've now confirmed that crashes also occur in these maps using the true-color SW renderer.

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

by Rachael » Fri Nov 01, 2019 5:50 am

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)

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

by drfrag » Fri Nov 01, 2019 3:37 am

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

by Jimmy » Fri Nov 01, 2019 1:11 am

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

by Rachael » Fri Sep 13, 2019 8:01 am

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

by Rachael » Thu Sep 12, 2019 4:50 am

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

by drfrag » Thu Sep 12, 2019 4:48 am

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

by Rachael » Thu Sep 12, 2019 4:22 am

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.

Top