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

Opening certain popups freezes the whole computer (Linux) #72012

Closed
MewPurPur opened this issue Jan 25, 2023 · 2 comments · Fixed by #72018
Closed

Opening certain popups freezes the whole computer (Linux) #72012

MewPurPur opened this issue Jan 25, 2023 · 2 comments · Fixed by #72018

Comments

@MewPurPur
Copy link
Contributor

Godot version

Latest 4.0.dev (a3a4215)

System information

Ubuntu 22.04.1 LTS

Issue description

Ctrl+Shift+F (Find in Files) in the text editor, for example, causes my laptop to freeze consistently. I also reproduced it with F1 and Ctrl+Shift+R, as well as by using the dropdown instead of shortcuts.

Steps to reproduce

Trivial

Minimal reproduction project

N/A

@clayjohn
Copy link
Member

What is the earliest beta you can reproduce this issue on? Could you try out beta 14 and beta 13 and report back?

@akien-mga
Copy link
Member

akien-mga commented Jan 25, 2023

I can reproduce the issue on Linux too (Mageia 9), with a recent build from the master branch (ffb7c6e). On Rocket.chat @boruok also mentioned reproducing it.

I don't reproduce it in 4.0 beta 14 so it seems to be a recent regression.

I ran it through gdb and interrupted while it started freezing, here's the stacktrace (cc @bruvzg):

0x0000000006e42a1e in TextServerAdvanced::_shape_run (this=0xc1afc10, p_sd=0x25b314b0, p_start=1, p_end=6, p_script=HB_SCRIPT_LATIN, p_direction=HB_DIRECTION_LTR, p_fonts=..., p_span=0, p_fb_index=0, p_prev_start=0, p_prev_end=0) at modules/text_server_adv/text_server_adv.cpp:5509
warning: Source file is more recent than executable.
5509                    p_sd->descent = MAX(p_sd->descent, _font_get_descent(f, fs));

(gdb) bt
#0  0x0000000006e42a1e in TextServerAdvanced::_shape_run (this=0xc1afc10, p_sd=0x25b314b0, p_start=1, p_end=6, p_script=HB_SCRIPT_LATIN, p_direction=HB_DIRECTION_LTR, p_fonts=..., p_span=0, p_fb_index=0, 
    p_prev_start=0, p_prev_end=0) at modules/text_server_adv/text_server_adv.cpp:5509
