Skip to content

Running a Godot project in the editor crashes on startup when a GDScript inheriting from Node static type a variable of an OScript (with it's class_name) that have a variable of the type of the GDScript #1366

@RocoGreen

Description

@RocoGreen

Describe the bug

If you have a GDScript inheriting from Node that static type a variable of an OScript that have a variable of the type of the GDScript, the project crashes on startup.

Expected behavior

The Godot project is supposed to run normally with the OScript allowing to have a variable of the type of the GDScript and this GDScript to be able to static type the OScript (with it's class_name) at the same time.

Actual behavior

Instead of the project running normally, it simply crashes on startup. The editor is still active though.

How to Reproduce?

Reproducer :

Steps to reproduce :

  1. Download this Orchestrator Godot project template here.
  2. Start Godot Engine then just import the template. Put it wherever you want.
  3. When project is loaded, you'll be prompted to restart. Please do. Don't worry about the error messages, it's normal.
  4. After restarting, just launch the project. It'll crash at startup.
  5. Voila ! You can analyze the project but really, I just did this template by following exactly what is required to cause the bug with my own explanation.

Godot full version

v4.6.1.stable.arch_linux [14d19694e]

Orchestrator version

v2.4.2.stable.official

Additional information

  • Having a function that asks for the GDScript as an input or output creates the same problem. The OScript does not need to be in the scene for this bug to happen. Just mentioning the OScript (with it's class_name) in the GDScript causes the crash.

  • The Godot editor though is still active but mine crashed once from this bug.

  • Also causes an undesired behavior related : If putting the variable I've created for the template in the OScript (left the name as default, NewVar) to be able to be exported then the project is restarted, the editor will output that error : Parser Error: Export type can only be built-in, a resource, a node, or an enum. while obviously, the export type is the GDScript which inherits from Node. Launching the project still crashes the exact same way without any complains about the export type. After all, saving the OScript with the variable as exported does not provoke any error.


If it helps, here is a report of some of my setup specs :

Hardware Information:

  • Hardware Model: Lenovo Legion 5 15ACH6H
  • Memory: 32.0 GiB
  • Processor: AMD Ryzen™ 7 5800H with Radeon™ Graphics × 16
  • Graphics: NVIDIA GeForce RTX™ 3060 Laptop GPU
  • Disk Capacity: 1.0 TB

Software Information:

  • Firmware Version: GKCN65WW
  • OS Name: CachyOS (Arch Linux)
  • OS Type: 64-bit
  • GNOME Version: 49
  • Windowing System: Wayland
  • Kernel Version: Linux 6.19.3-2-cachyos

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/confirmedBug/regression has been confirmed.kind/bugA bug or regression in expected behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions