Repository: godot
Issue: GDScriptEditorTranslationParserPlugin crashes
Labels: bug,topic:core,topic:gdscript,needs testing,crash

### Godot version

v4.1.dev.custom_build [d8e242cba]

### System information

Ubuntu

### Issue description

This is not a new issue. It occurred since the POT Generation tool was implemented, I only got to report it now.

```
================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.1.dev.custom_build (d8e242cba8fe33f2d4e3c3e4d5f08038ab063888)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3c4b0) [0x7f661a03c4b0] (??:0)
[2] GDScriptEditorTranslationParserPlugin::parse_file(String const&, Vector<String>*, Vector<Vector<String> >*) (/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp:56)
[3] PackedSceneEditorTranslationParserPlugin::parse_file(String const&, Vector<String>*, Vector<Vector<String> >*) (/editor/plugins/packed_scene_translation_parser_plugin.cpp:86)
[4] POTGenerator::generate_pot(String const&) (/editor/pot_generator.cpp:76)
[5] LocalizationEditor::_pot_generate(String const&) (/editor/localization_editor.cpp:382)
[6] void call_with_variant_args_helper<LocalizationEditor, String const&, 0ul>(LocalizationEditor*, void (LocalizationEditor::*)(String const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/./core/variant/binder_common.h:293)
[7] void call_with_variant_args<LocalizationEditor, String const&>(LocalizationEditor*, void (LocalizationEditor::*)(String const&), Variant const**, int, Callable::CallError&) (/./core/variant/binder_common.h:408)
[8] CallableCustomMethodPointer<LocalizationEditor, String const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (/./core/object/callable_method_pointer.h:105)
[9] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/core/variant/callable.cpp:51)
[10] Object::emit_signalp(StringName const&, Variant const**, int) (/core/object/object.cpp:1046)
[11] Error Object::emit_signal<String>(StringName const&, String) (/./core/object/object.h:869)
[12] EditorFileDialog::_save_confirm_pressed() (/editor/editor_file_dialog.cpp:299)
[13] void call_with_variant_args_helper<EditorFileDialog>(EditorFileDialog*, void (EditorFileDialog::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/./core/variant/binder_common.h:298)
[14] void call_with_variant_args<EditorFileDialog>(EditorFileDialog*, void (EditorFileDialog::*)(), Variant const**, int, Callable::CallError&) (/./core/variant/binder_common.h:408)
[15] CallableCustomMethodPointer<EditorFileDialog>::call(Variant const**, int, Variant&, Callable::CallError&) const (/./core/object/callable_method_pointer.h:105)
[16] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/core/variant/callable.cpp:51)
[17] Object::emit_signalp(StringName const&, Variant const**, int) (/core/object/object.cpp:1046)
[18] Error Object::emit_signal<>(StringName const&) (/./core/object/object.h:869)
[19] AcceptDialog::_ok_pressed() (/scene/gui/dialogs.cpp:128)
[20] void call_with_variant_args_helper<AcceptDialog>(AcceptDialog*, void (AcceptDialog::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/./core/variant/binder_common.h:298)
[21] void call_with_variant_args<AcceptDialog>(AcceptDialog*, void (AcceptDialog::*)(), Variant const**, int, Callable::CallError&) (/./core/variant/binder_common.h:408)
[22] CallableCustomMethodPointer<AcceptDialog>::call(Variant const**, int, Variant&, Callable::CallError&) const (/./core/object/callable_method_pointer.h:105)
[23] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/core/variant/callable.cpp:51)
[24] Object::emit_signalp(StringName const&, Variant const**, int) (/core/object/object.cpp:1046)
[25] Error Object::emit_signal<>(StringName const&) (/./core/object/object.h:869)
[26] BaseButton::_pressed() (/scene/gui/base_button.cpp:139)
[27] BaseButton::on_action_event(Ref<InputEvent>) (/scene/gui/base_button.cpp:?)
[28] BaseButton::gui_input(Ref<InputEvent> const&) (/scene/gui/base_button.cpp:69)
[29] Control::_call_gui_input(Ref<InputEvent> const&) (/scene/gui/control.cpp:1747)
[30] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (/scene/main/viewport.cpp:1389)
[31] Viewport::_gui_input_event(Ref<InputEvent>) (/scene/main/viewport.cpp:1659)
[32] Viewport::push_input(Ref<InputEvent> const&, bool) (/scene/main/viewport.cpp:2834)
[33] Window::_window_input(Ref<InputEvent> const&) (/scene/main/window.cpp:1370)
[34] void call_with_variant_args_helper<Window, Ref<InputEvent> const&, 0ul>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/./core/variant/binder_common.h:293)
[35] void call_with_variant_args<Window, Ref<InputEvent> const&>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, int, Callable::CallError&) (/./core/variant/binder_common.h:408)
[36] CallableCustomMethodPointer<Window, Ref<InputEvent> const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (/./core/object/callable_method_pointer.h:105)
[37] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/core/variant/callable.cpp:51)
[38] DisplayServerX11::_dispatch_input_event(Ref<InputEvent> const&) (/platform/linuxbsd/x11/display_server_x11.cpp:3594)
[39] DisplayServerX11::_dispatch_input_events(Ref<InputEvent> const&) (/platform/linuxbsd/x11/display_server_x11.cpp:3566)
[40] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/core/input/input.cpp:690)
[41] Input::flush_buffered_events() (/core/input/input.cpp:940)
[42] DisplayServerX11::process_events() (/platform/linuxbsd/x11/display_server_x11.cpp:4662)
[43] OS_LinuxBSD::run() (/platform/linuxbsd/os_linuxbsd.cpp:885)
[44] /bin/godot.linuxbsd.editor.dev.x86_64.llvm.dev(main+0x1fd) [0x55bab54d569d] (/platform/linuxbsd/godot_linuxbsd.cpp:73)
[45] /lib/x86_64-linux-gnu/libc.so.6(+0x23a90) [0x7f661a023a90] (??:0)
[46] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89) [0x7f661a023b49] (??:0)
[47] /bin/godot.linuxbsd.editor.dev.x86_64.llvm.dev(_start+0x25) [0x55bab54d53d5] (??:?)
-- END OF BACKTRACE --
================================================================
```

### Steps to reproduce

Unfortunately I haven't been able to to reliably reproduce this.
It appears to occur when adding `tscn` files that hold built-in scripts in the POT Generation tool.

However, once I identified a `tscn` file that caused a crash, I made an isolated copy of it, and with that worked just fine. Even stranger, it then also worked with the original `tscn` file. So yea, the bane of every bug hunter - it only happens "sometimes". Perhaps someone can get something out of the stack trace.

### Minimal reproduction project

n/a