-
-
Notifications
You must be signed in to change notification settings - Fork 23k
Description
Tested versions
Reproducible in: 4.3.rc [739019e]
System information
Windows 11 (10.0.22631)
Issue description
I haven't bisected this or anything, but given the affected code (WindowsUtils::remove_temp_pdbs
) I would assume this is a regression caused by #87117.
Similar to #95306, I only noticed this when running the editor under Application Verifier on Windows, which similar to Valgrind lets you know if a use-after-free has occurred, among other things. I haven't noticed any crash when running normally, but I suppose that could maybe happen, given the somewhat random nature of a use-after-free.
Hopefully the problem is apparent from this flow when closing the editor of a project (on Windows specifically) that utilizes a GDExtension:
Main::cleanup
is called⚠️ Main::cleanup
deletespacked_data
(which is the singleton forPackedData
) but the singleton isn't zeroed outMain::cleanup
callsunregister_core_types
unregister_core_types
deletesgdextension_manager
- That
unref
s all theGDExtension
, thus deleting them GDExtension::~GDExtension
callsGDExtension::close_library
GDExtension::close_library
callsOS_Windows::close_dynamic_library
OS_Windows::close_dynamic_library
callsOS_Windows::_remove_temp_library
OS_Windows::_remove_temp_library
callsWindowsUtils::remove_temp_pdbs
WindowsUtils::remove_temp_pdbs
callsFileAccess::exists
⚠️ FileAccess::exists
accessesPackedData::singleton
Steps to reproduce
N/A
Minimal reproduction project (MRP)
I'd be happy to provide an MRP, but I'm fairly sure this should be reproducible in pretty much any godot-cpp project.