Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Editor crashes on shutdown when fetching a singleton via Engine

Open
#1,900 9 comments 0 reactions 0 assignees View on GitHub

@dsnopek is already working on this.

Since Jan 23, 2026.

  • #1908 by @dsnopek — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp
Domain
desktop, game-dev

Research direction

Start by reproducing the shutdown crash on Windows with the shown GDExtension logic, then read Object::~Object in core/object/object.cpp, unregister_core_types in core/register_core_types.cpp, and Main::cleanup in main/main.cpp. Compare the shutdown path with the singleton access and verify that the editor closes without the reported crash while preserving the Linux behavior.

Written by the indexing model from the issue text.

Description

bug crash
Godot version

4.6.beta2

godot-cpp version

4.5.0.stable sync and b724219737883e311f4cc4da1b49a0960dd00d38

System information

Windows 11. I should note that on Linux, I do not observe this behavior, and unfortunately, I do not have a MacOS system to verify whether this problem exists there or not.

Issue description

When using the following logic in an empty GDExtension:

void initialize_extension_module(ModuleInitializationLevel p_level) {
  if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {
    for (const String& singleton_name : Engine::get_singleton()->get_singleton_list()) {
      Object* o = Engine::get_singleton()->get_singleton(singleton_name);
    }
  }
}

On Windows, when the editor closes, this leads to

[0] <couldn't map PC to fn name>
[1] Object::~Object (core\object\object.cpp:2436)
[2] GDExtensionManager::`scalar deleting destructor`
[3] unregister_core_types (core\register_core_types.cpp:427)
[4] Main::cleanup (main\main.cpp:5229)
[5] widechar_main (platform\windows\godot_windows.cpp:105)
[6] _main (platform\windows\godot_windows.cpp:128)
[7] main (platform\windows\godot_windows.cpp:140)
Steps to reproduce

See code snippet above.

Minimal reproduction project

N/A

Dominant language
C++
Stars
2.7k
Forks
813
Avg merge
1h 31m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from godotengine/godot-cpp

All issues in godotengine/godot-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.