Skip to content

Godot editor crashes when hot reloading gdext library with custom resources #582

Open
@tomdedecker

Description

@tomdedecker

A few days ago I started experimenting with custom resources for my gdext project and noticed that I started getting editor crashes every time (or at least most of the time) when I made a change to a node using a custom resource. Fast forward a bit and I was able to make a minimal reproducible example using a single node and resource. You can find it here or in the attached zip file.

gdext-reload-crash-master.zip

The scenario is as follows:

  1. Download the project
  2. Compile the rust code (cargo build inside /rust)
  3. Open the project in the Godot editor
  4. Run the game
  5. Open rust/src/node.rs
  6. Uncomment the second print line in ready()
  7. Build the module again
  8. Re-run the game in the editor

At this point the editor typically crashes for me, producing one of 3 stack traces (as far as I encountered), which I've also added to the root of the repository. Two of these crashed in Godot's source code and the other inside the gdext project. I considered opening an issue with Godot's as I assumed that this might be a problem on their end, but I wanted to check here first.

I haven't tested this on any other platforms yet, but I can consistently reproduce it on my Linux (x86-64) install with Godot 4.2.1.

If you need any other info or if this is an issue I should check with Godot itself, please let me know.

Kind regards,
Tom

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugc: engineGodot classes (nodes, resources, ...)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions