Skip to content

No helpful message on C++ stack overflow #1066

Closed as not planned
Closed as not planned
@lemonlambda

Description

@lemonlambda
// 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    not an issueThe reported problem isn't a problem within gdext.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions