Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor crash when minimizing on Windows (crash in VulkanContext::prepare_buffers) #37327

Closed
Tracked by #37734
KoBeWi opened this issue Mar 26, 2020 · 6 comments
Closed
Tracked by #37734

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Mar 26, 2020

Godot version:
5f1107a

OS/device including version:
Windows 10

Steps to reproduce:

  1. Minimize editor
[0] vk_optimusGetInstanceProcAddr
[1] vkGetInstanceProcAddr
[2] VulkanContext::prepare_buffers (x:\inne\godot\source\godot\drivers\vulkan\vulkan_context.cpp:1228)
[3] RenderingDeviceVulkan::prepare_screen_for_drawing (x:\inne\godot\source\godot\drivers\vulkan\rendering_device_vulkan.cpp:6692)
[4] VisualServerViewport::draw_viewports (x:\inne\godot\source\godot\servers\visual\visual_server_viewport.cpp:452)
[5] VisualServerRaster::draw (x:\inne\godot\source\godot\servers\visual\visual_server_raster.cpp:114)
[6] Main::iteration (x:\inne\godot\source\godot\main\main.cpp:2139)
[7] OS_Windows::run (x:\inne\godot\source\godot\platform\windows\os_windows.cpp:661)
[8] widechar_main (x:\inne\godot\source\godot\platform\windows\godot_windows.cpp:162)
[9] _main (x:\inne\godot\source\godot\platform\windows\godot_windows.cpp:186)
[10] main (x:\inne\godot\source\godot\platform\windows\godot_windows.cpp:196)
[11] __scrt_common_main_seh (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283)
[12] BaseThreadInitThunk
-- END OF BACKTRACE --
@reduz
Copy link
Member

reduz commented Jun 30, 2020

I am unable to reproduce this, is it still a problem?

@KoBeWi
Copy link
Member Author

KoBeWi commented Jun 30, 2020

Yes, just tried with 73262c0
Might be Windows-only.

@EMBYRDEV
Copy link
Contributor

This is windows only I believe and I'm still experiencing it on master

@akien-mga akien-mga changed the title Editor crash when minimizing Editor crash when minimizing on Windows (crash in VulkanContext::prepare_buffers) Jul 8, 2020
@marstaik
Copy link
Contributor

marstaik commented Jul 8, 2020

image

At first glance it seems that w->swapchain is being set to NULL after the if statement check.
It would seem that there might be some form of thread fighting happening here, but I dont have any experience with the vulkan stack and windows context to know whats going on.

It seems to be crashing in the actual Nvidia driver though.

@marstaik
Copy link
Contributor

marstaik commented Jul 8, 2020

I managed to breakpoint right before the call to fpAcquireNextImageKHR.

image

I confirmed that the swapchain is indeed NULL before the call to fpAcquireNextImageKHR.

I set a breakpoint at 1221 in vulkan_context.cpp, where the swapchain is out of date due to a window resize.
this calls into _update_swap_chains(), which at line 839 returns OK without having allocated a swapchain due to the window width and height being zero. This causes the next iteration of the do-while to call fpAcquireNextImageKHR with a nullptr.

@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 7, 2020

Seems fixed in bc23899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants