[4.1.0] Crash in software renderer when using mock2 wad

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.
Post Reply
User avatar
Mader Levap
Posts: 18
Joined: Fri Apr 03, 2015 3:39 pm

[4.1.0] Crash in software renderer when using mock2 wad

Post by Mader Levap »

Run GZDoom (fresh one) with mock2.wad.

Link to Mock2: https://www.doomworld.com/idgames/level ... wads/mock2
How I ran:

Code: Select all

gzdoom.exe -iwad doom2.wad -file your_path_to_mock2\Mock2.wad
In menu set Options->Set video mode->Doom Software Renderer (from Hardware accelerated).

Will crash on the spot when starting new game. It also will crash if you start game in Mock 2 using normal renderer, then change renderer to Doom Software Renderer. In this case it will crash when you restart level.

I have crash report, but I do not see any way to attach it here. Summary:

Code: Select all

Code: C0000094 (Integer Divide By Zero)
Address: 00007FF7EB621480
I do not know if any other wads are affected - I checked with doom2.wad and everything seems to work fine. I discovered it accidentally - 6th level in Mock 2 utterly destroy my computer for some reason (mere 720 cyberdemons and their rockets, pah). It is playable on software renderer, but then I've got killed and game crashed after restarting level...
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3196
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4.1.0] Crash in software renderer when using mock2 wad

Post by drfrag »

Fixed.

@Rachael : if it's okay you could apply the Git patch and add (patch by drfrag). I don't think doing a PR for this is worth but i could.

Code: Select all

 src/rendering/swrenderer/textures/r_swtexture.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rendering/swrenderer/textures/r_swtexture.cpp b/src/rendering/swrenderer/textures/r_swtexture.cpp
index 89f6f3bda..bc502dabf 100644
--- a/src/rendering/swrenderer/textures/r_swtexture.cpp
+++ b/src/rendering/swrenderer/textures/r_swtexture.cpp
@@ -68,7 +68,7 @@ FSoftwareTexture::FSoftwareTexture(FTexture *tex)
 	auto info = tex->CreateTexBuffer(0, CTF_CheckOnly| mBufferFlags);
 	mPhysicalWidth = info.mWidth;
 	mPhysicalHeight = info.mHeight;
-	mPhysicalScale = mPhysicalWidth / tex->Width;
+	mPhysicalScale = tex->Width > 0? mPhysicalWidth / tex->Width : mPhysicalWidth;
 	CalcBitSize();
 }
 
User avatar
Rachael
Posts: 13953
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [4.1.0] Crash in software renderer when using mock2 wad

Post by Rachael »

As I've said before, please don't ask me to do these things. Just submit the PR.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3196
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4.1.0] Crash in software renderer when using mock2 wad

Post by drfrag »

Sorry, it was quicker clicking on the link that appears after commiting.
https://github.com/coelckers/gzdoom/pull/932
User avatar
Rachael
Posts: 13953
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [4.1.0] Crash in software renderer when using mock2 wad

Post by Rachael »

Added - thanks.
Post Reply

Return to “Closed Bugs [GZDoom]”