ZDoom / Raze

Build engine port backed by GZDoom tech. Currently supports Duke Nukem 3D, Blood, Shadow Warrior, Redneck Rampage and Powerslave/Exhumed.
683 stars 59 forks source link

[BUG] [SW] GLES2 renderer crash #559

Closed Talon1024 closed 2 years ago

Talon1024 commented 2 years ago

Raze version

Git 351dabdb9

Which game are you running with Raze?

Shadow Warrior

What Operating System are you using?

Linux x86_64

If Other OS, please describe

No response

Relevant hardware info

Intel i3-3110M CPU, Intel HD Graphics 4000 GPU (integrated)

Have you checked that no other similar issue already exists?

A clear and concise description of what the bug is.

If you are using the GLES2 backend and the new renderer, Raze crashes when you attempt to start a new game on the Shadow Warrior "Code of Honor" episode.

Steps to reproduce the behaviour.

Explain how to reproduce

  1. Launch Shadow Warrior
  2. Ensure testnewrenderer is enabled and you are using the OpenGL ES 2.0 backend
  3. Try to start a new game on the "Code of Honor" episode ($whirl.map "Rising Son")
  4. Crash

Your configuration

testnewrenderer=true

Provide a Log

Error I get without running Raze in GDB:

*** Fatal Error ***                                                             
Address not mapped to object (signal 11)                                        
Address: 0x55b2b06ce0a4

GDB Backtrace:

#0  0x0000555555a31ffc in OpenGLESRenderer::FGLRenderState::ApplyShader (
    this=0x555556724c20 <OpenGLESRenderer::gl_RenderState>)
    at ../source/common/rendering/gles/gles_renderstate.cpp:114
#1  0x0000555555a335a8 in OpenGLESRenderer::FGLRenderState::Apply (
    this=0x555556724c20 <OpenGLESRenderer::gl_RenderState>)
    at ../source/common/rendering/gles/gles_renderstate.cpp:425
#2  0x0000555555a33a39 in OpenGLESRenderer::FGLRenderState::Draw (
    this=0x555556724c20 <OpenGLESRenderer::gl_RenderState>, dt=2, index=1436, 
    count=6, apply=true)
    at ../source/common/rendering/gles/gles_renderstate.cpp:545
#3  0x0000555555b69c04 in HWFlat::DrawFlat (this=0x555560284f60, 
    di=0x55556022e9a0, state=..., translucent=false)
    at ../source/core/rendering/scene/hw_flats.cpp:195
#4  0x0000555555b701e0 in HWDrawList::DrawFlats (this=0x55556022ebe0, 
    di=0x55556022e9a0, state=..., translucent=false)
    at ../source/core/rendering/scene/hw_drawlist.cpp:971
#5  0x0000555555b7d080 in HWDrawInfo::RenderScene (this=0x55556022e9a0, 
    state=...) at ../source/core/rendering/scene/hw_drawinfo.cpp:543
#6  0x0000555555b7d707 in HWDrawInfo::DrawScene (this=0x55556022e9a0, 
    drawmode=0, portal=false)
    at ../source/core/rendering/scene/hw_drawinfo.cpp:703
#7  0x0000555555b7d826 in HWDrawInfo::ProcessScene (this=0x55556022e9a0, 
    toscreen=true) at ../source/core/rendering/scene/hw_drawinfo.cpp:729
#8  0x0000555555b5f28a in RenderViewpoint (mainvp=..., bounds=0x0, fov=100, 
    ratio=1.77864587, fovratio=1.33000004, mainview=true, toscreen=true)
    at ../source/core/rendering/hw_entrypoint.cpp:150
#9  0x0000555555b5fe23 in render_drawrooms (
    playersprite=0x555556affd48 <sprite+60264>, position=..., sectnum=36, 
    angle=..., horizon=..., rollang=..., smoothratio=1218.5029836799999)
    at ../source/core/rendering/hw_entrypoint.cpp:365
#10 0x0000555555ffb4dc in ShadowWarrior::drawscreen (
    pp=0x555557a6bf40 <ShadowWarrior::Player>, smoothratio=1218.5029836799999)
    at ../source/games/sw/src/draw.cpp:1609
#11 0x0000555556000148 in ShadowWarrior::GameInterface::Render (
    this=0x555557b88d60) at ../source/games/sw/src/game.cpp:628
#12 0x0000555555afa7b0 in Display () at ../source/core/mainloop.cpp:429
#13 0x0000555555afaf30 in MainLoop () at ../source/core/mainloop.cpp:711
#14 0x0000555555b02f20 in RunGame () at ../source/core/gamecontrol.cpp:1089
#15 0x0000555555b01030 in GameMain () at ../source/core/gamecontrol.cpp:569
#16 0x0000555555959f0d in main (argc=1, argv=0x7fffffffdf28)
    at ../source/common/platform/posix/sdl/i_main.cpp:194
coelckers commented 2 years ago

fixed in 83944a71916d406302404f82ca6c2dc1b4a369d7