#1  0x0000000006e4402a in TextServerAdvanced::_shaped_text_shape (this=0xc1afc10, p_shaped=...) at modules/text_server_adv/text_server_adv.cpp:5700
#2  0x0000000006e3ba9e in TextServerAdvanced::_shaped_text_tab_align (this=0xc1afc10, p_shaped=..., p_tab_stops=...) at modules/text_server_adv/text_server_adv.cpp:4386
#3  0x0000000006e4ef51 in TextServerAdvanced::shaped_text_tab_align (this=0xc1afc10, arg1=..., arg2=...) at modules/text_server_adv/text_server_adv.h:882
#4  0x000000000915779a in TextParagraph::_shape_lines (this=0x25b31260) at scene/resources/text_paragraph.cpp:144
#5  0x000000000915aca3 in TextParagraph::get_line_count (this=0x25b31260) at scene/resources/text_paragraph.cpp:513
#6  0x00000000087b9202 in TextEdit::Text::get_line_wrap_amount (this=0x259edaa8, p_line=17) at scene/gui/text_edit.cpp:118
#7  0x00000000087b9de9 in TextEdit::Text::invalidate_cache (this=0x259edaa8, p_line=17, p_column=21, p_text_changed=true, p_ime_text=..., p_bidi_override=...) at scene/gui/text_edit.cpp:220
#8  0x00000000087c48e3 in TextEdit::_notification (this=0x259ed130, p_what=2013) at scene/gui/text_edit.cpp:1562
#9  0x000000000857afc8 in TextEdit::_notificationv (this=0x259ed130, p_notification=2013, p_reversed=false) at ./scene/gui/text_edit.h:42
#10 0x000000000857b921 in CodeEdit::_notificationv (this=0x259ed130, p_notification=2013, p_reversed=false) at scene/gui/code_edit.h:37
#11 0x000000000a4a0c23 in Object::notification (this=0x259ed130, p_notification=2013, p_reversed=false) at core/object/object.cpp:790
#12 0x000000000845c0ba in Node::propagate_notification (this=0x259ed130, p_notification=2013) at scene/main/node.cpp:1926
#13 0x000000000845c0eb in Node::propagate_notification (this=0x259eba40, p_notification=2013) at scene/main/node.cpp:1929
#14 0x000000000845c0eb in Node::propagate_notification (this=0x2309fac0, p_notification=2013) at scene/main/node.cpp:1929
#15 0x000000000845c0eb in Node::propagate_notification (this=0x259f03d0, p_notification=2013) at scene/main/node.cpp:1929
#16 0x000000000845c0eb in Node::propagate_notification (this=0x1968a330, p_notification=2013) at scene/main/node.cpp:1929
#17 0x000000000845c0eb in Node::propagate_notification (this=0x19688c00, p_notification=2013) at scene/main/node.cpp:1929
#18 0x000000000845c0eb in Node::propagate_notification (this=0x1964c0d0, p_notification=2013) at scene/main/node.cpp:1929
#19 0x000000000845c0eb in Node::propagate_notification (this=0x196486e0, p_notification=2013) at scene/main/node.cpp:1929
#20 0x000000000845c0eb in Node::propagate_notification (this=0x19646f70, p_notification=2013) at scene/main/node.cpp:1929
#21 0x000000000845c0eb in Node::propagate_notification (this=0x1058e7e0, p_notification=2013) at scene/main/node.cpp:1929
#22 0x000000000845c0eb in Node::propagate_notification (this=0x10580e40, p_notification=2013) at scene/main/node.cpp:1929
#23 0x000000000845c0eb in Node::propagate_notification (this=0x104ff050, p_notification=2013) at scene/main/node.cpp:1929
#24 0x000000000845c0eb in Node::propagate_notification (this=0x104fbf20, p_notification=2013) at scene/main/node.cpp:1929
#25 0x000000000845c0eb in Node::propagate_notification (this=0x10009fc0, p_notification=2013) at scene/main/node.cpp:1929
#26 0x000000000845c0eb in Node::propagate_notification (this=0x10008810, p_notification=2013) at scene/main/node.cpp:1929
--Type <RET> for more, q to quit, c to continue without paging--
#27 0x000000000845c0eb in Node::propagate_notification (this=0x100058e0, p_notification=2013) at scene/main/node.cpp:1929
#28 0x000000000845c0eb in Node::propagate_notification (this=0xfff3210, p_notification=2013) at scene/main/node.cpp:1929
#29 0x000000000845c0eb in Node::propagate_notification (this=0xffe0cf0, p_notification=2013) at scene/main/node.cpp:1929
#30 0x000000000845c0eb in Node::propagate_notification (this=0xffde500, p_notification=2013) at scene/main/node.cpp:1929
#31 0x000000000845c0eb in Node::propagate_notification (this=0xffc8270, p_notification=2013) at scene/main/node.cpp:1929
#32 0x000000000845c0eb in Node::propagate_notification (this=0xffc77c0, p_notification=2013) at scene/main/node.cpp:1929
#33 0x000000000845c0eb in Node::propagate_notification (this=0xe8e5da0, p_notification=2013) at scene/main/node.cpp:1929
#34 0x000000000845c0eb in Node::propagate_notification (this=0xe7c2850, p_notification=2013) at scene/main/node.cpp:1929
#35 0x000000000848c6ed in SceneTree::_notification (this=0xe73e7d0, p_notification=2013) at scene/main/scene_tree.cpp:646
#36 0x0000000008499f1e in SceneTree::_notificationv (this=0xe73e7d0, p_notification=2013, p_reversed=false) at scene/main/scene_tree.h:83
#37 0x000000000a4a0c23 in Object::notification (this=0xe73e7d0, p_notification=2013, p_reversed=false) at core/object/object.cpp:790
#38 0x00000000053f43b2 in DisplayServerX11::window_set_ime_active (this=0xc2a7a10, p_active=true, p_window=0) at platform/linuxbsd/x11/display_server_x11.cpp:2527
#39 0x00000000087c3d6e in TextEdit::_notification (this=0x259ed130, p_what=30) at scene/gui/text_edit.cpp:1482
#40 0x000000000857afc8 in TextEdit::_notificationv (this=0x259ed130, p_notification=30, p_reversed=false) at ./scene/gui/text_edit.h:42
#41 0x000000000857b921 in CodeEdit::_notificationv (this=0x259ed130, p_notification=30, p_reversed=false) at scene/gui/code_edit.h:37
#42 0x000000000a4a0c23 in Object::notification (this=0x259ed130, p_notification=30, p_reversed=false) at core/object/object.cpp:790
#43 0x00000000083ef42d in CanvasItem::_redraw_callback (this=0x259ed130) at scene/main/canvas_item.cpp:135
#44 0x00000000075dcac2 in call_with_variant_args_helper<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (p_instance=0x259ed130, 
    p_method=(void (CanvasItem::*)(CanvasItem * const)) 0x83ef396 <CanvasItem::_redraw_callback()>, p_args=0x0, r_error=...) at ./core/variant/binder_common.h:293
