-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Godot reports "Resources still in use at exit" #132
Comments
I have this problem too, thought it was something I did. |
@deadhostdave Have you modified any of the mentioned call sites to confirm that doing it differently does in fact fix the leaks? I'm a little hesitant to take this error at face value, as I've seen it in a lot of non-Qodot projects, and Godot's reference-counted memory model (which I'm open to the idea that my understanding is flawed here, but equally cognizant that Godot has a habit of outputting 'harmless' errors such as the "Time should be greater than zero." spam that's been happening on startup for a few versions now. Also, can you post the output with |
@Shfty I've modified For (1)-(3) above, I believe the leak is from I agree that Partial fix in
This is the original verbose output. I think that the And with the above partial fix applied: partial_fix_verbose_output.txt Now... for issue (4) - I need to look at more, as I'm no longer confident I didn't generate a TrenchBroom map that uses |
Quick update for issue (4). I don't know if I've done something stupid here and misunderstood something or not. Is The issue I've seen appears to occur when a Verbose output with a simple map - 1 entity with spawn type group applied: This can be quickly tested with:
I appreciate this is taking advantage of "func_group" (being marked as |
The TrenchBroom Group Hierarchy setting is a bit complicated - TB uses hidden A conversion has to take place that assumes a few things about your map structure - namely that each There's some info about it on the wiki, and an example map demonstrating the intended usage inside the plugin directory. If memory serves, the Being honest, it's not the best approach - it'd probably be better off as a completely distinct step from the map building itself, but that's beyond the scope of |
This comment has been minimized.
This comment has been minimized.
Thanks for taking the time to explain that - very helpful! I need to read up on how to handle grouping in TB and make sure all groups meet Qodot constraints. I was thinking that I could use grouping to group "rooms" to make use of the upcoming Portal Culling feature in the next Godot. Are you considering the fix above for leaks (1)-(3)? Also, how would you feel about adding a final post attach build step that looped over all remaining entities in the Is the plan that qodot-next will ultimately supersede qodot? |
@deadhostdave for what it's worth I've been working on a blender script to convert objs exported from trenchbroom into a format that is importable into several different n64 games all of which use room systems (and a few of which use portals too), I put an initial version on the overkart64 discord but that version naturally only supports mario kart 64 for now, but I plan to support other games too including godot. So maybe that can be a possible option for you if using qodot directly doesnt work out |
When building a map at runtime, Godot reports:
ERROR: clear: Resources still in use at exit (run with --verbose for details). At: core/resource.cpp:450
I can reproduce this using a fresh project with Qodot addon, and running the 'runtime-map-building' example.
I've had a look into the issue, and have found sources of the leaks:
build_entity_nodes
: node is allocated at top of for loop, which can be overwriting the reference to already allocated node in the previous iteration; in the "continue" case.build_entity_nodes
: node is overwritten withClassDB.instance()
build_entity_nodes
: node is overwritten withentity_definition.scene_file.instance()
build_entity_nodes
: ifuse_trenchbroom_group_hierarchy
is enabled, the node is added to theentity_nodes
but may not be given toqueue_add_child
- some of these nodes do not end up in the scene tree, and leak. Should these nodes end up in the scene tree duringresolve_group_hierarchy
?The text was updated successfully, but these errors were encountered: