Page 2 of 4

Re: Lockups occasionally occurring when rendering new things

PostPosted: Thu Aug 08, 2019 12:55 pm
by _mental_
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.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Thu Aug 08, 2019 12:57 pm
by dpJudas
I pushed a commit that should remove the errors pasted. With some luck that should allow the fatal error message to display now.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Thu Aug 08, 2019 1:16 pm
by Major Cooke
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

Re: Lockups occasionally occurring when rendering new things

PostPosted: Thu Aug 08, 2019 1:35 pm
by Major Cooke
Turns out it doesn't matter, it still just freezes. Debugger on or not.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Thu Aug 08, 2019 11:05 pm
by _mental_
What’s the value of result?

Re: Lockups occasionally occurring when rendering new things

PostPosted: Fri Aug 09, 2019 7:30 am
by Major Cooke
VK_ERROR_DEVICE_LOST (-4)

Re: Lockups occasionally occurring when rendering new things

PostPosted: Sat Aug 17, 2019 11:33 am
by Major Cooke
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.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Sat Aug 17, 2019 12:41 pm
by _mental_
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?

Re: Lockups occasionally occurring when rendering new things

PostPosted: Sat Aug 17, 2019 1:14 pm
by Major Cooke
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.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Sat Aug 17, 2019 11:40 pm
by _mental_
No, it was about this tool installed with Vulkan SDK. It outputs comprehensive information about available GPUs.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Sun Aug 18, 2019 8:33 am
by Major Cooke
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.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Sun Aug 18, 2019 9:04 am
by Major Cooke
Okay, it crashes... seemingly faster? With the scale multiplier set up.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Sun Aug 18, 2019 9:45 am
by _mental_
Was it the same freeze with upscaled textures? The idea is figure out a relation to out of VRAM case.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Sun Aug 18, 2019 12:18 pm
by Major Cooke
Yes. Same freeze, same error.

Re: Lockups occasionally occurring when rendering new things

PostPosted: Sun Aug 18, 2019 12:45 pm
by _mental_
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.