godotengine / godotengine/godot

Failed to load GD scripts after saving dotnet project

Open
#90,544 6 comments 0 reactions 0 assignees View on GitHub
bug topic:dotnet topic:editor topic:gdscript
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Tested in 4.2.1 mono and v4.3-dev5 mono

### System information

Godot v4.2.1.stable.mono - Windows 10.0.22000 - Vulkan (Forward+) - dedicated AMD Radeon RX 5700 (Advanced Micro Devices, Inc.; 31.0.21023.2010) - Intel(R) Core(TM) i9-9900KF CPU @ 3.60GHz (16 Threads)

### Issue description

I use some plugins;
GameGui (https://github.com/brombres/Godot-GameGUI)
and
Dialogue Manager (https://github.com/nathanhoad/godot_dialogue_manager)

For some strange reason, whenever I make any changes to my code in C#, the first run of the project causes various GD scripts to fail from these 2 plugins.

Not sure what the files that fail shares.

Whenever I run the project the second time, it then runs without issues. If I build the project first and then run it, also no issue.

When I first installed GameGui there was no issue. The error suddenly started happening.

I have tried to use notepad for editing, to ensure VSCode wasn't causing the issue, but the same error happened. It seems to happen when Godot has to reload the scripts.

All the errors combined:
![image](https://github.com/godotengine/godot/assets/45199982/e51cca7b-c571-4979-bddf-d77911de309f)

`E 0:00:38:0338 load: Failed to load script "res://addons/dialogue_manager/test_scene.gd" with error "Parse error".
modules/gdscript/gdscript.cpp:2788 @ load()`

Example of errors in the code
![image](https://github.com/godotengine/godot/assets/45199982/74ff4602-1e59-48f1-8d37-c987798db5b2)
![image](https://github.com/godotengine/godot/assets/45199982/869342f1-1ef5-476c-85a8-a5879796fc4e)
![image](https://github.com/godotengine/godot/assets/45199982/cc7412d8-18fa-4750-bf0b-20912eae9ac1)
![image](https://github.com/godotengine/godot/assets/45199982/c91ca90e-288a-4cac-9e11-61b2ad4bc15c)
![image](https://github.com/godotengine/godot/assets/45199982/7abc5954-d439-4bc7-b2fa-5ce08a3ece37)
![image](https://github.com/godotengine/godot/assets/45199982/79b2b249-cb8d-45c3-a915-e01ba1fb0ac4)

### Steps to reproduce

I have tried to no avail to recreate the bug...

### Minimal reproduction project (MRP)

I have tried to no avail to recreate the bug...

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the first-run failure after editing C# and inspect the reported res://addons/dialogue_manager/test_scene.gd failure and modules/gdscript/gdscript.cpp:2788. The issue currently has no minimal reproduction, so done means identifying a reliable trigger and ensuring the affected GDScript files load successfully on the first run.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, godot
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.