godotengine / godotengine/godot
Failed to load GD scripts after saving dotnet project
- 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:

`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






### 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
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