[Fixed] [6f694260] Crash at map start with Vulkan

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.

[6f694260] Crash at map start with Vulkan

Postby vsonnier » Tue Jun 07, 2022 12:09 pm

Hi Graf and all, I just noticed that on the most recent master (post 4.8) the mod I play with, Brutal Doom Black Edition (https://www.moddb.com/mods/brutal-doom/ ... ck-edition) crashes at startup
with a message "Could not create vulkan image: initialization failed".

It works without any mod loaded of course. I quickly reduced the scope to the fact that the mod is playing a TITLEMAP at startup.

So here it is: as a minimal reproducer, it contains only the MAPS/TITLEMAP.wad from the original mod. All the resources are absent but it doesn't prevent the titlemap from loading properly (in 4.8) or crashing (in master).

I hope it is enough to investigate.

BTW, congrats for v4.8 !

Edit : starts crashing at commit 40872a2b

Regards,

Vincent

Update : Has nothing to do with TITLEMAP, see below, so I updated the title. Removed the linked file.
Last edited by vsonnier on Wed Jun 08, 2022 12:42 pm, edited 3 times in total.
vsonnier
 
Joined: 11 Apr 2019
Github ID: vsonnier
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: [6f694260] Crash at startup with a TITLEMAP

Postby Graf Zahl » Tue Jun 07, 2022 3:23 pm

You have to post your INI. I can't get it to crash so it must be some PP element combination I did not think of.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [6f694260] Crash at startup in Vulkan

Postby vsonnier » Wed Jun 08, 2022 11:37 am

You are right, I investigated further, and it turns out it has nothing to do with a TITLEMAP, it crashes simply at loading a simple DOOM2 MAP01.

Since the TITLEMAP was automatically played, that was the first thing I saw :)

I likely resolves around my particular Vulkan configuration, because:
- Fresh generated gzdoom-user.ini : OK for Vulkan, OK for OpenGL (backend selected at startup dialog)
- My gzdoom-Crash.ini with my particular settings : crash for Vulkan, OK for OpenGL (backend selected at startup dialog)

So somewhere my additional settings trigger the problem.

For what it is worth, I've reproduced the problem runing in VS 2022 x64 in a Debug configuration. It crashs at the same place whatever I force execution on HD 630 or Geforce 1050 Ti (Mobile) so it looks universal (for me)

Here is the error and trace :

Code: Select allExpand view
Exception thrown at 0x00007FF81E85FA12 (nvoglv64.dll) in gzdoom.exe: 0xC0000005: Access violation reading location 0x000001ED98EAA8C0.
in vk_objects.h (917):
 
nvoglv64.dll!00007ff81e85fa12()   Unknown
    nvoglv64.dll!00007ff81e85a3d5()   Unknown
>   gzdoom.exe!VulkanDescriptorSet::~VulkanDescriptorSet() Line 917   C++
    [External Code]   
    gzdoom.exe!VkMaterial::DeleteDescriptors() Line 366   C++
    gzdoom.exe!VkMaterial::~VkMaterial() Line 351   C++
    [External Code]   
    gzdoom.exe!FGameTexture::~FGameTexture() Line 108   C++
    [External Code]   
    gzdoom.exe!FTextureManager::DeleteAll() Line 91   C++
    gzdoom.exe!D_Cleanup() Line 3753   C++
    gzdoom.exe!GameMain() Line 3689   C++
    gzdoom.exe!DoMain(HINSTANCE__ * hInstance) Line 269   C++
    gzdoom.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * nothing, wchar_t * cmdline, int nCmdShow) Line 557   C++
    [External Code]   
You do not have the required permissions to view the files attached to this post.
vsonnier
 
Joined: 11 Apr 2019
Github ID: vsonnier
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: [6f694260] Crash at startup in Vulkan

Postby dpJudas » Wed Jun 08, 2022 11:57 am

Based on that call stack it is most likely deleting a descriptor set still in use by the GPU. VkMaterial's internals should probably stop having its lifetime directly tied the hwrenderer objects as time has shown those get created and deleted in situations that aren't that easy to predict and manage for the backend. I'll try do something about that in my next update of the backend.
dpJudas
 
 
 
Joined: 28 May 2016

Re: [6f694260] Crash at map start with Vulkan

Postby Player701 » Thu Jun 09, 2022 12:01 am

g4.8pre-501-geb56eb380 soft-crashes for me too when trying to load a level:

Code: Select allExpand view
Execution could not continue.
Could not create vulkan image: initialization failed

If I have a debugger attached, it produces a stack trace similar to vsonnier's (only with different offsets in nvogl64.dll) upon closing the game window.

INI file attached.
You do not have the required permissions to view the files attached to this post.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
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: [6f694260] Crash at map start with Vulkan

Postby Graf Zahl » Thu Jun 09, 2022 1:18 am

I reverted the commit that caused it - I was just trying to get rid of a poor data setup, but there seem to be some hidden dependencies in the Vulkan backend that are not immediately obvious.
The texture manager will eventually have to be rewritten once OpenGL is gone to better accomodate Vulkan's needs.
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