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

Error each Godot start at DisplayServerWindows::cursor_set_shape()/VulkanContext::window_resize() #37730

Closed
Tracked by #37734
Zylann opened this issue Apr 9, 2020 · 4 comments

Comments

@Zylann
Copy link
Contributor

Zylann commented Apr 9, 2020

Godot 4 b3310a0
Windows 10 64 bits
GeForce GTX 1060 6GB/PCIe/SSE2
Compiled with MSVC

Every time I open Godot, be it project manger or editor, the following errors happen in the console:

Godot Engine v4.0.dev.custom_build.b3310a007 - https://godotengine.org
ERROR: Index p_shape = -1163005939 is out of bounds (CURSOR_MAX = 17).
   at: DisplayServerWindows::cursor_set_shape (platform\windows\display_server_windows.cpp:1197)

ERROR: Condition "!windows.has(p_window)" is true.
   at: VulkanContext::window_resize (drivers\vulkan\vulkan_context.cpp:722)
@Calinou Calinou added this to the 4.0 milestone Apr 9, 2020
@mhilbrunner mhilbrunner changed the title Error each time Godot opens Error each Godot start at DisplayServerWindows::cursor_set_shape()/VulkanContext::window_resize() Apr 10, 2020
@qarmin
Copy link
Contributor

qarmin commented Apr 10, 2020

Can you check if this patch works(I don't have for now ability to check this on Windows)?
It just move place of setting value of cursor_shape at the top of constructor, because probably this variable is used somewhere in constructor uninitialised. (probably same as #37321)

diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index ebe9a7d27a..aba8194c81 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -2797,6 +2797,8 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
        drop_events = false;
        key_event_pos = 0;
 
+       cursor_shape = CURSOR_ARROW;
+
        alt_mem = false;
        gr_mem = false;
        shift_mem = false;
@@ -2936,8 +2938,6 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
                SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
        }
 
-       cursor_shape = CURSOR_ARROW;
-
        _update_real_mouse_position(MAIN_WINDOW_ID);
 
        joypad = new JoypadWindows(&windows[MAIN_WINDOW_ID].hWnd);

@Zylann
Copy link
Contributor Author

Zylann commented Apr 10, 2020

@qarmin your patch fixes the first error about the cursor. The second error remains.

@TheMoye
Copy link

TheMoye commented May 10, 2020

Hello,
I just build Godot (Godot Engine v4.0.dev.custom_build.ff5dfcdf6) on Windows 10 64bits.
Same thing for me, a few issues when Godot 4.0 was launched :

ERROR: Some texture bindings were not properly freed (leaked canvasitems?
   at: ~RasterizerCanvasRD (servers/rendering/rasterizer_rd/rasterizer_canvas_rd.cpp:2564)
ERROR: Condition "!windows.has(p_window_id)" is true.
   at: window_destroy (drivers/vulkan/vulkan_context.cpp:761)
ERROR: Condition "!windows.has(p_window)" is true.
   at: window_resize (drivers/vulkan/vulkan_context.cpp:729)

The above issues only occur once during startup.

Then the following error repeats itself indefinitely :

ERROR: Condition "!uniform_set" is true.
   at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:5960)

Finally when I leave the editor, I have these issues again :

ERROR: Some texture bindings were not properly freed (leaked canvasitems?
   at: ~RasterizerCanvasRD (servers/rendering/rasterizer_rd/rasterizer_canvas_rd.cpp:2564)
ERROR: Condition "!windows.has(p_window_id)" is true.
   at: window_destroy (drivers/vulkan/vulkan_context.cpp:761)

@akien-mga
Copy link
Member

I'm pretty sure this has been fixed since then, so closing. Please comment if it's still valid.

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

No branches or pull requests

5 participants