bruvzg / gdsdecomp

Godot reverse engineering tools
MIT License
1.34k stars 134 forks source link

ObjectDB instances leaked at exit #169

Open TotallyNotSethP opened 4 months ago

TotallyNotSethP commented 4 months ago

System information

Windows 10

Issue description

When using GDRE Tools, it always gives these two errors after I recover a project: image

WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
     at: ObjectDB::cleanup (core\object\object.cpp:2208)
Leaked instance: RegEx:-9219871741587745337
Hint: Leaked instances typically happen when nodes are removed from the scene tree (with `remove_child()`) but not freed (with `free()` or `queue_free()`).

The project recovers successfully, but the "memory could not be read" pop-up is rather bothersome since I am trying to use GDRE Tools as part of a larger development pipeline...

Steps to reproduce

  1. Run gdre_tools.exe --headless and add the relevant options to specify the .pck to decompile

Recovery log

GDRE Tools v0.6.2 Windows 10.0.19045, headless Opening file: D:/SteamLibrary/steamapps/common/Dungeons & Degenerate Gamblers Demo/DnDG_64.pck Successfully loaded PCK! Version: 3.5.3 Verified 870 files, no errors detected! Extracted 870 files, no errors detected! USER WARNING: Converting lossy imports, you may lose fidelity for indicated assets when re-importing upon loading the project at: ImportExporter::_export_imports (modules\gdsdecomp\utility\import_exporter.cpp:58) Script version 3.5.3 (rev 0xa7aad78) detected Saved project config project.godot. Recreated plugin config for integer_resolution_handler USER WARNING: res://localisation/localisation.en.translation: Doing real load on incompatible version 3 at: ResourceFormatLoaderCompat::load (modules\gdsdecomp\compat\resource_loader_compat.cpp:98) USER WARNING: Could not guess all keys in translation.csv at: ImportExporter::export_translation (modules\gdsdecomp\utility\import_exporter.cpp:817) Recreated translation.csv Did not rewrite import metadata for res://localisation/localisation.csv Saved project config project.godot.

****EXPORT REPORT****

Totals:
Decompiled scripts: 187 Failed scripts: 0 Imported resources for export session: 159 Successfully converted: 159 Lossy: 1 Rewrote metadata: 0 Non-importable conversions: 1 Not converted: 0 Failed conversions: 0

The following files were converted from an import that was stored lossy. You may lose fidelity when re-importing these files upon loading the project. res://localisation/localisation.en.translation to res://.assets/localisation/localisation.csv

The following files were converted and saved to a non-original path, but did not have their import data rewritten. These files will not be re-imported when loading the project. res://localisation/localisation.en.translation to res://.assets/localisation/localisation.csv

---------------------------------IMPORTANT NOTES----------------------------------

WARNING: Could not recover 559 keys for translation.csv Saved localisation.csv to res://.assets/localisation/localisation.csv If you wish to modify the translation csv(s), you will have to manually find the missing keys, replace them in the csv, and then copy it back to the original path Note: consider just asking the creator if you wish to add a translation


Use Godot editor version 3.5.3 to edit the project. Note: the project may be using a custom version of Godot. Detection for this has not been implemented yet. If you find that you have many non-import errors upon opening the project (i.e. scripts or shaders have many errors), use the original game's binary as the export template.


Minimal reproduction project

No response

nikitalita commented 3 months ago

The ObjectDB instance leak is unrelated (and it's intentional; you can't have statically defined RegExes in Godot, and it kills performance if we have to recompile it every time).

I think this is fixed on this PR; when the build action is done, can you try out the artifacts here? https://github.com/bruvzg/gdsdecomp/actions/runs/8242343695?pr=164

TotallyNotSethP commented 3 months ago

It appears the windows compilation failed so there isn't an artifact at that link i can run (I'm on Windows 10)