Godot crashes repeatedly - how to debug?

Godot Version

Godot v 4.6.1

Question

The problem is that the editor crashes unpredictably, and frequently - maybe an average of ten-fifteen minutes time before a crash happens, without the build running. How do I debug this? It’s quite frustrating :expressionless:

What I’m working on is a hexagonal map (the world map screen) with a TileMapLayer, a player sprite and another TileMapLayer for highlight overlays. The project is mostly empty, this is the first part I’m making.
I have no plugins activated, but there are a few inactive.

Any ideas?

Start by running the console version of the engine with --verbose flag and check if anything suspicious gets printed.

1 Like

I’ll try and see if / when it happens :slight_smile:

Alright, the last bit I got before the latest crash is:

thread '<unnamed>' (19328) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/accesskit_consumer-0.31.0/src/tree.rs:80:21:
TreeUpdate includes duplicate child #1935325148484544
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
XR: Clearing primary interface
XR: Removed interface "Native mobile"
XR: Removed interface "OpenXR"

There are a bunch of other errors in parts before, but it’s hard to say what caused them… a few reference the plugins that I’ve removed entirely now, but they didn’t cause a crash.

What am I looking for?

I would create an empty project and see if it crashes. That will tell you if something is wrong with your project or with your machine.

Pretty sure it’s the project. I haven’t experienced this in the last 500 hours of work on the previous project, so it seems a bit of a coincidence.

1 Like

Did you disable the plugins before removing them? If not, I recommend adding them back, enabling and disabling them, then removing them. Plugins can make all sorts of changes that stay unless they are disabled - and even then, only if the plugin developer did the disable script correctly.

Ultimately, I’d recommend a clean slate as @lastbender suggested. At least to test.

1 Like

Yeah, and I’ve since then tried deleting the .godot folder, along with any trace of the plugins. That seems to have worked for now, I just had an hour’s uninterrupted work, so that’s nice. I’ll see tomorrow if my luck holds :slight_smile:

4 Likes

I’ve had a couple of crashes today, so I tried starting on a blank project and got another crash after about an hour of fiddling around with things unrelated to the other project.

The error is basically the same:

thread '<unnamed>' (8448) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/accesskit_consumer-0.31.0/src/tree.rs:80:21:
TreeUpdate includes duplicate child #674120886911220
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I have no idea how to approach this. It would seem that something has happened to my Godot installation since it’s unrelated to the project… should I try removing all the Godot user dir files?
I’m also not sure about “run with RUST_BACKTRACE=1 environment variable to display a backtrace“ - should I do this, and if so, how do I do it? What am I looking for?

Sorry if I missed this, but what OS are you on?

Windows 11.

Ok, so I think the easiest thing to start with is grabbing 4.6.2. Run it. Load your projects up in it and see if the problem goes away. Maybe your problem is one of the bugs they fixed.

1 Like

accesskit is the accessibility framework that was added in 4.5.
If it still keeps crashing, you could try starting a discussion on their GitHub (although I suspect they would just direct you to raise an issue against Godot…)

2 Likes

Is the access kit a Rust crate in vanilla Godot ? Or is it a Rust Godot thing ?

I’ve deleted all Godot user files, because why not, deleted the .godot project folder, and updated to Godot 4.6.2, but the problem persists. The crashes seem less frequent, but it’s impossible to say for sure - most recently I had less than an hour’s work time before it crashed again. The crash message is the same.
I can’t spot any connection between what I’m doing (on which project) in Godot, and when it crashes. Most recently it happened while Godot was open in the background while I edited project image files. The error is the same as before, and there are only a few warnings in the entire verbose output. This one:

WARNING: Detected another project.godot at res://example-project. The folder will be ignored.
at: _should_skip_directory (editor/file_system/editor_file_system.cpp:3458)

And a few of this kind:

Loading resource: res://.godot/imported/Fighter.png-fb483bc7411cd4b454283dddc4acc866.ctex
WARNING: Image format RGB8 not supported by hardware, converting to RGBA8.
     at: _validate_texture_format (servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:2426)
Loading resource: res://assets/characters/Scholar.png
Loading resource: res://.godot/imported/Scholar.png-a0f09157d8724148099e35cc0223327a.ctex
WARNING: Image format RGB8 not supported by hardware, converting to RGBA8.
     at: _validate_texture_format (servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:2426)
Loading resource: res://assets/characters/Mystic.png
Loading resource: res://.godot/imported/Mystic.png-0026571a3729ebb9910c78a69e85ee19.ctex
WARNING: Image format RGB8 not supported by hardware, converting to RGBA8.
     at: _validate_texture_format (servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:2426)

If no possible solutions are suggested, I’ll try reverting to a previous version of Godot. If that doesn’t work, I guess I’ll find another engine :confused:

I’m also running Windows 11 and I’m not seeing these crashes. I typically have 2-4 Godot projects open for days. There’s definitely something going on, but since the majority of Godot users are on Windows (according to the latest poll), I suspect you are encountering an edge case with a specific cause.

I’ve never seen any of those warnings before. I think at this point it might be worth logging a bug. Sometimes edge cases that people on the forum don’t know about, the developers do, and if you log a bug and they know of a fix, they will tell you.

1 Like

How does one go about this?

Just go to the Godot GitHub Issues Page and make a new issue. The template will walk you through it.

1 Like

What about the references to their being Rust crate and a possible rust backtrace? Is this something custom, or have we added a Rust crate to the source tree for access kit ?

1 Like

Good question, and worth asking.