Open Zylann opened 6 years ago
Are you using some module?
@Ranoller no, just official Godot 2.1.4.
No idea then... DragonBones module gives to me ObjectDB Instances still exist! on app exit, but only on exit (and i´m going to report that right now)
To me it's quite obvious: there is a circular reference. Now I'm not sure if that's really intented to produce one or not. If it is, would be nice to show a warning when the resource gets loaded.
No error until close with your test. On quit there are the 2 first mensagges (GDFunction and GDScript). Last two messages aren´t printed.
Second time that executes the four messages are printed.
@Ranoller it's random :p
Related to #15839
According to https://github.com/godotengine/godot/issues/15839#issuecomment-358632016:
This is not a bug, this is a feature. It's in the GDScript documentation. Any cycles are leaked.
Uh, I have the same issue, but I don't know what is causing it. I'm not using cyclic preloading anywhere (at least not intentionally) and the issue seems to appear only in exported project. Is there a way to trace the problem? I'm using Godot 3.0.2
@KoBeWi what is your complete log of errors? The one about the leak can be caused by many things, not just cyclic refs
It's the same as here, but with different line numbers (probably because of Godot version):
ERROR: SelfList
::List::~List: Condition ' _first != 0 ' is true. At: c:\projects\godot-builds\godot\core\self_list.h:100 ERROR: SelfList ::List::~List: Condition ' _first != 0 ' is true. At: c:\projects\godot-builds\godot\core\self_list.h:100 WARNING: ObjectDB::cleanup: ObjectDB Instances still exist! At: core\object.cpp:1989 ERROR: ResourceCache::clear: Resources Still in use at Exit! At: core\resource.cpp:418
Looks like in 3.1 you are prevented from circular preloading:
E 0:00:00:0683 Resource: 'res://new_script.gd' is already being loaded. Cyclic reference?
I can confirm the issue in 3.2.4 RC 1, and it happens with class_name
too when you reference the current class in itself, e.g.:
extends Node
class_name MyNode
var test : MyNode = null
It appears to be fixed in master
, but a fix for 3.2
would still be very welcome.
Related to / partial duplicate of #21461.
Godot 2.1.5 beta, Godot 2.1.4, Windows 10 64 bits
I found out my project had a circular dependency between two scripts which were preloading each other into a
const
(though the game has worked perfectly fine so far, it's been a year). The use case was only to useextends
on it. Workaround is to useload
...The result of this is a random memory leak (which doesn't always happen) and two cryptic errors:
Reproduction project; CircularScriptPreload.zip