godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.41k stars 21.26k forks source link

"--doctool .. --gdextension-docs" randomly deletes documentation #97937

Open BenLubar opened 1 month ago

BenLubar commented 1 month ago

Tested versions

Tried in 4.3-stable, 4.4-dev, and master

System information

Godot v4.4.dev3 - Debian GNU/Linux trixie/sid trixie on X11 - X11 display driver, Multi-window, 1 monitor - OpenGL 3 (Compatibility) - Mesa Intel(R) Graphics (RPL-P) - 13th Gen Intel(R) Core(TM) i7-1360P (16 threads)

Issue description

I have a script that (as part of my gdextension build) runs these commands on a project that uses the gdextension in some trivial way (calling new on a class, for example).

godot --headless --import
godot --doctool .. --gdextension-docs

Occasionally (or frequently, depending on the complexity of the extension), it will delete all of the doc_classes/*.xml files and then exit with success (code 0).

I suspect this is something threading-related based on this crash I managed to catch on one attempt during the import step:

image

Steps to reproduce

  1. Compile the MRP (scons)
  2. Change directory to the demo project (cd demo)
  3. godot --headless --import (to initialize the documentation)
  4. godot --doctool .. --gdextension-docs (to update (or destroy due to this bug) the documentation files)

steps 3 and 4 may need to be repeated

Minimal reproduction project (MRP)

This project is fairly complicated and exhibits the bug more often than it does not: https://github.com/BenLubar/godot4-spy-cards-online/tree/49d494266edea28649e714d021af4a3d283ae6d2

This one is much simpler, only defining a single singleton class, but it also exhibits the bug occasionally: https://github.com/BenLubar/godot4-opus/tree/472984098c55d3a0f0ba21d3cc926c441b636f04

I suspect that the demo gdextensions in godot-cpp and godot-cpp-template will also exhibit this behavior.

BenLubar commented 1 month ago

Running the --headless --import command in valgrind on 4c4e67334412f73c9deba5e5d29afa8651418af2 yields (along with some unrelated messages about thorvg):

Valgrind Output ``` ==8764== Invalid read of size 8 ==8764== at 0x7C17CC6: RefCounted::unreference() (ref_counted.cpp:85) ==8764== by 0x787F2FE: Variant::ObjData::unref() (variant.cpp:1123) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== by 0x786F85B: ArrayPrivate::~ArrayPrivate() (array.cpp:44) ==8764== by 0x786F88A: void memdelete(ArrayPrivate*) (memory.h:140) ==8764== by 0x78695D2: Array::_unref() const (array.cpp:79) ==8764== by 0x786E03F: Array::~Array() (array.cpp:912) ==8764== Address 0x1ad4e2a8 is 184 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7BFC359: Object::notification(int, bool) (object.cpp:879) ==8764== by 0x7BF9D0C: Object::_predelete() (object.cpp:200) ==8764== by 0x7C06334: predelete_handler(Object*) (object.cpp:2181) ==8764== by 0x311EC95: void memdelete(RefCounted*) (memory.h:136) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== by 0x786F85B: ArrayPrivate::~ArrayPrivate() (array.cpp:44) ==8764== Address 0x1ad4e290 is 160 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7BFC36A: Object::notification(int, bool) (object.cpp:880) ==8764== by 0x7BF9D0C: Object::_predelete() (object.cpp:200) ==8764== by 0x7C06334: predelete_handler(Object*) (object.cpp:2181) ==8764== by 0x311EC95: void memdelete(RefCounted*) (memory.h:136) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== by 0x786F85B: ArrayPrivate::~ArrayPrivate() (array.cpp:44) ==8764== Address 0x1ad4e290 is 160 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7BFC359: Object::notification(int, bool) (object.cpp:879) ==8764== by 0x7BF9D3C: Object::_predelete() (object.cpp:203) ==8764== by 0x7C06334: predelete_handler(Object*) (object.cpp:2181) ==8764== by 0x311EC95: void memdelete(RefCounted*) (memory.h:136) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== by 0x786F85B: ArrayPrivate::~ArrayPrivate() (array.cpp:44) ==8764== Address 0x1ad4e290 is 160 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7BFC36A: Object::notification(int, bool) (object.cpp:880) ==8764== by 0x7BF9D3C: Object::_predelete() (object.cpp:203) ==8764== by 0x7C06334: predelete_handler(Object*) (object.cpp:2181) ==8764== by 0x311EC95: void memdelete(RefCounted*) (memory.h:136) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== by 0x786F85B: ArrayPrivate::~ArrayPrivate() (array.cpp:44) ==8764== Address 0x1ad4e290 is 160 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7C05C98: Object::~Object() (object.cpp:2107) ==8764== by 0x3055F89: RefCounted::~RefCounted() (ref_counted.h:53) ==8764== by 0x7780538: Resource::~Resource() (resource.cpp:598) ==8764== by 0x5C54729: RichTextEffect::~RichTextEffect() (rich_text_effect.h:101) ==8764== by 0x311ECB5: void memdelete(RefCounted*) (memory.h:140) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== Address 0x1ad4e308 is 280 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7C05CAF: Object::~Object() (object.cpp:2108) ==8764== by 0x3055F89: RefCounted::~RefCounted() (ref_counted.h:53) ==8764== by 0x7780538: Resource::~Resource() (resource.cpp:598) ==8764== by 0x5C54729: RichTextEffect::~RichTextEffect() (rich_text_effect.h:101) ==8764== by 0x311ECB5: void memdelete(RefCounted*) (memory.h:140) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== Address 0x1ad4e308 is 280 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7C05CC1: Object::~Object() (object.cpp:2108) ==8764== by 0x3055F89: RefCounted::~RefCounted() (ref_counted.h:53) ==8764== by 0x7780538: Resource::~Resource() (resource.cpp:598) ==8764== by 0x5C54729: RichTextEffect::~RichTextEffect() (rich_text_effect.h:101) ==8764== by 0x311ECB5: void memdelete(RefCounted*) (memory.h:140) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== Address 0x1ad4e2f8 is 264 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x34981A4: HashSet >::_lookup_pos(ObjectID const&, unsigned int&) const (hash_set.h:83) ==8764== by 0x348E45D: HashSet >::erase(ObjectID const&) (hash_set.h:261) ==8764== by 0x7BAA1F2: GDExtension::_untrack_instance(void*, void*) (gdextension.cpp:1016) ==8764== by 0x7C05CD6: Object::~Object() (object.cpp:2108) ==8764== by 0x3055F89: RefCounted::~RefCounted() (ref_counted.h:53) ==8764== by 0x7780538: Resource::~Resource() (resource.cpp:598) ==8764== by 0x5C54729: RichTextEffect::~RichTextEffect() (rich_text_effect.h:101) ==8764== by 0x311ECB5: void memdelete(RefCounted*) (memory.h:140) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== Address 0x1ad4e348 is 344 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 4 ==8764== at 0x34981B0: HashSet >::_lookup_pos(ObjectID const&, unsigned int&) const (hash_set.h:83) ==8764== by 0x348E45D: HashSet >::erase(ObjectID const&) (hash_set.h:261) ==8764== by 0x7BAA1F2: GDExtension::_untrack_instance(void*, void*) (gdextension.cpp:1016) ==8764== by 0x7C05CD6: Object::~Object() (object.cpp:2108) ==8764== by 0x3055F89: RefCounted::~RefCounted() (ref_counted.h:53) ==8764== by 0x7780538: Resource::~Resource() (resource.cpp:598) ==8764== by 0x5C54729: RichTextEffect::~RichTextEffect() (rich_text_effect.h:101) ==8764== by 0x311ECB5: void memdelete(RefCounted*) (memory.h:140) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== Address 0x1ad4e36c is 380 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7C05CE2: Object::~Object() (object.cpp:2111) ==8764== by 0x3055F89: RefCounted::~RefCounted() (ref_counted.h:53) ==8764== by 0x7780538: Resource::~Resource() (resource.cpp:598) ==8764== by 0x5C54729: RichTextEffect::~RichTextEffect() (rich_text_effect.h:101) ==8764== by 0x311ECB5: void memdelete(RefCounted*) (memory.h:140) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== Address 0x1ad4e2d0 is 224 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7C05CF9: Object::~Object() (object.cpp:2112) ==8764== by 0x3055F89: RefCounted::~RefCounted() (ref_counted.h:53) ==8764== by 0x7780538: Resource::~Resource() (resource.cpp:598) ==8764== by 0x5C54729: RichTextEffect::~RichTextEffect() (rich_text_effect.h:101) ==8764== by 0x311ECB5: void memdelete(RefCounted*) (memory.h:140) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== Address 0x1ad4e2d0 is 224 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ==8764== ==8764== Invalid read of size 8 ==8764== at 0x7C05D16: Object::~Object() (object.cpp:2112) ==8764== by 0x3055F89: RefCounted::~RefCounted() (ref_counted.h:53) ==8764== by 0x7780538: Resource::~Resource() (resource.cpp:598) ==8764== by 0x5C54729: RichTextEffect::~RichTextEffect() (rich_text_effect.h:101) ==8764== by 0x311ECB5: void memdelete(RefCounted*) (memory.h:140) ==8764== by 0x787F30E: Variant::ObjData::unref() (variant.cpp:1124) ==8764== by 0x788042C: Variant::_clear_internal() (variant.cpp:1419) ==8764== by 0x2FC9198: Variant::clear() (variant.h:326) ==8764== by 0x2FC9205: Variant::~Variant() (variant.h:820) ==8764== by 0x30118C5: CowData::_unref() (cowdata.h:265) ==8764== by 0x300C879: CowData::~CowData() (cowdata.h:479) ==8764== by 0x3006C05: Vector::~Vector() (vector.h:291) ==8764== Address 0x1ad4e2b8 is 200 bytes inside a block of size 432 free'd ==8764== at 0xBED21EF: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D83FD: Memory::free_static(void*, bool) (memory.cpp:201) ==8764== by 0x7BB2FDB: void memdelete >(HashMapElement*) (memory.h:143) ==8764== by 0x7BB099F: DefaultTypedAllocator >::delete_allocation(HashMapElement*) (memory.h:245) ==8764== by 0x7BADC30: HashMap, DefaultTypedAllocator > >::erase(StringName const&) (hash_map.h:392) ==8764== by 0x7BA6DD7: GDExtension::_unregister_extension_class(void*, void const*) (gdextension.cpp:643) ==8764== by 0x1650D7C4: godot::ClassDB::deinitialize(GDExtensionInitializationLevel) (class_db.cpp:407) ==8764== by 0x16503753: godot::GDExtensionBinding::deinitialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:539) ==8764== by 0x7BA77BE: GDExtension::deinitialize_library(GDExtension::InitializationLevel) (gdextension.cpp:737) ==8764== by 0x7BD463B: GDExtensionManager::deinitialize_extensions(GDExtension::InitializationLevel) (gdextension_manager.cpp:220) ==8764== by 0x309F3B3: Main::cleanup(bool) (main.cpp:4592) ==8764== by 0x2FC8527: main (godot_linuxbsd.cpp:89) ==8764== Block was alloc'd at ==8764== at 0xBECF808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==8764== by 0x75D7D5D: Memory::alloc_static(unsigned long, bool) (memory.cpp:108) ==8764== by 0x75D7B7E: operator new(unsigned long, char const*) (memory.cpp:41) ==8764== by 0x7BB1EEA: HashMapElement* DefaultTypedAllocator >::new_allocation >(HashMapElement const&&) (memory.h:244) ==8764== by 0x7BAFCB7: HashMap, DefaultTypedAllocator > >::_insert(StringName const&, GDExtension::Extension const&, bool) (hash_map.h:225) ==8764== by 0x7BAD163: HashMap, DefaultTypedAllocator > >::operator[](StringName const&) (hash_map.h:589) ==8764== by 0x7BA542A: GDExtension::_register_extension_class_internal(void*, void const*, void const*, GDExtensionClassCreationInfo4 const*, GDExtension::ClassCreationDeprecatedInfo const*) (gdextension.cpp:390) ==8764== by 0x7BA4B9E: GDExtension::_register_extension_class3(void*, void const*, void const*, GDExtensionClassCreationInfo3 const*) (gdextension.cpp:344) ==8764== by 0x164C8799: void godot::ClassDB::_register_class(bool, bool, bool) (class_db.hpp:268) ==8764== by 0x164C602F: void godot::ClassDB::register_class(bool) (class_db.hpp:279) ==8764== by 0x16499972: initialize_gdextension_types(godot::ModuleInitializationLevel) (register_types.cpp:103) ==8764== by 0x165035E3: godot::GDExtensionBinding::initialize_level(void*, GDExtensionInitializationLevel) (godot.cpp:511) ```

I believe the problem that causes the documentation to be deleted occurs during the --import command rather than during the --doctool command.

The class registration in the stack trace is here, which is weirdly not the first or last class registered (although it is the first RichTextEffect subclass registered) https://github.com/BenLubar/godot4-spy-cards-online/blob/0682542f7c97a683e0e1888a59bc7fa29d731c75/src/register_types.cpp#L101 There are no properties or methods defined by that type (it just overrides a pure virtual method) https://github.com/BenLubar/godot4-spy-cards-online/blob/0682542f7c97a683e0e1888a59bc7fa29d731c75/src/outline_current_effect.cpp#L6

BenLubar commented 1 month ago

Running numactl --physcpubind=+1 godot --import (so, with GUI and without multiple simultaneous threads) instead of godot --headless --import seems to at least partially mitigate the issue.