godotengine / godot

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

GDScript completion crashes when indexing a duplicate of the script from itself #57669

Open you-win opened 2 years ago

you-win commented 2 years ago

Godot version

3.4.2.stable

System information

Windows 10, AMD Ryzen 7 5800X, NVIDIA RTX 3080

Issue description

While writing a script, not while the game is running, when duplicating a Node's script from within the same script and then trying to access that duplicate script causes a segfault. Please note that the game was not run, simply typing something in the editor causes the crash.

Use case

I am dynamically creating new scripts at runtime. Instead of using a dummy node with a script attached, I thought it would be nice to simply duplicate the current node's script instead.

EDIT: I should mention that this works as expected is using a dummy node to copy from.

Stacktrace Error log

$ ./Godot_v3.4.2-stable_win64.exe --editor --verbose --path ../dev/repl-gd/
Godot Engine v3.4.2.stable.official.45eaa2daf - https://godotengine.org
Using GLES3 video driver
OpenGL ES 3.0 Renderer: NVIDIA GeForce RTX 3080/PCIe/SSE2
OpenGL ES Batching: ON
        OPTIONS
        max_join_item_commands 16
        colored_vertex_format_threshold 0.25
        batch_buffer_size 16384
        light_scissor_area_threshold 1
        item_reordering_lookahead 4
        light_max_join_items 32
        single_rect_fallback False
        debug_flash False
        diagnose_frame False
WASAPI: wFormatTag = 65534
WASAPI: nChannels = 2
WASAPI: nSamplesPerSec = 48000
WASAPI: nAvgBytesPerSec = 384000
WASAPI: nBlockAlign = 8
WASAPI: wBitsPerSample = 32
WASAPI: cbSize = 22
WASAPI: detected 2 channels
WASAPI: audio buffer frames: 1962 calculated latency: 44ms

CORE API HASH: 2238588822097579888
EDITOR API HASH: 10291639213636549143
Construct gdnative interface

Destruct gdnative interface

Class 'BulletPhysicsDirectBodyState' is not exposed, skipping.
Class 'BulletPhysicsDirectSpaceState' is not exposed, skipping.
Class 'BulletPhysicsServer' is not exposed, skipping.
Class 'GDScriptNativeClass' is not exposed, skipping.
Class 'IP_Unix' is not exposed, skipping.
Class 'InputDefault' is not exposed, skipping.
Class 'Physics2DDirectBodyStateSW' is not exposed, skipping.
Class 'Physics2DDirectSpaceStateSW' is not exposed, skipping.
Class 'Physics2DServerSW' is not exposed, skipping.
Class 'ResourceImporterMP3' is not exposed, skipping.
Class 'ResourceImporterOGGVorbis' is not exposed, skipping.
Loading resource: C:/redacted ;)/editor_settings-3.tres
EditorSettings: Load OK!
Loaded builtin certs
EditorSettings: Save OK!
Loading resource: res://addons/repl-gd/standalone/dummy_plugin.gd
Loading resource: res://addons/repl-gd/fake_tree.gd
Loading resource: res://addons/repl-gd/plugin.gd
Loading resource: res://addons/repl-gd/repl.gd
Loading resource: res://addons/repl-gd/standalone/main_shim.tscn
Loading resource: res://addons/repl-gd/repl.tscn
Loading resource: res://addons/repl-gd/repl.tscn
Segmentation fault

Steps to reproduce

Minimal reproduction code in a completely new project. There is no need to run the game.

extends Node

var dummy: GDScript

func _ready():
    dummy = get_script().duplicate()
    # start typing 'dummy.'
        # Typing the period character will cause a segfault

Minimal reproduction project

segfault-3.4.2.zip

Calinou commented 2 years ago

I can confirm this on 3.x 49df809ca and master fc09d783f.

Note that the crash only occurs if test.tscn is open in the editor. If only the script is open, then I don't get a crash:

image

Backtrace (3.x)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v3.5.beta.custom_build (75c0e8c7dce62e6edaa541b1e95c3e2e704242a3)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3d320) [0x7ff94466e320] (??:0)
[2] CowData<wchar_t>::_ref(CowData<wchar_t> const&) (/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/atomic_base.h:481)
[3] String::String(String const&) (/home/hugo/Documents/Git/godotengine/godot/./core/ustring.h:367)
[4] Node::get_filename() const (/home/hugo/Documents/Git/godotengine/godot/scene/main/node.cpp:1803)
[5] Node::_duplicate(int, Map<Node const*, Node*, Comparator<Node const*>, DefaultAllocator>*) const (/home/hugo/Documents/Git/godotengine/godot/scene/main/node.cpp:1957)
[6] Node::duplicate(int) const (/home/hugo/Documents/Git/godotengine/godot/scene/main/node.cpp:2128)
[7] MethodBind1RC<Node*, int>::call(Object*, Variant const**, int, Variant::CallError&) (/home/hugo/Documents/Git/godotengine/godot/./core/method_bind.gen.inc:1333)
[8] /home/hugo/Documents/Git/godotengine/godot/bin/godot.x11.tools.64.llvm() [0x34fcdc1] (/home/hugo/Documents/Git/godotengine/godot/modules/gdscript/gdscript_editor.cpp:886)
[9] /home/hugo/Documents/Git/godotengine/godot/bin/godot.x11.tools.64.llvm() [0x3502f74] (/home/hugo/Documents/Git/godotengine/godot/modules/gdscript/gdscript_editor.cpp:1240)
[10] /home/hugo/Documents/Git/godotengine/godot/bin/godot.x11.tools.64.llvm() [0x34fad77] (/home/hugo/Documents/Git/godotengine/godot/modules/gdscript/gdscript_editor.cpp:670)
[11] GDScriptLanguage::complete_code(String const&, String const&, Object*, List<ScriptCodeCompletionOption, DefaultAllocator>*, bool&, String&) (/home/hugo/Documents/Git/godotengine/godot/modules/gdscript/gdscript_editor.cpp:2666)
[12] ScriptTextEditor::_code_complete_script(String const&, List<ScriptCodeCompletionOption, DefaultAllocator>*, bool&) (/home/hugo/Documents/Git/godotengine/godot/editor/plugins/script_text_editor.cpp:818)
[13] ScriptTextEditor::_code_complete_scripts(void*, String const&, List<ScriptCodeCompletionOption, DefaultAllocator>*, bool&) (/home/hugo/Documents/Git/godotengine/godot/editor/plugins/script_text_editor.cpp:807)
[14] CodeTextEditor::_complete_request() (/home/hugo/Documents/Git/godotengine/godot/editor/code_editor.cpp:834)
[15] MethodBind0::call(Object*, Variant const**, int, Variant::CallError&) (/home/hugo/Documents/Git/godotengine/godot/./core/method_bind.gen.inc:59)
[16] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/hugo/Documents/Git/godotengine/godot/core/object.cpp:918)
[17] Object::emit_signal(StringName const&, Variant const**, int) (/home/hugo/Documents/Git/godotengine/godot/core/object.cpp:1224)
[18] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/hugo/Documents/Git/godotengine/godot/core/object.cpp:1279)
[19] TextEdit::query_code_comple() (/home/hugo/Documents/Git/godotengine/godot/scene/gui/text_edit.cpp:6818)
[20] CodeTextEditor::_code_complete_timer_timeout() (/home/hugo/Documents/Git/godotengine/godot/editor/code_editor.cpp:826)
[21] MethodBind0::call(Object*, Variant const**, int, Variant::CallError&) (/home/hugo/Documents/Git/godotengine/godot/./core/method_bind.gen.inc:59)
[22] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/hugo/Documents/Git/godotengine/godot/core/object.cpp:918)
[23] Object::emit_signal(StringName const&, Variant const**, int) (/home/hugo/Documents/Git/godotengine/godot/core/object.cpp:1224)
[24] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/hugo/Documents/Git/godotengine/godot/core/object.cpp:1279)
[25] Timer::_notification(int) (/home/hugo/Documents/Git/godotengine/godot/scene/main/timer.cpp:61)
[26] Timer::_notificationv(int, bool) (/home/hugo/Documents/Git/godotengine/godot/scene/main/timer.h:37)
[27] Object::notification(int, bool) (/home/hugo/Documents/Git/godotengine/godot/core/object.cpp:927)
[28] SceneTree::_notify_group_pause(StringName const&, int) (/home/hugo/Documents/Git/godotengine/godot/scene/main/scene_tree.cpp:992)
[29] SceneTree::idle(float) (/home/hugo/Documents/Git/godotengine/godot/scene/main/scene_tree.cpp:536)
[30] Main::iteration() (/home/hugo/Documents/Git/godotengine/godot/main/main.cpp:2270)
[31] OS_X11::run() (/home/hugo/Documents/Git/godotengine/godot/platform/x11/os_x11.cpp:3708)
[32] /home/hugo/Documents/Git/godotengine/godot/bin/godot.x11.tools.64.llvm(main+0x173) [0x2e2e2e3] (/home/hugo/Documents/Git/godotengine/godot/platform/x11/godot_x11.cpp:55)
[33] /lib64/libc.so.6(__libc_start_main+0xd5) [0x7ff944658b75] (??:0)
[34] /home/hugo/Documents/Git/godotengine/godot/bin/godot.x11.tools.64.llvm(_start+0x2e) [0x2e2e0ae] (??:?)
-- END OF BACKTRACE --
================================================================
zsh: IOT instruction (core dumped)  ~/Documents/Git/godotengine/godot/bin/godot.x11.tools.64.llvm -e

Backtrace (master)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.alpha.custom_build (5b7f14e0fac026616b6b698747834118de92685d)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3d320) [0x7f3258857320] (??:0)
[2] CowData<char32_t>::_ref(CowData<char32_t> const&) (/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/atomic_base.h:481)
[3] String::String(String const&) (/home/hugo/Documents/Git/godotengine/godot/./core/string/ustring.h:442)
[4] Node::get_scene_file_path() const (/home/hugo/Documents/Git/godotengine/godot/scene/main/node.cpp:1833)
[5] Node::_duplicate(int, Map<Node const*, Node*, Comparator<Node const*>, DefaultAllocator>*) const (/home/hugo/Documents/Git/godotengine/godot/scene/main/node.cpp:1980)
[6] Node::duplicate(int) const (/home/hugo/Documents/Git/godotengine/godot/scene/main/node.cpp:2151)
[7] void call_with_variant_args_retc_helper<__UnexistingClass, Node*, int, 0ul>(__UnexistingClass*, Node* (__UnexistingClass::*)(int) const, Variant const**, Variant&, Callable::CallError&, IndexSequence<0ul>) (/home/hugo/Documents/Git/godotengine/godot/./core/variant/binder_common.h:701)
[8] void call_with_variant_args_retc_dv<__UnexistingClass, Node*, int>(__UnexistingClass*, Node* (__UnexistingClass::*)(int) const, Variant const**, int, Variant&, Callable::CallError&, Vector<Variant> const&) (/home/hugo/Documents/Git/godotengine/godot/./core/variant/binder_common.h:497)
[9] MethodBindTRC<Node*, int>::call(Object*, Variant const**, int, Callable::CallError&) (/home/hugo/Documents/Git/godotengine/godot/./core/object/method_bind.h:528)
[10] bin/godot.linuxbsd.tools.64.llvm() [0x586b881] (/home/hugo/Documents/Git/godotengine/godot/modules/gdscript/gdscript_editor.cpp:1443)
[11] bin/godot.linuxbsd.tools.64.llvm() [0x58771cd] (/home/hugo/Documents/Git/godotengine/godot/modules/gdscript/gdscript_editor.cpp:1766)
[12] bin/godot.linuxbsd.tools.64.llvm() [0x5869cb8] (/home/hugo/Documents/Git/godotengine/godot/modules/gdscript/gdscript_editor.cpp:1231)
[13] GDScriptLanguage::complete_code(String const&, String const&, Object*, List<ScriptCodeCompletionOption, DefaultAllocator>*, bool&, String&) (/home/hugo/Documents/Git/godotengine/godot/modules/gdscript/gdscript_editor.cpp:2548)
[14] ScriptTextEditor::_code_complete_script(String const&, List<ScriptCodeCompletionOption, DefaultAllocator>*, bool&) (/home/hugo/Documents/Git/godotengine/godot/editor/plugins/script_text_editor.cpp:700)
[15] ScriptTextEditor::_code_complete_scripts(void*, String const&, List<ScriptCodeCompletionOption, DefaultAllocator>*, bool&) (/home/hugo/Documents/Git/godotengine/godot/editor/plugins/script_text_editor.cpp:689)
[16] CodeTextEditor::_complete_request() (/home/hugo/Documents/Git/godotengine/godot/editor/code_editor.cpp:865)
[17] void call_with_variant_args_helper<CodeTextEditor>(CodeTextEditor*, void (CodeTextEditor::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/hugo/Documents/Git/godotengine/godot/./core/variant/binder_common.h:237)
[18] void call_with_variant_args<CodeTextEditor>(CodeTextEditor*, void (CodeTextEditor::*)(), Variant const**, int, Callable::CallError&) (/home/hugo/Documents/Git/godotengine/godot/./core/variant/binder_common.h:347)
[19] CallableCustomMethodPointer<CodeTextEditor>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/hugo/Documents/Git/godotengine/godot/./core/object/callable_method_pointer.h:97)
[20] Callable::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/hugo/Documents/Git/godotengine/godot/core/variant/callable.cpp:51)
[21] Object::emit_signal(StringName const&, Variant const**, int) (/home/hugo/Documents/Git/godotengine/godot/core/object/object.cpp:1104)
[22] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/hugo/Documents/Git/godotengine/godot/core/object/object.cpp:1159)
[23] CodeEdit::request_code_completion(bool) (/home/hugo/Documents/Git/godotengine/godot/scene/gui/code_edit.cpp:1821)
[24] CodeTextEditor::_code_complete_timer_timeout() (/home/hugo/Documents/Git/godotengine/godot/editor/code_editor.cpp:857)
[25] void call_with_variant_args_helper<CodeTextEditor>(CodeTextEditor*, void (CodeTextEditor::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/hugo/Documents/Git/godotengine/godot/./core/variant/binder_common.h:237)
[26] void call_with_variant_args<CodeTextEditor>(CodeTextEditor*, void (CodeTextEditor::*)(), Variant const**, int, Callable::CallError&) (/home/hugo/Documents/Git/godotengine/godot/./core/variant/binder_common.h:347)
[27] CallableCustomMethodPointer<CodeTextEditor>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/hugo/Documents/Git/godotengine/godot/./core/object/callable_method_pointer.h:97)
[28] Callable::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/hugo/Documents/Git/godotengine/godot/core/variant/callable.cpp:51)
[29] Object::emit_signal(StringName const&, Variant const**, int) (/home/hugo/Documents/Git/godotengine/godot/core/object/object.cpp:1104)
[30] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/hugo/Documents/Git/godotengine/godot/core/object/object.cpp:1159)
[31] Timer::_notification(int) (/home/hugo/Documents/Git/godotengine/godot/scene/main/timer.cpp:59)
[32] Timer::_notificationv(int, bool) (/home/hugo/Documents/Git/godotengine/godot/scene/main/timer.h:37)
[33] Object::notification(int, bool) (/home/hugo/Documents/Git/godotengine/godot/core/object/object.cpp:846)
[34] SceneTree::_notify_group_pause(StringName const&, int) (/home/hugo/Documents/Git/godotengine/godot/scene/main/scene_tree.cpp:855)
[35] SceneTree::process(double) (/home/hugo/Documents/Git/godotengine/godot/scene/main/scene_tree.cpp:453)
[36] Main::iteration() (/home/hugo/Documents/Git/godotengine/godot/main/main.cpp:2712)
[37] OS_LinuxBSD::run() (/home/hugo/Documents/Git/godotengine/godot/platform/linuxbsd/os_linuxbsd.cpp:342)
[38] bin/godot.linuxbsd.tools.64.llvm(main+0x1c6) [0x4853236] (/home/hugo/Documents/Git/godotengine/godot/platform/linuxbsd/godot_linuxbsd.cpp:58)
[39] /lib64/libc.so.6(__libc_start_main+0xd5) [0x7f3258841b75] (??:0)
[40] bin/godot.linuxbsd.tools.64.llvm(_start+0x2e) [0x4852fae] (??:?)
-- END OF BACKTRACE --
================================================================
[1]    14062 IOT instruction (core dumped)  bin/godot.linuxbsd.tools.64.llvm /tmp/4/project.godot

Stacktrace

For future reference: This is not a stack trace, as the origin of the crash isn't indicated. To get a stacktrace, you need to compile a build from source and run it with a debugger (if compiled with MinGW). If you don't want to use a debugger on Windows, you can compile with MSVC instead of MinGW and the built-in crash handler will work.

you-win commented 2 years ago

Apologies for the mixup in terminology, updated the initial issue. Glad to see it's reproduceable in any case

VikramSGIT commented 2 years ago

My observation about this issue is that Script don't have a duplicate() function.

Untitled-1

Instead of showing an error, it is mistaken as a Node when the duplicate() function is used. And also while debugging I found out that the get_script() function of Object returns a Variant but does contain sufficient info for GDScript (shouldn't be a problem?)

image

image

On further debugging native_type is misunderstood as Node instead of GDScript. Which lead to instancing the wrong method binder and crashing.

Untitled-1

I'll look deeper into the type detection algorithm...

SaracenOne commented 2 years ago

I have a bit more information on this. This specific code which appears to be causing trouble seems to be this in gdscript_editor.cpp

while (native_type.kind == GDScriptParser::DataType::SCRIPT) {
    if (native_type.script_type.is_valid()) {
        Ref<Script> parent = native_type.script_type->get_base_script();
        if (parent.is_valid()) {
            native_type.script_type = parent;
        } else {
            native_type.kind = GDScriptParser::DataType::NATIVE;
            native_type.native_type = native_type.script_type->get_instance_base_type();
            if (!ClassDB::class_exists(native_type.native_type)) {
                native_type.kind = GDScriptParser::DataType::UNRESOLVED;
            }
        }
    }
}

Specfically, the call get_instance_base_type is getting the node that the script inherits which is why 'duplicate' method bind is being called as a node rather than as a script resource. Replacing 'get_instance_base_type' with 'get_class_name' seems to fix the crash, but will require further investigation to ensure this change doesn't break other things. Also, errors (non fatal ones) still occur since in order to determine the types, the functions are being called internally, and since the duplicating the script requires reloading, this will tend to fail since it's already open. To more broadly solve stuff like this, maybe we should write a special case for native 'duplicate' functions to not actually call them, but just assume their type.

akien-mga commented 1 year ago

Still reproducible in latest master (9ab388c146895cfacf87d09d28c148e186f348b6):

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.1.beta.custom_build (9ab388c146895cfacf87d09d28c148e186f348b6)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x36980) [0x7feac3a60980] (??:0)
[2] CowData<char32_t>::_ref(CowData<char32_t> const&) (/usr/include/c++/12/bits/atomic_base.h:488)
[3] String::String(String const&) (/home/akien/Projects/godot/godot.git/./core/string/ustring.h:457)
[4] Node::get_scene_file_path() const (/home/akien/Projects/godot/godot.git/./scene/main/node.cpp:2257)
[5] Node::_duplicate(int, HashMap<Node const*, Node*, HashMapHasherDefault, HashMapComparatorDefault<Node const*>, DefaultTypedAllocator<HashMapElement<Node const*, Node*> > >*) const (/home/akien/Projects/godot/godot.git/./scene/main/node.cpp:2419 (discriminator 4))
[6] Node::duplicate(int) const (/home/akien/Projects/godot/godot.git/./scene/main/node.cpp:2591)
[7] void call_with_variant_args_retc_helper<__UnexistingClass, Node*, int, 0ul>(__UnexistingClass*, Node* (__UnexistingClass::*)(int) const, Variant const**, Variant&, Callable::CallError&, IndexSequence<0ul>) (/home/akien/Projects/godot/godot.git/./core/variant/binder_common.h:806 (discriminator 4))
[8] void call_with_variant_args_retc_dv<__UnexistingClass, Node*, int>(__UnexistingClass*, Node* (__UnexistingClass::*)(int) const, Variant const**, int, Variant&, Callable::CallError&, Vector<Variant> const&) (/home/akien/Projects/godot/godot.git/./core/variant/binder_common.h:568)
[9] MethodBindTRC<Node*, int>::call(Object*, Variant const**, int, Callable::CallError&) const (/home/akien/Projects/godot/godot.git/./core/object/method_bind.h:579)
[10] godot-git() [0x62278ad] (/home/akien/Projects/godot/godot.git/./modules/gdscript/gdscript_editor.cpp:1665)
[11] godot-git() [0x6229922] (/home/akien/Projects/godot/godot.git/./modules/gdscript/gdscript_editor.cpp:1990)
[12] godot-git() [0x6226705] (/home/akien/Projects/godot/godot.git/./modules/gdscript/gdscript_editor.cpp:1448)
[13] GDScriptLanguage::complete_code(String const&, String const&, Object*, List<ScriptLanguage::CodeCompletionOption, DefaultAllocator>*, bool&, String&) (/home/akien/Projects/godot/godot.git/./modules/gdscript/gdscript_editor.cpp:2918 (discriminator 1))
[14] ScriptTextEditor::_code_complete_script(String const&, List<ScriptLanguage::CodeCompletionOption, DefaultAllocator>*, bool&) (/home/akien/Projects/godot/godot.git/./editor/plugins/script_text_editor.cpp:756 (discriminator 3))
[15] ScriptTextEditor::_code_complete_scripts(void*, String const&, List<ScriptLanguage::CodeCompletionOption, DefaultAllocator>*, bool&) (/home/akien/Projects/godot/godot.git/./editor/plugins/script_text_editor.cpp:745)
[16] CodeTextEditor::_complete_request() (/home/akien/Projects/godot/godot.git/./editor/code_editor.cpp:935)
[17] void call_with_variant_args_helper<CodeTextEditor>(CodeTextEditor*, void (CodeTextEditor::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/akien/Projects/godot/godot.git/./core/variant/binder_common.h:308 (discriminator 4))
[18] void call_with_variant_args<CodeTextEditor>(CodeTextEditor*, void (CodeTextEditor::*)(), Variant const**, int, Callable::CallError&) (/home/akien/Projects/godot/godot.git/./core/variant/binder_common.h:418)
[19] CallableCustomMethodPointer<CodeTextEditor>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/akien/Projects/godot/godot.git/./core/object/callable_method_pointer.h:105)
[20] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/akien/Projects/godot/godot.git/./core/variant/callable.cpp:64)
[21] Object::emit_signalp(StringName const&, Variant const**, int) (/home/akien/Projects/godot/godot.git/./core/object/object.cpp:1069)
[22] Node::emit_signalp(StringName const&, Variant const**, int) (/home/akien/Projects/godot/godot.git/./scene/main/node.cpp:3564)
[23] Error Object::emit_signal<>(StringName const&) (/home/akien/Projects/godot/godot.git/./core/object/object.h:881)
[24] CodeEdit::request_code_completion(bool) (/home/akien/Projects/godot/godot.git/./scene/gui/code_edit.cpp:2035)
[25] CodeTextEditor::_code_complete_timer_timeout() (/home/akien/Projects/godot/godot.git/./editor/code_editor.cpp:924)
[26] void call_with_variant_args_helper<CodeTextEditor>(CodeTextEditor*, void (CodeTextEditor::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/akien/Projects/godot/godot.git/./core/variant/binder_common.h:308 (discriminator 4))
[27] void call_with_variant_args<CodeTextEditor>(CodeTextEditor*, void (CodeTextEditor::*)(), Variant const**, int, Callable::CallError&) (/home/akien/Projects/godot/godot.git/./core/variant/binder_common.h:418)
[28] CallableCustomMethodPointer<CodeTextEditor>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/akien/Projects/godot/godot.git/./core/object/callable_method_pointer.h:105)
[29] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/akien/Projects/godot/godot.git/./core/variant/callable.cpp:64)
[30] Object::emit_signalp(StringName const&, Variant const**, int) (/home/akien/Projects/godot/godot.git/./core/object/object.cpp:1069)
[31] Node::emit_signalp(StringName const&, Variant const**, int) (/home/akien/Projects/godot/godot.git/./scene/main/node.cpp:3564)
[32] Error Object::emit_signal<>(StringName const&) (/home/akien/Projects/godot/godot.git/./core/object/object.h:881)
[33] Timer::_notification(int) (/home/akien/Projects/godot/godot.git/./scene/main/timer.cpp:62)
[34] Timer::_notificationv(int, bool) (/home/akien/Projects/godot/godot.git/./scene/main/timer.h:37 (discriminator 14))
[35] Object::notification(int, bool) (/home/akien/Projects/godot/godot.git/./core/object/object.cpp:798)
[36] SceneTree::_process_group(SceneTree::ProcessGroup*, bool) (/home/akien/Projects/godot/godot.git/./scene/main/scene_tree.cpp:946)
[37] SceneTree::_process(bool) (/home/akien/Projects/godot/godot.git/./scene/main/scene_tree.cpp:1018 (discriminator 2))
[38] SceneTree::process(double) (/home/akien/Projects/godot/godot.git/./scene/main/scene_tree.cpp:510)
[39] Main::iteration() (/home/akien/Projects/godot/godot.git/main/main.cpp:3421)
[40] OS_LinuxBSD::run() (/home/akien/Projects/godot/godot.git/platform/linuxbsd/os_linuxbsd.cpp:912)
[41] godot-git(main+0x15a) [0x56770c0] (/home/akien/Projects/godot/godot.git/platform/linuxbsd/godot_linuxbsd.cpp:76)
[42] /lib64/libc.so.6(+0x236b7) [0x7feac3a4d6b7] (??:0)
[43] /lib64/libc.so.6(__libc_start_main+0x85) [0x7feac3a4d775] (??:0)
[44] godot-git(_start+0x21) [0x5676ea1] (??:?)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)
dalexeev commented 9 months ago

Could not reproduce as crash anymore. Instead the error scene/main/node.cpp:2595 - Parameter "node" is null. appears. #85361 fixes it.