Out of VRAM freeze

Moderator: GZDoom Developers

_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Lockups occasionally occurring when rendering new things

Post 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.
dpJudas
 
 
Posts: 3036
Joined: Sat May 28, 2016 1:01 pm

Re: Lockups occasionally occurring when rendering new things

Post 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.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Lockups occasionally occurring when rendering new things

Post 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 all

>	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
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Lockups occasionally occurring when rendering new things

Post by Major Cooke »

Turns out it doesn't matter, it still just freezes. Debugger on or not.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Lockups occasionally occurring when rendering new things

Post by _mental_ »

What’s the value of result?
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Lockups occasionally occurring when rendering new things

Post by Major Cooke »

VK_ERROR_DEVICE_LOST (-4)
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Lockups occasionally occurring when rendering new things

Post 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.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Lockups occasionally occurring when rendering new things

Post 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?
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Lockups occasionally occurring when rendering new things

Post 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.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Lockups occasionally occurring when rendering new things

Post by _mental_ »

No, it was about this tool installed with Vulkan SDK. It outputs comprehensive information about available GPUs.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Lockups occasionally occurring when rendering new things

Post 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.
Attachments
vulkaninfo.txt
(95.24 KiB) Downloaded 219 times
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Lockups occasionally occurring when rendering new things

Post by Major Cooke »

Okay, it crashes... seemingly faster? With the scale multiplier set up.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Lockups occasionally occurring when rendering new things

Post by _mental_ »

Was it the same freeze with upscaled textures? The idea is figure out a relation to out of VRAM case.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Lockups occasionally occurring when rendering new things

Post by Major Cooke »

Yes. Same freeze, same error.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Lockups occasionally occurring when rendering new things

Post 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.
Post Reply

Return to “Vulkan Renderer Bugs”