Skip to content
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

Hang on quit due to EditorResourcePreview destructor #24669

Closed
hedin-hiervard opened this issue Dec 30, 2018 · 3 comments
Closed

Hang on quit due to EditorResourcePreview destructor #24669

hedin-hiervard opened this issue Dec 30, 2018 · 3 comments

Comments

@hedin-hiervard
Copy link
Contributor

Godot version:

Godot 3.1 alpha 4

OS/device including version:

Issue description:

Pretty often Godot editor hangs on quit. Here is the stacktrace:

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fffcae17f46 libsystem_kernel.dylib`__semwait_signal + 10
    frame #1: 0x00007fffcaf046e5 libsystem_pthread.dylib`pthread_join + 425
    frame #2: 0x0000000106310fd2 godot.osx.tools.64`ThreadPosix::wait_to_finish_func_posix(p_thread=0x00007ff483759240) at thread_posix.cpp:100
    frame #3: 0x00000001082ee1d7 godot.osx.tools.64`Thread::wait_to_finish(p_thread=0x00007ff483759240) at thread.cpp:59
    frame #4: 0x0000000106802630 godot.osx.tools.64`EditorResourcePreview::~EditorResourcePreview(this=0x00007ff48376efd0) at editor_resource_preview.cpp:433
    frame #5: 0x00000001068027d5 godot.osx.tools.64`EditorResourcePreview::~EditorResourcePreview(this=0x00007ff48376efd0) at editor_resource_preview.cpp:429
    frame #6: 0x0000000106701132 godot.osx.tools.64`void memdelete<Node>(p_class=0x00007ff48376efd0) at memory.h:119
    frame #7: 0x0000000107024509 godot.osx.tools.64`Node::_notification(this=0x00007ff47c07cc10, p_notification=1) at node.cpp:162
    frame #8: 0x0000000106fd27e7 godot.osx.tools.64`Node::_notificationv(this=0x00007ff47c07cc10, p_notification=1, p_reversed=true) at node.h:46
    frame #9: 0x0000000106743729 godot.osx.tools.64`EditorNode::_notificationv(this=0x00007ff47c07cc10, p_notification=1, p_reversed=true) at editor_node.h:100
    frame #10: 0x0000000108109212 godot.osx.tools.64`Object::notification(this=0x00007ff47c07cc10, p_notification=1, p_reversed=true) at object.cpp:955
    frame #11: 0x00000001081091a9 godot.osx.tools.64`Object::_predelete(this=0x00007ff47c07cc10) at object.cpp:386
    frame #12: 0x000000010811c0e5 godot.osx.tools.64`predelete_handler(p_object=0x00007ff47c07cc10) at object.cpp:1999
    frame #13: 0x0000000106701115 godot.osx.tools.64`void memdelete<Node>(p_class=0x00007ff47c07cc10) at memory.h:117
    frame #14: 0x0000000107024509 godot.osx.tools.64`Node::_notification(this=0x00007ff47c8e6a10, p_notification=1) at node.cpp:162
    frame #15: 0x0000000106fd27e7 godot.osx.tools.64`Node::_notificationv(this=0x00007ff47c8e6a10, p_notification=1, p_reversed=true) at node.h:46
    frame #16: 0x00000001070ba189 godot.osx.tools.64`Viewport::_notificationv(this=0x00007ff47c8e6a10, p_notification=1, p_reversed=true) at viewport.h:94
    frame #17: 0x0000000108109212 godot.osx.tools.64`Object::notification(this=0x00007ff47c8e6a10, p_notification=1, p_reversed=true) at object.cpp:955
    frame #18: 0x00000001081091a9 godot.osx.tools.64`Object::_predelete(this=0x00007ff47c8e6a10) at object.cpp:386
    frame #19: 0x000000010811c0e5 godot.osx.tools.64`predelete_handler(p_object=0x00007ff47c8e6a10) at object.cpp:1999
    frame #20: 0x0000000107068c65 godot.osx.tools.64`void memdelete<Viewport>(p_class=0x00007ff47c8e6a10) at memory.h:117
    frame #21: 0x0000000107068c3e godot.osx.tools.64`SceneTree::finish(this=0x00007ff483220de0) at scene_tree.cpp:610
    frame #22: 0x0000000105708f4d godot.osx.tools.64`OS_OSX::run(this=0x00007fff5a5058f0) at os_osx.mm:2572
    frame #23: 0x0000000105710698 godot.osx.tools.64`main(argc=4, argv=0x00007fff5a506c48) at godot_main_osx.mm:100
    frame #24: 0x00007fffcace9235 libdyld.dylib`start + 1
    frame #25: 0x00007fffcace9235 libdyld.dylib`start + 1

Looks something called EditorResourcePreview deadlock the main thread.

Steps to reproduce:

Minimal reproduction project:

@Chaosus Chaosus added this to the 3.1 milestone Dec 30, 2018
@akien-mga akien-mga changed the title Hang on quit Hang on quit due to EditorResourcePreview destructor Jan 14, 2019
@akien-mga
Copy link
Member

