-
-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ Hot Reload Regressions in 4.2.2 and 4.3 #1589
Comments
I've tried to investigate some of these problems in the source code for Inspector Hookup Failing on Hot Reload I stepped through this in the debugger and found this:
|
CC @godotengine/gdextension |
Thanks! I'm able to reproduce the issue with your MRP. It seems like the problem is in godot-cpp (rather than Godot) because switching to the |
Git bisect points to godot-cpp PR #1446 I think we missed needing to set the instance binding when doing a reload. I'll work on a PR to fix it. |
Transferred to godot-cpp. |
I just posted PR #1590 which should fix this! I already tested with the MRP, but if anyone has time to test it with their project, I'd appreciate it :-) |
Tested versions
System information
Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 1650 SUPER (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i5-3350P CPU @ 3.10GHz (4 Threads)
Issue description
We are working on a project using C++ GDExtension. When we started the project in Godot 4.2.1, we found the hot reload functionality to work quite well on both Windows and Mac dev machines. All developers could iterate quickly by recompiling C++ code, switching back to the editor, and seeing changes immediately.
However, after updating to Godot 4.2.2, Windows devs complained that hot reload could cause the editor to crash, or could result in the new DLL not loading correctly, resulting in extension classes disappearing from the scene, or inspector hookups getting deleted/removed. On Windows, it seemed to sometimes work, sometimes not. On Mac, hot reload continued to work fine.
Now, in Godot 4.3, hot reload seems to be failing on BOTH Mac and Windows in a few ways:
In short, the hot reload behavior for C++ GDExtensions seems to have really deteriorated in the last two big Godot releases.
Steps to reproduce
In Godot 4.2.1
Godot_4.2.1/Res
.test_scene.tscn
. Notice the blue box around the image (the gizmo plugin). Also notice the root Node has an inspector hookup called "Current Attack Data" that is hooked up to custom Resource.Godot_4.2.1/Cpp
using CMake. There is a helper script inCpp/Build
to generate a VS solution quickly and easily.Godot_4.2.1/Res/addons/CppExtensionDebug.dll
.In Godot 4.3
Note that the ONLY difference about the 4.3 project is that it is meant to be opened in Godot 4.3, and it uses the 4.3 version of godot-cpp. It is otherwise IDENTICAL to the 4.2.1 version.
Godot_4.3/Res
.test_scene.tscn
. Notice the blue box around the image (the gizmo plugin). Also notice the root Node has an inspector hookup called "Current Attack Data" that is hooked up to custom Resource.Godot_4.3/Cpp
using CMake. There is a helper script inCpp/Build
to generate a VS solution quickly and easily.Godot_4.3/Res/addons/CppExtensionDebug.dll
.Minimal reproduction project (MRP)
HotReloadBug.zip
The text was updated successfully, but these errors were encountered: