Lockups occasionally occurring when rendering new things

Moderator: GZDoom Developers

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Thu Aug 08, 2019 1:55 pm

You need to enable break on all C++ exceptions in order to stop at the problem’s location.
While issues with shutdown can be annoying, they don’t explain the cause of the exception.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Lockups occasionally occurring when rendering new things

Postby dpJudas » Thu Aug 08, 2019 1:57 pm

I pushed a commit that should remove the errors pasted. With some luck that should allow the fatal error message to display now.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Thu Aug 08, 2019 2:16 pm

Thanks mental. I got the exception to throw so I could get a callstack. Unfortunately, the game still freezes instead of fatal erroring. I wonder if it's because the debugger's still running?

Code: Select allExpand view
>   gzdoom.exe!CheckVulkanError(VkResult result, const char * text) Line 120   C++
    [Inline Frame] gzdoom.exe!QueueSubmit::execute(VulkanDevice * device, VkQueue_T *) Line 1297   C++
    gzdoom.exe!VulkanFrameBuffer::FlushCommands(VulkanCommandBuffer * * commands, unsigned __int64 count, bool finish, bool lastsubmit) Line 248   C++
    gzdoom.exe!VulkanFrameBuffer::FlushCommands(bool finish, bool lastsubmit) Line 274   C++
    gzdoom.exe!VkRenderState::Apply(int dt) Line 167   C++
    gzdoom.exe!VkRenderState::Draw(int dt, int index, int count, bool apply) Line 40   C++
    gzdoom.exe!HWSprite::DrawSprite(HWDrawInfo * di, FRenderState & state, bool translucent) Line 260   C++
    gzdoom.exe!HWDrawList::DoDraw(HWDrawInfo * di, FRenderState & state, bool translucent, int i) Line 816   C++
    gzdoom.exe!HWDrawList::DrawSorted(HWDrawInfo * di, FRenderState & state, SortNode * head) Line 906   C++
    gzdoom.exe!HWDrawList::DrawSorted(HWDrawInfo * di, FRenderState & state) Line 944   C++
    gzdoom.exe!HWDrawInfo::RenderTranslucent(FRenderState & state) Line 542   C++
    [Inline Frame] gzdoom.exe!std::_Func_class<void,HWDrawInfo *,int>::operator()(HWDrawInfo * <_Args_0>, int <_Args_1>) Line 658   C++
    gzdoom.exe!HWDrawInfo::ProcessScene(bool toscreen, const std::function<void __cdecl(HWDrawInfo *,int)> & drawScene) Line 660   C++
    gzdoom.exe!VulkanFrameBuffer::RenderViewpoint(FRenderViewpoint & mainvp, AActor * camera, IntRect * bounds, float fov, float ratio, float fovratio, bool mainview, bool toscreen) Line 480   C++
    gzdoom.exe!VulkanFrameBuffer::RenderView(player_t * player) Line 432   C++
    [Inline Frame] gzdoom.exe!D_Display::__l47::<lambda_178f70ee6b4ccea62180147cf555d494>::operator()() Line 782   C++
    [Inline Frame] gzdoom.exe!std::_Invoker_functor::_Call(D_Display::__l47::<lambda_178f70ee6b4ccea62180147cf555d494> &)   C++
    [Inline Frame] gzdoom.exe!std::invoke(D_Display::__l47::<lambda_178f70ee6b4ccea62180147cf555d494> &)   C++
    [Inline Frame] gzdoom.exe!std::_Invoker_ret<void,1>::_Call(D_Display::__l47::<lambda_178f70ee6b4ccea62180147cf555d494> &)   C++
    gzdoom.exe!std::_Func_impl_no_alloc<<lambda_178f70ee6b4ccea62180147cf555d494>,void>::_Do_call()   C++
    [Inline Frame] gzdoom.exe!std::_Func_class<void>::operator()() Line 780   C++
    [Inline Frame] gzdoom.exe!D_Render(std::function<void __cdecl(void)>) Line 379   C++
    gzdoom.exe!D_Display() Line 780   C++
    gzdoom.exe!D_DoomLoop() Line 1037   C++
    gzdoom.exe!D_DoomMain() Line 2728   C++
    gzdoom.exe!DoMain(HINSTANCE__ * hInstance) Line 991   C++
    gzdoom.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * nothing, wchar_t * cmdline, int nCmdShow) Line 1323   C++
    [Inline Frame] gzdoom.exe!invoke_main() Line 118   C++
    gzdoom.exe!__scrt_common_main_seh() Line 288   C++
    kernel32.dll!00007ff8980981f4()   Unknown
    ntdll.dll!00007ff89a19a271()   Unknown
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Thu Aug 08, 2019 2:35 pm

Turns out it doesn't matter, it still just freezes. Debugger on or not.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Fri Aug 09, 2019 12:05 am

What’s the value of result?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Fri Aug 09, 2019 8:30 am

VK_ERROR_DEVICE_LOST (-4)
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Sat Aug 17, 2019 12:33 pm

Anything else I can try to help out, short of recreating it in ZScript?

I don't know if it's of much help but I'm on a laptop with a built-in Intel graphics card and Nvidia too.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Sat Aug 17, 2019 1:41 pm

Most likely, lost device is only a consequence of an earlier issue.
Does this happen with both GPUs? Will something change if you enable texture upscaling 4x or higher?
There is vulkaninfo tool installed with the SDK. Could you please post its output?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Sat Aug 17, 2019 2:14 pm

I'll try it on my intel but chances are it can't run vulkan.

Is vulkaninfo different from what I posted here? If so, how do I use it? I'll need instructions.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Sun Aug 18, 2019 12:40 am

No, it was about this tool installed with Vulkan SDK. It outputs comprehensive information about available GPUs.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Sun Aug 18, 2019 9:33 am

Alright, I tested with my intel graphics card. Surprisingly it supports it, even if it's a clunky one at first but then it gradually smooths out after a time. Hasn't crashed yet.
So, it appears to be NVidia specific. dpJudas is indeed correct, NVidia's doing something wrong.

Also, I don't have resize mode on currently. I keep settings as low as possible but I'll try using them next on the nvidia setting to see if it happens more quickly.

Attached is my vulkan info.
Attachments
vulkaninfo.txt
(95.24 KiB) Downloaded 12 times
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Sun Aug 18, 2019 10:04 am

Okay, it crashes... seemingly faster? With the scale multiplier set up.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Sun Aug 18, 2019 10:45 am

Was it the same freeze with upscaled textures? The idea is figure out a relation to out of VRAM case.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Sun Aug 18, 2019 1:18 pm

Yes. Same freeze, same error.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Sun Aug 18, 2019 1:45 pm

If it was out of VRAM case, the bug should happen much faster with 6x scale. Did you get out of device memory error at least once? With 6x scale and lots of sprites VRAM can be exhausted pretty quickly.
_mental_
 
 
 
Joined: 07 Aug 2011

PreviousNext

Return to Vulkan Renderer Bugs

Who is online

Users browsing this forum: No registered users and 1 guest