Similar to #24206, though the stacktrace is a bit different.

@reduz
Copy link
Member

reduz commented Jan 17, 2019

fixed by e8d31cc

@reduz reduz closed this as completed Jan 17, 2019
@bruvzg
Copy link
Member

bruvzg commented Feb 26, 2019

EditorResourcePreview deadlock still happens in 22ee7ba

Main thread stack:

godot.osx.opt.tools.64!::wait_to_finish_func_posix() (godot/drivers/unix/thread_posix.cpp:111)
godot.osx.opt.tools.64!::stop() (godot/editor/editor_resource_preview.cpp:424)
godot.osx.opt.tools.64!_exit_editor (godot/editor/editor_node.cpp:2370)
godot.osx.opt.tools.64!::_discard_changes() (godot/editor/editor_node.cpp:2401)
godot.osx.opt.tools.64!::_menu_option_confirm() (godot/editor/editor_node.cpp:2167)
godot.osx.opt.tools.64!::call() (godot/core/method_bind.gen.inc:54)
godot.osx.opt.tools.64!::call() (godot/core/object.cpp:943)
godot.osx.opt.tools.64!::emit_signal() (godot/core/object.cpp:1229)
godot.osx.opt.tools.64!::emit_signal() (godot/core/object.cpp:1285)
godot.osx.opt.tools.64!::_ok_pressed() (godot/scene/gui/dialogs.cpp:387)
godot.osx.opt.tools.64!::call() (godot/core/method_bind.gen.inc:54)
godot.osx.opt.tools.64!::call() (godot/core/object.cpp:943)
godot.osx.opt.tools.64!::emit_signal() (godot/core/object.cpp:1229)
godot.osx.opt.tools.64!::emit_signal() (godot/core/object.cpp:1285)
godot.osx.opt.tools.64!::_gui_input() (godot/scene/gui/base_button.cpp:139)
godot.osx.opt.tools.64!::call() (godot/core/method_bind.gen.inc:729)
godot.osx.opt.tools.64!::call_multilevel() (godot/core/object.cpp:777)
godot.osx.opt.tools.64!::call_multilevel() (godot/core/object.cpp:883)
godot.osx.opt.tools.64!::_gui_call_input() (godot/scene/main/viewport.cpp:1542)
godot.osx.opt.tools.64!::_gui_input_event() (godot/scene/main/viewport.cpp:1912)
godot.osx.opt.tools.64!::input() (godot/scene/main/viewport.cpp:2666)
godot.osx.opt.tools.64!::_vp_input() (godot/scene/main/viewport.cpp:1320)
godot.osx.opt.tools.64!::call() (godot/core/method_bind.gen.inc:729)
godot.osx.opt.tools.64!::call() (godot/core/object.cpp:943)
godot.osx.opt.tools.64!::call() (godot/core/object.cpp:867)
godot.osx.opt.tools.64!::call_group_flags() (godot/scene/main/scene_tree.cpp:262)
godot.osx.opt.tools.64!::input_event() (godot/scene/main/scene_tree.cpp:418)
godot.osx.opt.tools.64!::_parse_input_event_impl() (godot/main/input_default.cpp:440)
godot.osx.opt.tools.64!push_input (godot/platform/osx/os_osx.mm:2574)
godot.osx.opt.tools.64!_mouseDownEvent (godot/platform/osx/os_osx.mm:614)
AppKit!-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:]
AppKit!-[NSWindow(NSEventRouting) sendEvent:]
AppKit!-[NSApplication(NSEvent) sendEvent:]
godot.osx.opt.tools.64!-[GodotApplication sendEvent:] (godot/platform/osx/os_osx.mm:165)
godot.osx.opt.tools.64!process_events (godot/platform/osx/os_osx.mm:2526)
godot.osx.opt.tools.64!run (godot/platform/osx/os_osx.mm:2608)
godot.osx.opt.tools.64!main (godot/platform/osx/godot_main_osx.mm:100)

Preview generation thread stack:

godot.osx.opt.tools.64!cgsem_wait (godot/platform/osx/semaphore_osx.cpp:60)
godot.osx.opt.tools.64!::wait() (godot/platform/osx/semaphore_osx.cpp:74)
godot.osx.opt.tools.64!push_and_ret<VisualServer, Ref<Image> (VisualServer::*)(RID, int) const, RID, int, Ref<Image> > (godot/core/command_queue_mt.h:452)
godot.osx.opt.tools.64!::texture_get_data() (godot/servers/visual/visual_server_wrap_mt.h:88)
godot.osx.opt.tools.64!::get_data() (godot/scene/resources/texture.cpp:261)
godot.osx.opt.tools.64!::generate() (godot/editor/plugins/editor_preview_plugins.cpp:101)
godot.osx.opt.tools.64!::_generate_preview() (godot/editor/editor_resource_preview.cpp:151)
godot.osx.opt.tools.64!::_thread() (godot/editor/editor_resource_preview.cpp:223)
godot.osx.opt.tools.64!::thread_callback() (godot/drivers/unix/thread_posix.cpp:74)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants