godot: Editor freeze and memory leak during scene save

Godot version: de0d30655859a46eaf711e209fe20d9ca60a60f2 (but the issue is present since I’m on 3.1 branch (i switched shortly after alpha1))

OS/device including version: Ubuntu 18.04, 64bit, GTX1060

Issue description: Sometimes when I’m saving scene (or more often when it’s autosaving during the game/scene launch) the editor is freezing and starting leaking memory fast. When this happens in the terminal there is an infinite loop of Object was deleted while awaiting a callback messages. I’m unable to reproduce this is any reliable way, opening the issue in hope that other people will share their observations. might be related to: #21590

Steps to reproduce:

Minimal reproduction project:

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 9
  • Comments: 31 (26 by maintainers)

Commits related to this issue

Most upvoted comments

@kubecz3k @groud reverting 8f3beca apparently did not work, sorry. @kubecz3k can you inspect which function is being called? For me it is “_tree_thumbnail_done”

image

@kubecz3k It seems to me that godot is “leaking” files in the .import folder, because it is not removing them when an item is moved, it seems like it creates a new file instead and does no check for orphan ones (EDIT found the issue related #17733). Might be related to this problem.

I have recently deleted some additional files from my project and reimported all the assets and it seems it’s way better now (to fresh to be sure). Will check without 8f3beca if I will encounter this again.

I am having the problem again, here my stacktrace

1  MessageQueue::statistics                      message_queue.cpp           213  0x3f4472c 
2  MessageQueue::push_call                       message_queue.cpp           54   0x3f43f3c 
3  MessageQueue::push_call                       message_queue.cpp           91   0x3f45127 
4  MessageQueue::push_call                       message_queue.cpp           157  0x3f45e04 
5  Object::call_deferred                         object.cpp                  1773 0x3f5bb15 
6  EditorResourcePreview::queue_resource_preview editor_resource_preview.cpp 354  0x23570c9 
7  FileSystemDock::_create_tree                  filesystem_dock.cpp         113  0x23d27ae 
8  FileSystemDock::_create_tree                  filesystem_dock.cpp         84   0x23d2302 
9  FileSystemDock::_create_tree                  filesystem_dock.cpp         84   0x23d2302 
10 FileSystemDock::_update_tree                  filesystem_dock.cpp         223  0x23d3e19 
11 FileSystemDock::_fs_changed                   filesystem_dock.cpp         852  0x23dcbda 
12 MethodBind0<FileSystemDock>::call             method_bind.gen.inc         137  0x23fc206 
13 Object::call                                  object.cpp                  945  0x3f522be 
14 Object::emit_signal                           object.cpp                  1231 0x3f54085 
15 Object::_emit_signal                          object.cpp                  1158 0x3f536f9 
16 MethodBindVarArg<Object>::call                method_bind.h               342  0x3f6a058 
17 Object::call                                  object.cpp                  945  0x3f522be 
18 MessageQueue::_call_function                  message_queue.cpp           256  0x3f45f93 
19 MessageQueue::flush                           message_queue.cpp           300  0x3f4624e 
20 SceneTree::iteration                          scene_tree.cpp              476  0x2d776d2 
21 Main::iteration                               main.cpp                    1848 0x1533550 
22 OS_X11::run                                   os_x11.cpp                  2821 0x14fbf0e 
23 main                                          godot_x11.cpp               55   0x14ebe01 

@kubecz3k Apparently now it is possible to copy from qtcreator stack with rightclick > copy to clipboard. I have the latest version available on ArchLinux.

@dodgyville Yes. After deleting all temporary files and folders in …/Godot saving seems to work propperly again.

edit: sorry, false alarm. The bug problem still occurs.

Also happening with alpha2 Win10-64 (while porting a project from 3.0, using GLES3 for now). Systematically appears when saving any scene, even a simple button scene (with 2 nodes: main parent button node, and child label, with a simple gdscript attached to the parent node, which is a tool script that mostly sets label text/font). I don’t know how to hunt down this problem, so far making it impossible to use alpha2 (with my code base).