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

EditorColorMap causes several Orphan StringName at exit #69195

Closed
neikeq opened this issue Nov 26, 2022 · 0 comments · Fixed by #83562
Closed

EditorColorMap causes several Orphan StringName at exit #69195

neikeq opened this issue Nov 26, 2022 · 0 comments · Fixed by #83562
Assignees
Milestone

Comments

@neikeq
Copy link
Contributor

neikeq commented Nov 26, 2022

Godot version

4.0.dev (68e3f49)

System information

Ubuntu 22.10

Issue description

This is a regression from 02572f2

Several string names are left unclaimed when exiting the Godot editor. This is caused by EditorColorMap::add_conversion_exception:

void EditorColorMap::add_conversion_exception(const StringName p_icon_name) {
color_conversion_exceptions.insert(p_icon_name);
}

HashMap<Color, Color> EditorColorMap::color_conversion_map;
HashSet<StringName> EditorColorMap::color_conversion_exceptions;

As I explained in #64591, one solution is to free the StringName from some sort of cleanup method. The other solution is to create/copy the StringName as static:

void EditorColorMap::add_conversion_exception(const StringName p_icon_name) {
-	color_conversion_exceptions.insert(p_icon_name);
+	color_conversion_exceptions.insert(StringName(p_icon_name, true););
}

Steps to reproduce

  • Run the Godot editor in verbose mode -v/--verbose.
  • Close the Godot editor and you'll see this message printed in the terminal:
    Orphan StringName: GroupViewport
    Orphan StringName: Sky
    Orphan StringName: SceneMultiplayer
    Orphan StringName: Editor3DHandle
    Orphan StringName: StatusSuccess
    Orphan StringName: GuiResizer
    Orphan StringName: GuiChecked
    Orphan StringName: GuiIndeterminate
    Orphan StringName: CodeFoldedRightArrow
    Orphan StringName: EditorBoneHandle
    Orphan StringName: Godot
    Orphan StringName: ZoomReset
    Orphan StringName: OverbrightIndicator
    Orphan StringName: GuiCloseCustomizable
    Orphan StringName: CodeFoldDownArrow
    Orphan StringName: GuiTab
    Orphan StringName: StatusWarning
    Orphan StringName: EditorHandle
    Orphan StringName: GuiMiniCheckerboard
    Orphan StringName: LockViewport
    Orphan StringName: GuiGraphNodePort
    Orphan StringName: ZoomMore
    Orphan StringName: EditorControlAnchor
    Orphan StringName: StatusError
    Orphan StringName: GuiSpace
    Orphan StringName: EditorPivot
    Orphan StringName: DefaultProjectIcon
    Orphan StringName: TextEditorPlay
    Orphan StringName: ZoomLess
    Orphan StringName: Breakpoint
    Orphan StringName: GuiRadioChecked
    StringName: 31 unclaimed string names at exit.
    

Ignore SceneMultiplayer. That one is reported in #64591

This is reproducible only in the Godot editor. It does not happen with the project manager or games.

Minimal reproduction project

This should be reproducible on all projects when running the Godot editor.

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.

3 participants