[Fixed] [4.1.0] Crash in software renderer when using mock2 wad

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[4.1.0] Crash in software renderer when using mock2 wad

Postby Mader Levap » Tue Apr 30, 2019 6:53 pm

Run GZDoom (fresh one) with mock2.wad.

Link to Mock2: https://www.doomworld.com/idgames/levels/doom2/Ports/megawads/mock2
How I ran:
Code: Select allExpand view
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 allExpand view
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
Mader Levap
 
Joined: 03 Apr 2015

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

Postby drfrag » Sat Sep 14, 2019 5:25 am

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 allExpand view
 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
drfrag
I.R developer, I.R smart
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain

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

Postby Rachael » Sat Sep 14, 2019 5:36 am

As I've said before, please don't ask me to do these things. Just submit the PR.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

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

Postby drfrag » Sat Sep 14, 2019 7:16 am

Sorry, it was quicker clicking on the link that appears after commiting.
https://github.com/coelckers/gzdoom/pull/932
User avatar
drfrag
I.R developer, I.R smart
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain

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

Postby Rachael » Sat Sep 14, 2019 4:53 pm

Added - thanks.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests