[Fixed] Crash when rendering portals

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.

Crash when rendering portals

Postby Marisa the Magician » Mon May 16, 2022 8:22 am

After the Vulkan shader compiler was fixed recently, I noticed that this began to happen. As soon as any portal is about to render, there will be a crash.

The backtrace is as follows (triggered by turning around to see the mirror in Kinsie's Test Map):
Code: Select allExpand view
#0  VkRenderPassSetup::CreatePipeline(VkPipelineKey const&) (this=0x55555c557a60, key=...) at /media/Data/Development/active/gzdoom/src/common/rendering/vulkan/renderer/vk_renderpass.cpp:364
#1  0x0000555555917475 in VkRenderPassSetup::GetPipeline(VkPipelineKey const&) (this=0x55555c557a60, key=...) at /media/Data/Development/active/gzdoom/src/common/rendering/vulkan/renderer/vk_renderpass.cpp:346
#2  0x0000555555912027 in VkRenderState::ApplyRenderPass(int) (this=this@entry=0x55555dac57b0, dt=dt@entry=3) at /media/Data/Development/active/gzdoom/src/common/rendering/vulkan/renderer/vk_renderstate.cpp:265
#3  0x000055555591222d in VkRenderState::Apply(int) (this=this@entry=0x55555dac57b0, dt=3) at /media/Data/Development/active/gzdoom/src/common/rendering/vulkan/renderer/vk_renderstate.cpp:191
#4  0x00005555559124e2 in VkRenderState::Draw(int, int, int, bool) (this=0x55555dac57b0, dt=<optimized out>, index=10222, count=4, apply=<optimized out>) at /media/Data/Development/active/gzdoom/src/common/rendering/vulkan/renderer/vk_renderstate.cpp:58
#5  0x00005555558da04b in HWPortal::DrawPortalStencil(FRenderState&, int) (this=0x7fffc8104cc0, state=..., pass=2) at /media/Data/Development/active/gzdoom/src/rendering/hwrenderer/scene/hw_portal.cpp:222
#6  0x00005555558da916 in HWPortal::RemoveStencil(HWDrawInfo*, FRenderState&, bool) (this=this@entry=0x7fffc8104cc0, di=di@entry=0x5555601e43f0, state=..., usestencil=usestencil@entry=false) at /media/Data/Development/active/gzdoom/src/rendering/hwrenderer/scene/hw_portal.cpp:389
#7  0x00005555558d09a8 in HWDrawInfo::RenderPortal(HWPortal*, FRenderState&, bool) (this=this@entry=0x5555601e43f0, p=p@entry=0x7fffc8104cc0, state=..., usestencil=usestencil@entry=false) at /media/Data/Development/active/gzdoom/src/rendering/hwrenderer/scene/hw_drawinfo.cpp:568
#8  0x00005555558d9fdc in FPortalSceneState::RenderPortal(HWPortal*, FRenderState&, bool, HWDrawInfo*) (outer_di=0x5555601e43f0, usestencil=false, state=..., p=0x7fffc8104cc0, this=0x0) at /media/Data/Development/active/gzdoom/src/rendering/hwrenderer/scene/hw_portal.cpp:170
#9  FPortalSceneState::RenderFirstSkyPortal(int, HWDrawInfo*, FRenderState&) (this=this@entry=0x5555568c2340 <portalState>, recursion=0, outer_di=outer_di@entry=0x5555601e43f0, state=...) at /media/Data/Development/active/gzdoom/src/rendering/hwrenderer/scene/hw_portal.cpp:160
#10 0x00005555558d0efc in HWDrawInfo::DrawScene(int) (this=0x5555601e43f0, drawmode=<optimized out>) at /media/Data/Development/active/gzdoom/src/rendering/hwrenderer/scene/hw_drawinfo.cpp:692
#11 0x0000555555ab6157 in RenderViewpoint(FRenderViewpoint&, AActor*, IntRect*, float, float, float, bool, bool) (mainvp=..., camera=<optimized out>, bounds=0x0, fov=90, ratio=1.60000002, fovratio=1.33333302, mainview=true, toscreen=true) at /media/Data/Development/active/gzdoom/src/rendering/hwrenderer/hw_entrypoint.cpp:167
#12 0x0000555555ab7025 in RenderView(player_t*) (player=0x5555568dbfa0 <players>) at /media/Data/Development/active/gzdoom/src/rendering/hwrenderer/hw_entrypoint.cpp:381
#13 0x000055555596aaa1 in operator() (__closure=<optimized out>) at /media/Data/Development/active/gzdoom/src/d_main.cpp:968
#14 std::__invoke_impl<void, D_Display()::<lambda()>&> (__f=<optimized out>) at /usr/include/c++/12.1.0/bits/invoke.h:61
#15 std::__invoke_r<void, D_Display()::<lambda()>&> (__fn=<optimized out>) at /usr/include/c++/12.1.0/bits/invoke.h:111
#16 std::_Function_handler<void(), D_Display()::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=<optimized out>) at /usr/include/c++/12.1.0/bits/std_function.h:290
#17 0x000055555596b6ab in std::function<void ()>::operator()() const (this=0x7fffffffcc10) at /usr/include/c++/12.1.0/bits/std_function.h:591
#18 D_Render(std::function<void ()>, bool) (action=..., interpolate=<optimized out>) at /media/Data/Development/active/gzdoom/src/d_main.cpp:406
#19 0x000055555596c299 in D_Display() () at /media/Data/Development/active/gzdoom/src/d_main.cpp:966
#20 0x000055555596d00d in D_DoomLoop() () at /media/Data/Development/active/gzdoom/src/d_main.cpp:1200
#21 0x0000555555970d85 in D_DoomMain_Internal () at /media/Data/Development/active/gzdoom/src/d_main.cpp:3594
#22 GameMain() () at /media/Data/Development/active/gzdoom/src/d_main.cpp:3624
#23 0x0000555555798c44 in main(int, char**) (argc=<optimized out>, argv=0x7fffffffdfe8) at /media/Data/Development/active/gzdoom/src/common/platform/posix/sdl/i_main.cpp:194
User avatar
Marisa the Magician
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa the Magician#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Crash when rendering portals

Postby Xeotroid » Wed May 18, 2022 7:35 am

Yes, this happens to me too. I wanted to make a new bug report for "crashes on map load on certain maps," good thing I didn't :D. The timeline for me is as follows:
gzdoom-x86-g4.8pre-396-gbeeb5f00a: Last working build, going back fixes the crashes
gzdoom-x64-g4.8pre-399-g2be13e1b9: Crashes in the main menu (fixed now, but maybe relevant?)
gzdoom-x64-g4.8pre-405-gda97269ea: Crashes on viewing skies in any map
Attached are some crash reports for posterity.
You do not have the required permissions to view the files attached to this post.
User avatar
Xeotroid
 
Joined: 23 Jun 2012
Location: Czech Rep.
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Crash when rendering portals

Postby Graf Zahl » Wed May 18, 2022 12:15 pm

fixed. It was another shader index issue.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest