Closed as not planned
Description
// This causes a crash no matter if the node even exists in a scene that's how good it is.
use godot::classes::*;
use godot::prelude::*;
#[derive(GodotClass)]
#[class(base = Node)]
pub struct Crasher {
child: Gd<CrasherChild>,
base: Base<Node>,
}
#[godot_api]
impl INode for Crasher {
fn init(base: Base<Node>) -> Self {
Self {
child: CrasherChild::new_alloc(),
base,
}
}
}
#[derive(GodotClass)]
#[class(base = Node)]
pub struct CrasherChild {
parent: Gd<Crasher>,
base: Base<Node>,
}
#[godot_api]
impl INode for CrasherChild {
fn init(base: Base<Node>) -> Self {
Self {
parent: Crasher::new_alloc(),
base,
}
}
}
This causes godot 4.3 to crash even if the node(s) don't exist in the scene. A warning or an error for this would be nice if possible.