Crash when switching to hardware accelerated in Hexen

Sun Apr 04, 2021 8:03 pm

In the latest dev build (gzdoom-x64-g4.6pre-195-g55ce0510c) when switching from Doom Software Renderer to Hardware Accelerated while in-game, the engine crashes in Hexen unless switching while still in the main menu, before anything is loaded. It only seems to happen with Hexen though. I tried to figure out if any of the rendering options I had set were causing it, but it crashed no matter what, with Vulkan, OpenGL and SoftPoly. I hope this is enough info!

Spoiler: Video

Re: Crash when switching to hardware accelerated in Hexen

Sun Apr 04, 2021 8:33 pm

Adding nullptr checks fixed the problem partially, but not completely.

I suspect that the GL nodes are not loaded properly when the renderer is switched.

Re: Crash when switching to hardware accelerated in Hexen

Mon Apr 05, 2021 3:52 am

It's something about polyobjects. It crashes here in HWWall::DoTexture:
Code:
      // Add this wall to the render list
      sector_t * sec = sub ? sub->sector : seg->frontsector;

Seems sub gets some weird value somewhere (initializing it in HWWall doesn't work).