-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Crash in Project Dialog on Windows - Vulkan #96722
Comments
Where is the vkInstance being created for the first time? The ProjectManager always uses OpenGL, so |
Ah, I see. I did not realize this ProjectManager was supposed to be using OpenGL. It's a bit strange to me that it uses a different API than the editor and the game (edit: nevermind, I understand. Depending on the project, we could select one API or another. We fallback to OpenGL for maximum compatibility in case an API is not supported). I still believe that it should work regardless of the API used. |
It should! Just to double check, did you make any other relevant changes other than just disabling OpenGL? Just trying to figure out how to reproduce the crash |
No major changes I can think of, apart maybe a few compilation error fixes here and there from disabling modules. Here is my whole custom.py just in case:
|
Tested versions
4.4 custom build at revision 5675c76
System information
Windows 10 - Vulkan
Issue description
Editor crashes when in the project dialog.
Crash callstack shows:
Where
vkCreateWin32SurfaceKHR
is nullptr.But the issue comes much earlier.
The problem is that the vkInstance is created twice. Once for the windows platform by the
DisplayServerWindows
class as intended.And a second time for a platform agnostic
DisplayServer
when callingDisplayServer::can_create_rendering_device()
.This is a major issue, since Godot is using Volk, we cannot instatiate multiple vkInstances. Even a dummy one. This is because Volk uses global pointers for storing vulkan functions. The functions are initialized when calling
volkLoadInstance
. If this function is called multiple times, pointers are overwritten.I found the incriminating change causing the crash: 04d0e7f.
Function pointers should only be initialized once.
Asserts should be added so we do not overwrite the function pointers in the future.
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: