You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From debug inside GDExtension::has_library_changed:
FileAccess::get_modified_time(String::utf8("res://rust/target/debug/fmandate.dll", 36)) = {unsigned long long} 1696116779
FileAccess::get_modified_time(library_path) = {unsigned long long} 1696117721
FileAccess::get_modified_time(get_path()) = {unsigned long long} 1696099045
last_modified_time = {unsigned long long} 1696116779
library_path = U"C:\dev\godot\fmandate-gd\rust\target\debug\~fmandate.dll"
Steps to reproduce
checkout godot master branch
compile it with scons dev_build=yes debug_symbols=yes platform=windows compiledb=yes -j8
get some gdextension. dodge-the-creeps example from gdext is fine, then git clone https://github.com/godot-rust/gdext.git && cd gdext/examples/dodge-the-creeps/rust
compile this gdextension cargo build --package dodge-the-creeps --lib
place breakpoint inside GDExtensionManager::reload_extension
start editor with debugger (I used CLion) path_to_godot_working_copy\bin\godot.windows.editor.x86_64.exe --editor --path ../godot (that's path from rust dir to gdext/examples/dodge-the-creeps/godot)
wait for scene loading. it should load fine.
alt+tab somewhere
catch breakpoint
repeat 8-9 infinitely
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
Godot version
v4.2.dev (0ca8542)
System information
Godot v4.2.dev (0ca8542) - Windows 10.0.19042 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 Ti (NVIDIA; 31.0.15.3713) - Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 Threads)
Issue description
Context: godot-rust/gdext hot reload support.
The root cause of the problem is
last_modified_time
is updated using original DLL file, but checked using DLL copy (that is really loaded).library_path is checked:
godot/core/extension/gdextension.cpp
Line 976 in 0ca8542
library_path is initialized by loaded DLL path:
godot/core/extension/gdextension.cpp
Line 686 in 0ca8542
library path is updated using original DLL modification time:
godot/core/extension/gdextension.cpp
Line 883 in 0ca8542
From debug inside
GDExtension::has_library_changed
:Steps to reproduce
scons dev_build=yes debug_symbols=yes platform=windows compiledb=yes -j8
git clone https://github.com/godot-rust/gdext.git && cd gdext/examples/dodge-the-creeps/rust
cargo build --package dodge-the-creeps --lib
path_to_godot_working_copy\bin\godot.windows.editor.x86_64.exe --editor --path ../godot
(that's path fromrust
dir togdext/examples/dodge-the-creeps/godot
)Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: