godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.12k stars 21.18k forks source link

Godot 4 Alpha 14 - Crash upon searching class documentation #64962

Closed hristo-kanchev closed 2 years ago

hristo-kanchev commented 2 years ago

Godot version

4.0 alpha 14

System information

Windows 11 x64, RTX 2070 Max-Q, Vulcan mobile

Issue description

Editor crashes when searching for custom in TileSetAtlasSource class documentation.

Steps to reproduce

  1. Create an empty project and a Node2D scene.
  2. Add a script to it, and add the following line to it: var tile_set_atlas_source: TileSetAtlasSource
  3. Ctrl+Left Click on TileSetAtlasSource so you can get redirected to the class documentation.
  4. Ctrl+F Search for custom and press Enter

Minimal reproduction project

godot4_alpha14_doc_search_crash.zip

qarmin commented 2 years ago

For me this looks like infinite loop

#0  _find_lower (ch=99) at ./core/string/ucaps.h:1403
#1  0x00000000071b290b in String::findn (this=0x7fffffffc4c0, p_str=..., p_from=0) at core/string/ustring.cpp:2983
#2  0x000000000537e0c1 in RichTextLabel::_search_line (this=0x24850ba0, p_frame=0x2484d030, p_line=21, p_string=..., p_char_idx=0, p_reverse_search=false) at scene/gui/rich_text_label.cpp:4508
#3  0x000000000537e674 in RichTextLabel::search (this=0x24850ba0, p_string=..., p_from_selection=true, p_search_previous=false) at scene/gui/rich_text_label.cpp:4592
#4  0x0000000003f25a41 in FindBar::_search (this=0x24868050, p_search_previous=false) at editor/editor_help.cpp:2297
#5  0x0000000003f2599f in FindBar::search_next (this=0x24868050) at editor/editor_help.cpp:2286
#6  0x0000000003f2670e in FindBar::_search_text_submitted (this=0x24868050, p_text=...) at editor/editor_help.cpp:2385
#7  0x0000000003f31f20 in call_with_variant_args_helper<FindBar, String const&, 0ul> (p_instance=0x24868050, 
    p_method=(void (FindBar::*)(FindBar * const, const String &)) 0x3f266ca <FindBar::_search_text_submitted(String const&)>, p_args=0x7fffffffc9c0, r_error=...) at ./core/variant/binder_common.h:262
#8  0x0000000003f3199e in call_with_variant_args<FindBar, String const&> (p_instance=0x24868050, 
    p_method=(void (FindBar::*)(FindBar * const, const String &)) 0x3f266ca <FindBar::_search_text_submitted(String const&)>, p_args=0x7fffffffc9c0, p_argcount=1, r_error=...) at ./core/variant/binder_common.h:376
#9  0x0000000003f2fd02 in CallableCustomMethodPointer<FindBar, String const&>::call (this=0x24846660, p_arguments=0x7fffffffc9c0, p_argcount=1, r_return_value=..., r_call_error=...)
    at ./core/object/callable_method_pointer.h:104
#10 0x0000000006de9799 in Callable::callp (this=0x258626a8, p_arguments=0x7fffffffc9c0, p_argcount=1, r_return_value=..., r_call_error=...) at core/variant/callable.cpp:50
#11 0x00000000071354f0 in Object::emit_signalp (this=0x24868a40, p_name=..., p_args=0x7fffffffc9c0, p_argcount=1) at core/object/object.cpp:990
#12 0x000000000360163e in Object::emit_signal<String> (this=0x24868a40, p_name=...) at ./core/object/object.h:818
#13 0x00000000052d55cf in LineEdit::gui_input (this=0x24868a40, p_event=...) at scene/gui/line_edit.cpp:461
#14 0x00000000051dc352 in Control::_call_gui_input (this=0x24868a40, p_event=...) at scene/gui/control.cpp:1664
#15 0x00000000050e0287 in Viewport::_gui_input_event (this=0xf1319b0, p_event=...) at scene/main/viewport.cpp:1984
#16 0x00000000050e51b4 in Viewport::push_input (this=0xf1319b0, p_event=..., p_local_coords=false) at scene/main/viewport.cpp:2746
#17 0x0000000005128f70 in Window::_window_input (this=0xf1319b0, p_ev=...) at scene/main/window.cpp:1045
#18 0x00000000051493e2 in call_with_variant_args_helper<Window, Ref<InputEvent> const&, 0ul> (p_instance=0xf1319b0, 
    p_method=(void (Window::*)(Window * const, const Ref<InputEvent> &)) 0x5128dc2 <Window::_window_input(Ref<InputEvent> const&)>, p_args=0x7fffffffd0e8, r_error=...) at ./core/variant/binder_common.h:262
#19 0x00000000051462d5 in call_with_variant_args<Window, Ref<InputEvent> const&> (p_instance=0xf1319b0, 
    p_method=(void (Window::*)(Window * const, const Ref<InputEvent> &)) 0x5128dc2 <Window::_window_input(Ref<InputEvent> const&)>, p_args=0x7fffffffd0e8, p_argcount=1, r_error=...) at ./core/variant/binder_common.h:376
#20 0x0000000005142650 in CallableCustomMethodPointer<Window, Ref<InputEvent> const&>::call (this=0x1d1448d0, p_arguments=0x7fffffffd0e8, p_argcount=1, r_return_value=..., r_call_error=...)
    at ./core/object/callable_method_pointer.h:104
#21 0x0000000006de9799 in Callable::callp (this=0x7fffffffd130, p_arguments=0x7fffffffd0e8, p_argcount=1, r_return_value=..., r_call_error=...) at core/variant/callable.cpp:50
#22 0x000000000256f9d0 in DisplayServerX11::_dispatch_input_event (this=0xbe6d590, p_event=...) at platform/linuxbsd/display_server_x11.cpp:3184
#23 0x000000000256f733 in DisplayServerX11::_dispatch_input_events (p_event=...) at platform/linuxbsd/display_server_x11.cpp:3155
#24 0x0000000006d8828b in Input::_parse_input_event_impl (this=0xbdb3bb0, p_event=..., p_is_emulated=false) at core/input/input.cpp:663
#25 0x0000000006d8989b in Input::flush_buffered_events (this=0xbdb3bb0) at core/input/input.cpp:888
#26 0x0000000002574591 in DisplayServerX11::process_events (this=0xbe6d590) at platform/linuxbsd/display_server_x11.cpp:4173
#27 0x0000000002554420 in OS_LinuxBSD::run (this=0x7fffffffd890) at platform/linuxbsd/os_linuxbsd.cpp:536
#28 0x000000000254ed05 in main (argc=2, argv=0x7fffffffddb8) at platform/linuxbsd/godot_linuxbsd.cpp:72