Tested versions
- Reproduces in v4.3.stable.official [77dcf97]
- Fixed in v4.4.dev.custom_build [621cadc] (confirmed fixed in this commit; prior commit still has issue)
System information
Godot v4.3.stable - macOS 14.6.1 - Vulkan (Forward+) - integrated Apple M3 Max - Apple M3 Max (16 Threads)
Issue description
@tool scripts do not hot reload after the first hot reload when using an external editor. During the first hot reload the following error is generated:
modules/gdscript/gdscript.cpp:745 - Condition "!p_keep_state && has_instances" is true. Returning: ERR_ALREADY_IN_USE
Note this is not the same issue as #97238 which is 4.4 specific.
Steps to reproduce
-
Create a new project
-
Add a Node3D
-
Attach a script to that Node3D
-
Make script a @tool script, and add a print to the _ready() function; save it
-
Switch back to godot editor
-
Save & reopen scene in editor (seems to be necessary on macos right now)
-
Confirm print from _ready()
-
Edit script to change print message; save script
-
Switch back to godot editor
-
Godot will display the ERR_ALREADY_IN_USE error
-
Close and reopen scene and updated _ready() message will be printed
-
Edit script, changing the print message again: save script
-
Switch back to godot editor
-
Godot will not print any new message
-
close & reopens scene and the message from the previous edit will be shown
Minimal reproduction project (MRP)
hot-reload-issue.zip
Tested versions
System information
Godot v4.3.stable - macOS 14.6.1 - Vulkan (Forward+) - integrated Apple M3 Max - Apple M3 Max (16 Threads)
Issue description
@toolscripts do not hot reload after the first hot reload when using an external editor. During the first hot reload the following error is generated:Note this is not the same issue as #97238 which is 4.4 specific.
Steps to reproduce
Create a new project
Add a Node3D
Attach a script to that Node3D
Make script a
@toolscript, and add a print to the_ready()function; save itSwitch back to godot editor
Save & reopen scene in editor (seems to be necessary on macos right now)
Confirm print from
_ready()Edit script to change print message; save script
Switch back to godot editor
Godot will display the
ERR_ALREADY_IN_USEerrorClose and reopen scene and updated
_ready()message will be printedEdit script, changing the print message again: save script
Switch back to godot editor
Godot will not print any new message
close & reopens scene and the message from the previous edit will be shown
Minimal reproduction project (MRP)
hot-reload-issue.zip