Page 3 of 4

Re: Lockups occasionally occurring when rendering new things

Posted: Sun Aug 18, 2019 1:48 pm
by Major Cooke
VK_ERROR_DEVICE_LOST again. And that's all I seem to be getting. Though it does crash faster certainly. Less than a minute this time.

Re: Lockups occasionally occurring when rendering new things

Posted: Sun Aug 18, 2019 8:03 pm
by dpJudas
It sounds like you might be running out of video memory (maybe somehow due to a memory leak?), although it is strange that you don't get an explicit out of memory error. The device lost error is unfortunately the most useless thing vulkan can report back.

Re: Lockups occasionally occurring when rendering new things

Posted: Mon Aug 19, 2019 8:57 am
by Major Cooke
Certainly seems to be. The higher the multiplier is, the quicker it'll crash.

I'd hesitate to call it an immediate memory leak. More along the lines of so many different sprites caching, because it's AEons of Death. And there are many... many sprites.

Furthermore I have a WIP addon included which includes some larger sprites (all of which I plan on compressing the sprite file sizes as soon as I'm happy with all of them and they don't need further changes done to them). The monsters in question have 16 sprite angles too. The strange thing is, OpenGL never has this issue. Ever. This makes the vulkan situation all the more bizarre...

I think at this stage, unless you have any other ideas, it may be time for a last resort. If you and/or _mental_ are ready and willing to try and trace it yourselves, I'll send you all the files in a bundle. I'll see about including a simple "LoadMe.pk3" file with GameInfo set up to load all the files for you to make this as smooth as possible for you.

I'll ensure everything's set up so you don't have to change any of the mod's options around to get the effect to replicate. All you'll have to do is start the game, attach the debugger and wait patiently for it to crash - which shouldn't take long at all.

Re: Lockups occasionally occurring when rendering new things

Posted: Mon Aug 19, 2019 12:35 pm
by _mental_
OpenGL driver will silently use main RAM if video memory is exhausted. Vulkan renderer requires explicit memory management in this case.
Unfortunately, I cannot help to debug this issue because I don’t have NVIDIA card in Windows PC.

Re: Lockups occasionally occurring when rendering new things

Posted: Mon Aug 19, 2019 1:04 pm
by Marisa the Magician
After checking that vulkaninfo output it really bothers me that on one of the memory heaps there's a larger budget than its size, which makes no sense and goes against the spec.

Code: Select all

        memoryHeaps[1] :
                size          = 4228358144 (0x1fc07a000) (3.94 GiB)
                budget        = 7670994739

Re: Lockups occasionally occurring when rendering new things

Posted: Mon Aug 19, 2019 1:25 pm
by dpJudas
The strange thing is that, if video memory is exhausted, I would expect our memory allocation library VMA to return an error.

Re: Lockups occasionally occurring when rendering new things

Posted: Mon Aug 19, 2019 1:44 pm
by _mental_
I did some testing on Kubuntu 18.04 notebook with Intel UHD 620 and NVIDIA MX150 (proprietary drivers).
Played MAP30 of Doom II with AEoD 6.66 Alpha 8, texture upscale was 6x.

Intel driver handles out of RAM correctly, and GZDoom exits with the corresponding message.
NVIDIA driver locks up entire system though. It didn’t hang completely, but response to a single key press was like in ten seconds.

On Windows it seems to be more graceful, but still works like crap. Apparently, Vulkan isn’t the primary target for NVIDIA.

Re: Lockups occasionally occurring when rendering new things

Posted: Mon Aug 19, 2019 1:59 pm
by Major Cooke
I'm glad it was at least reproducible... Yeah, on Windows, GZDoom itself locks up but nothing else does, thankfully.

Re: Lockups occasionally occurring when rendering new things

Posted: Mon Aug 26, 2019 7:46 am
by Major Cooke
Only curious but was this commit something I should test to see if the game stops freezing up whenever it runs into an error? Or was that to address something else?

Re: Lockups occasionally occurring when rendering new things

Posted: Mon Aug 26, 2019 8:00 am
by dpJudas
It has a chance of maybe being a fix for it. But only you can tell if it actually did.

Re: Lockups occasionally occurring when rendering new things

Posted: Wed Aug 28, 2019 3:21 pm
by Major Cooke
It didn't help, it seems. But at the same time, I think I found a clue.

If you attempt to do error_fatal in console, instead of showing the box like it's supposed to, it keeps the window from the game and simply shrinks it down. You get nothing out of it otherwise. No dialogue box with the logs or anything.

Re: Lockups occasionally occurring when rendering new things

Posted: Sat Aug 31, 2019 12:20 am
by _mental_
Is this with default settings? I cannot test on NVIDIA graphics hardware, but on AMD fatal errors work fine for me.

Re: Lockups occasionally occurring when rendering new things

Posted: Sat Aug 31, 2019 11:57 am
by Major Cooke
Tested with my regular config file and default. It always happens on my NVidia card with vulkan enabled.

But just so you know, If you test with default settings, vulkan is disabled by default. On top of that, laptops use the default choice between graphics card providers - my intel in this case.

So after generating a brand new config, setting Vulkan back to On and setting the graphics card to Nvidia, this is what it looks like -a shrunken screen with the 'ghost' image frozen in on it. But you can see at the top it says "Fatal Error", caused by me entering the error_fatal command.

Re: Lockups occasionally occurring when rendering new things

Posted: Sat Aug 31, 2019 12:52 pm
by _mental_
Yes, I didn’t describe what I meant by default settings. Options you changes are OK, but could you please check with IWAD only, with and without map loaded?

Re: Lockups occasionally occurring when rendering new things

Posted: Sat Aug 31, 2019 12:55 pm
by Major Cooke
Same results there too. Last frame frozen in place.