godot-rust / gdext

Rust bindings for Godot 4
https://mastodon.gamedev.place/@GodotRust
Mozilla Public License 2.0
3.15k stars 198 forks source link

Hot reloading Panics in Godot #922

Closed jgunzelman88 closed 1 month ago

jgunzelman88 commented 1 month ago

Every time I compile I get the following error requiring me to restart godot.

/Users/<>/.cargo/git/checkouts/gdext-76630c89719e160c/8ad9cb0/godot-core/src/private.rs:393 - Rust function panicked at /Users/<>/.cargo/git/checkouts/gdext-76630c89719e160c/8ad9cb0/godot-core/src/meta/class_name.rs:216. Context: failed to initialize GDExtension levelScene /Users/jgunzelman/.cargo/git/checkouts/gdext-76630c89719e160c/8ad9cb0/godot-core/src/private.rs:407 - [panic] index out of bounds: the len is 0 but the index is 1 /Users/<>/.cargo/git/checkouts/gdext-76630c89719e160c/8ad9cb0/godot-core/src/private.rs:393 - Rust function panicked at /Users/<>/.cargo/git/checkouts/gdext-76630c89719e160c/8ad9cb0/godot-core/src/registry/class.rs:219. Context: failed to initialize GDExtension levelEditor` /Users/<>/.cargo/git/checkouts/gdext-76630c89719e160c/8ad9cb0/godot-core/src/private.rs:407 - [panic] global lock for loaded classes poisoned; class registration or deregistration may have panicked

`

Bromeon commented 1 month ago

Duplicate of #871?

Is your dynamic library not properly unloaded?

jgunzelman88 commented 1 month ago

It is a duplicate of 871 sorry I am reading it now. So do I have to remove it from the project folder for hot reloading to work? It was working before in 4.2 ever since I switched to 4.3 it hasn't worked.

jgunzelman88 commented 1 month ago

So I just tested on my windows machine. And I don't see this issue ..... So it might be a MacOS issue.