#45 0x00000000075da597 in call_with_variant_args<CanvasItem> (p_instance=0x259ed130, p_method=(void (CanvasItem::*)(CanvasItem * const)) 0x83ef396 <CanvasItem::_redraw_callback()>, p_args=0x0, p_argcount=0, 
    r_error=...) at ./core/variant/binder_common.h:407
#46 0x00000000075d67aa in CallableCustomMethodPointer<CanvasItem>::call (this=0xf3b3270, p_arguments=0x0, p_argcount=0, r_return_value=..., r_call_error=...) at ./core/object/callable_method_pointer.h:104
#47 0x000000000a171293 in Callable::callp (this=0x7ffff13f76d0, p_arguments=0x0, p_argcount=0, r_return_value=..., r_call_error=...) at core/variant/callable.cpp:50
#48 0x000000000a49a96d in MessageQueue::_call_function (this=0xbec9040, p_callable=..., p_args=0x7ffff13f76e8, p_argcount=0, p_show_error=false) at core/object/message_queue.cpp:229
#49 0x000000000a49ac75 in MessageQueue::flush (this=0xbec9040) at core/object/message_queue.cpp:275
#50 0x000000000848b68b in SceneTree::physics_process (this=0xe73e7d0, p_time=0.016666666666666666) at scene/main/scene_tree.cpp:430
#51 0x000000000545bbe7 in Main::iteration () at main/main.cpp:3087
#52 0x00000000053df986 in OS_LinuxBSD::run (this=0x7fffffffd1a0) at platform/linuxbsd/os_linuxbsd.cpp:878
--Type <RET> for more, q to quit, c to continue without paging--
#53 0x00000000053d6e40 in main (argc=4, argv=0x7fffffffd708) at platform/linuxbsd/godot_linuxbsd.cpp:73

Checked some other stacktraces some frames later, the key seems to be DisplayServerX11::window_set_ime_active as a trigger.

On 4.0 beta 14 however, I get error spam of this kind:

ERROR: Condition "!sd" is true. Returning: nullptr
   at: _shaped_text_get_glyphs (modules/text_server_adv/text_server_adv.cpp:5730)
ERROR: Condition "!sd" is true. Returning: 0
   at: _shaped_text_get_glyph_count (modules/text_server_adv/text_server_adv.cpp:5741)
ERROR: Condition "!sd" is true. Returning: 0.0
   at: _shaped_text_get_ascent (modules/text_server_adv/text_server_adv.cpp:5818)
ERROR: Condition "!sd" is true. Returning: Vector2i()
   at: _shaped_text_get_range (modules/text_server_adv/text_server_adv.cpp:5770)
ERROR: Condition "!sd" is true. Returning: Vector2i()
   at: _shaped_text_get_range (modules/text_server_adv/text_server_adv.cpp:5770)

but that might be unrelated, I was tested on a script with some emojis and they got totally borked going from master to beta 14.

@akien-mga akien-mga moved this from To Assess to Todo in 4.x Priority Issues Jan 25, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in 4.x Priority Issues Jan 25, 2023
@akien-mga akien-mga changed the title Opening certain popups freezes the whole computer Opening certain popups freezes the whole computer (Linux) Jan 25, 2023
@akien-mga akien-mga pinned this issue Jan 25, 2023
@akien-mga akien-mga unpinned this issue Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants