-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Opening any doc display it with incorrect theming #64997
Comments
CC @AaronRecord |
Good catch, I'll try and look into tomorrow |
I can reproduce the problem on my computer (also Win 11, although I'm guessing that's unrelated?) |
Okay so this is weird, I can't reproduce with a debug build compiled with msvc, but I can reproduce with the release builds from the CI checks (both on commit cb62d31) Edit: I've compiled with |
If I switch themes in the editor settings, everything goes back to normal, I think it's a regression related to themes or related notifications. It may be regression introduced by #62846 ? |
Don't know if you want a new issue for it, but #62846 causes an infinite loop segfault when I try to open one of my current projects. I haven't been able to pin down exactly what's causing it, but EditorLog is asked to log an error, add_image fails due to the theme_cache not being properly initialised, which leads to a new error log, and so on. I added a couple of |
…THEME_CHANGED" This reverts commit 4b817a5. Fixes godotengine#64988. Fixes godotengine#64997. This caused several regressions (godotengine#64988, godotengine#64997, godotengine#64997 (comment)) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in godotengine#62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
Godot version
006915b
System information
Windows 11
Issue description
Steps to reproduce
Open any doc item in the editor help
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: