-
- Notifications
You must be signed in to change notification settings - Fork 255
Closed
Labels
bugc: ffiLow-level components and interaction with GDExtension APILow-level components and interaction with GDExtension API
Description
Hey, I'm getting errors in godot whenever I try to use hot reloading in Godot 4.3 (non-mono). I'm on 7634fe7 of gdext which is the latest as of now, with the api-4-3 feature enabled.
Screen.Recording.2024-08-24.at.12.28.19.PM.mp4
The error I get is related to ClassName it seems.
/Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:365 - Rust function panicked at /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/meta/class_name.rs:182. Context: failed to initialize GDExtension level `Scene` /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:378 - [panic] index out of bounds: the len is 0 but the index is 1 /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:365 - Rust function panicked at /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/registry/class.rs:207. Context: failed to initialize GDExtension level `Editor` /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:378 - [panic] global lock for loaded classes poisoned; class registration or deregistration may have panicked /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:365 - Rust function panicked at /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/registry/class.rs:207. Context: failed to deinitialize GDExtension level `Editor` /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:378 - [panic] global lock for loaded classes poisoned; class registration or deregistration may have panicked /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:365 - Rust function panicked at /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/registry/class.rs:207. Context: failed to deinitialize GDExtension level `Scene` /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:378 - [panic] global lock for loaded classes poisoned; class registration or deregistration may have panicked /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:365 - Rust function panicked at /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/registry/class.rs:207. Context: failed to deinitialize GDExtension level `Servers` /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:378 - [panic] global lock for loaded classes poisoned; class registration or deregistration may have panicked /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:365 - Rust function panicked at /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/registry/class.rs:207. Context: failed to deinitialize GDExtension level `Core` /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:378 - [panic] global lock for loaded classes poisoned; class registration or deregistration may have panicked /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-core/src/private.rs:365 - Rust function panicked at /Users/choc/.cargo/git/checkouts/gdext-76630c89719e160c/7634fe7/godot-ffi/src/binding/single_threaded.rs:75. My code is just vanilla book starter
// lib.rs mod player; use godot::prelude::*; struct MyExtension; #[gdextension] unsafe impl ExtensionLibrary for MyExtension {} // player.rs use godot::classes::{ISprite2D, Sprite2D}; use godot::prelude::*; #[derive(GodotClass)] #[class(base=Sprite2D)] struct Player { speed: f64, angular_speed: f64, base: Base<Sprite2D>, } #[godot_api] impl ISprite2D for Player { fn init(base: Base<Sprite2D>) -> Self { godot_print!("Hello, GD world!"); Self { speed: 400.0, angular_speed: std::f64::consts::PI, base, } } fn physics_process(&mut self, delta: f64) { let radians = (self.angular_speed * delta) as f32; self.base_mut().rotate(radians); } }Rust 1.80
> rustc --version --verbose rustc 1.80.1 (3f5fd8dd4 2024-08-06) binary: rustc commit-hash: 3f5fd8dd41153bc5fdca9427e9e05be2c767ba23 commit-date: 2024-08-06 host: aarch64-apple-darwin release: 1.80.1 LLVM version: 18.1.7 d-corler
Metadata
Metadata
Assignees
Labels
bugc: ffiLow-level components and interaction with GDExtension APILow-level components and interaction with GDExtension API