godot icon indicating copy to clipboard operation
godot copied to clipboard

display_server_windows.cpp - Parameter "hicon" is null.

Open conde2 opened this issue 1 year ago • 6 comments

Tested versions

4.2 4.3.Dev4 v4.3.dev5.mono.official [89f70e98d]

System information

Godot v4.3.dev5.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 31.0.15.3623) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

Issue description

image

platform/windows/display_server_windows.cpp:3139 - Parameter "hicon" is null.

Steps to reproduce

It happens very random, I couldn't reproduce in a consistent way, but from time to time this bugs appears. It has something to do with hovering icons.

Also more people are experiencing this error, and it is very anoying as it makes you need to restart the engine to keep working with it. ( https://forum.godotengine.org/t/weird-error-that-i-dont-know-how-to-fix/38742/5)

The scale appears to change randonly after this bug.

https://github.com/godotengine/godot/assets/2137569/3ea597a3-3bf2-42fc-88be-824819223329

image

Minimal reproduction project (MRP)

Just using the editor from time to time this error happen. It happens when hovering any icon.

conde2 avatar Mar 20 '24 14:03 conde2

I found I could get the message consistently on my machine when hovering over anything with a tooltip long enough to get said tooltip. No clue why, and every couple of weeks or so I just randomly start getting this bug for a day or two, but at least we have some info on it.

Aversefun avatar Jun 24 '24 22:06 Aversefun

Also, it appears that dropdown menus also do it.

Aversefun avatar Jun 24 '24 22:06 Aversefun

@AverseABFun which godot version are you using? I switched to godot 4.3.beta2 and I don't have this error anymore.

conde2 avatar Jun 24 '24 22:06 conde2

@AverseABFun which godot version are you using? I switched to godot 4.3.beta2 and I don't have this error anymore.

oh, interesting. I'm still on a stable version, but that's good it (might) have been fixed.

Aversefun avatar Jun 24 '24 22:06 Aversefun

CC @bruvzg

akien-mga avatar Jun 25 '24 07:06 akien-mga

I was getting this error on v4.3.stable.mono.official [77dcf97d8] every time I saved a scene. Restarting the engine cleared it up, not sure how to reproduce yet.

brevven avatar Oct 05 '24 05:10 brevven

Having this issue on 4.4-dev3

scottdavis avatar Oct 24 '24 13:10 scottdavis

I found I could get the message consistently on my machine when hovering over anything with a tooltip long enough to get said tooltip. No clue why, and every couple of weeks or so I just randomly start getting this bug for a day or two, but at least we have some info on it.

Also, it appears that dropdown menus also do it.

Having this often in v4.3.stable.official [77dcf97d8].

It causes my editor to crash multiple times during the day If I'm doing testing of the game.

Windows in editor start dying

  ...
  platform/windows/display_server_windows.cpp:3198 - Parameter "hicon" is null.
  platform/windows/display_server_windows.cpp:3198 - Parameter "hicon" is null.
  Failed to create Windows OS window.
  Failed to create sub window.
  scene/main/window.cpp:635 - Condition "window_id == DisplayServer::INVALID_WINDOW_ID" is true.
  platform/windows/display_server_windows.cpp:1634 - Condition "!windows.has(p_window)" is true. Returning: -1
  platform/windows/display_server_windows.cpp:3594 - Condition "!windows.has(p_window)" is true.
  platform/windows/display_server_windows.cpp:1634 - Condition "!windows.has(p_window)" is true. Returning: -1
  platform/windows/display_server_windows.cpp:1634 - Condition "!windows.has(p_window)" is true. Returning: -1
  platform/windows/display_server_windows.cpp:3198 - Parameter "hicon" is null.
  platform/windows/display_server_windows.cpp:3198 - Parameter "hicon" is null.
  ...

Image Image

TinyTakinTeller avatar Dec 23 '24 14:12 TinyTakinTeller

Can replicate in project using v4.3.stable.official [77dcf97d8] on Windows 11.

Seems this is the first error almost always:

platform/windows/display_server_windows.cpp:3754 - Unexpected window message 0x82 received for window we cannot recognize in our collection; sequence error.

Then it starts spamming one or all of these

  Failed to create Windows OS window.
  Failed to create sub window.
  scene/main/window.cpp:635 - Condition "window_id == DisplayServer::INVALID_WINDOW_ID" is true.
  platform/windows/display_server_windows.cpp:1634 - Condition "!windows.has(p_window)" is true. Returning: -1
  platform/windows/display_server_windows.cpp:3198 - Parameter "hicon" is null.
 platform/windows/display_server_windows.cpp:1634 - Condition "!windows.has(p_window)" is true. Returning: -1

Replication steps

  1. Start the project.
  2. Run project then stop project by clicking X on the window.
  3. Repeat step 2. until error occurs.

Tested it five times in a row. Before replication, step 2. needed to be repeated the following number times: 11, 11, 11, 11, 11.

Seems exactly 11 runs of the project consistently replicate the error ???

The project in question: TakinGodotTemplate - specifically, tested on commit 41f9bfc


EDIT: After doing a clean checkout of the project (essentially removing .godot folder), now it takes 20-30 attempts of step 2. to cause the error instead of the 11 attempts.

TinyTakinTeller avatar Jan 06 '25 09:01 TinyTakinTeller

@TinyTakinTeller Hah! I was just switching over some of my work to use your template and started running into this and found myself here.

This wasn't happening on my project before switching to the template, so something unique in that project setup for sure.

ahackit avatar Jan 23 '25 04:01 ahackit

@ahackit It seems it could be due to some @tool scripts in the SceneManager plugin.

If I enable both things in the Scene Manager tab, then it happens often to me.

Image

But If I disable them, then I cannot replicate it so far.

Image


EDIT 1: Seems the "Reactive" mode enabled in that plugin is the issue.

EDIT 2: Seems clicking the "Refresh" button a lot of times i.e. calling the _on_refresh_button_up() causes the error.

TinyTakinTeller avatar Jan 23 '25 16:01 TinyTakinTeller

@ahackit I could not pinpoint the exact cause yet, but I opened a ticket on the plugin with information so far:

  • https://github.com/maktoobgar/scene_manager/issues/39

TinyTakinTeller avatar Jan 23 '25 17:01 TinyTakinTeller

have this issue on 4.4.1 for me, the error message does not start popping up until godot engine has been open for several hours (when i was working on my previous project, it would begin when nearing 100 hours, but on my current one, it has begun at as early as 10 hours) i do not receive any of the other error messages, only the "hicon" one when hovering over something with a tooltip or opening a dropdown menu, etc

SenseiXiongmao avatar Jul 07 '25 20:07 SenseiXiongmao

ran the editor through command line with --verbose, and this is the error message as it appears on the command line:

Image

if it helps, the only plugins i have installed are:

  • Allegro Bitmap Font Importer by snoopdouglas (which i am certain has nothing to do with it as the error appeared even before i started using it)
  • DiscordRPC by vaporvee

SenseiXiongmao avatar Jul 15 '25 09:07 SenseiXiongmao