Repository: godot
Issue: Crash using the clipboard functionality
Labels: bug,platform:linuxbsd,topic:porting,crash,regression

### Tested versions

first seen in v4.3.1.rc [b51be503c]

not encountered in 4.3.stable

### System information

Fedora 41 - Godot v4.3.1.rc [b51be503c] - Vulkan (Forward+) - dedicated AMD RX 7900XT

### Issue description

issue:
 invocation of the clipboard under wayland causes a crash.

expected outcome:
selected items and/or buttons that add items to the clipboard add those items to the clip board

```
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.1.rc.custom_build (b51be503c512b8f4190503fc28190e0a76ae20eb)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x19dd0) [0x7f0b4bd73dd0] (??:0)
[2] /lib64/libwayland-client.so.0(wl_proxy_get_version+0x4) [0x7f0b2cdc7564] (??:0)
[3] /mnt/Forerunner/SteamLibrary/steamapps/common/Godot Engine/godot.x11.opt.tools.64(+0x862e7) [0x55935a22b2e7] (/home/jwoon/Documents/GodotTemplates/godot/platform/linuxbsd/wayland/protocol/wayland.gen.h:2842)
[4] WaylandThread::selection_set_text(String const&) (/home/jwoon/Documents/GodotTemplates/godot/platform/linuxbsd/wayland/wayland_thread.cpp:4003 (discriminator 1))
[5] DisplayServerWayland::clipboard_set(String const&) (/home/jwoon/Documents/GodotTemplates/godot/platform/linuxbsd/wayland/display_server_wayland.cpp:408)
[6] EditorNode::_menu_option_confirm(int, bool) (/home/jwoon/Documents/GodotTemplates/godot/./editor/editor_node.cpp:3175 (discriminator 1))
[7] EditorNode::_menu_option(int) (/home/jwoon/Documents/GodotTemplates/godot/./editor/editor_node.cpp:1474)
[8] void call_with_variant_args_helper<EditorNode, int, 0ul>(EditorNode*, void (EditorNode::*)(int), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/home/jwoon/Documents/GodotTemplates/godot/./core/variant/binder_common.h:304 (discriminator 1))
[9] void call_with_variant_args<EditorNode, int>(EditorNode*, void (EditorNode::*)(int), Variant const**, int, Callable::CallError&) (/home/jwoon/Documents/GodotTemplates/godot/./core/variant/binder_common.h:418)
[10] CallableCustomMethodPointer<EditorNode, int>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/jwoon/Documents/GodotTemplates/godot/./core/object/callable_method_pointer.h:103)
[11] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/jwoon/Documents/GodotTemplates/godot/./core/variant/callable.cpp:57)
[12] Object::emit_signalp(StringName const&, Variant const**, int) (/home/jwoon/Documents/GodotTemplates/godot/./core/object/object.cpp:1190)
[13] Node::emit_signalp(StringName const&, Variant const**, int) (/home/jwoon/Documents/GodotTemplates/godot/./scene/main/node.cpp:3899)
[14] Error Object::emit_signal<int>(StringName const&, int) (/home/jwoon/Documents/GodotTemplates/godot/./core/object/object.h:936)
[15] PopupMenu::activate_item(int) (/home/jwoon/Documents/GodotTemplates/godot/./scene/gui/popup_menu.cpp:2437 (discriminator 1))
[16] PopupMenu::_input_from_window_internal(Ref<InputEvent> const&) (/home/jwoon/Documents/GodotTemplates/godot/./scene/gui/popup_menu.cpp:632)
[17] PopupMenu::_input_from_window(Ref<InputEvent> const&) (/home/jwoon/Documents/GodotTemplates/godot/./scene/gui/popup_menu.cpp:447)
[18] Window::_window_input(Ref<InputEvent> const&) (/home/jwoon/Documents/GodotTemplates/godot/./scene/main/window.cpp:1673)
[19] Viewport::_sub_windows_forward_input(Ref<InputEvent> const&) (/home/jwoon/Documents/GodotTemplates/godot/./scene/main/viewport.cpp:2986)
[20] Viewport::push_input(Ref<InputEvent> const&, bool) (/home/jwoon/Documents/GodotTemplates/godot/./scene/main/viewport.cpp:3243 (discriminator 2))
[21] Window::_window_input(Ref<InputEvent> const&) (/home/jwoon/Documents/GodotTemplates/godot/./scene/main/window.cpp:1680)
[22] void call_with_variant_args_helper<Window, Ref<InputEvent> const&, 0ul>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/home/jwoon/Documents/GodotTemplates/godot/./core/variant/binder_common.h:304 (discriminator 6))
[23] void call_with_variant_args<Window, Ref<InputEvent> const&>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, int, Callable::CallError&) (/home/jwoon/Documents/GodotTemplates/godot/./core/variant/binder_common.h:418)
[24] CallableCustomMethodPointer<Window, Ref<InputEvent> const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/jwoon/Documents/GodotTemplates/godot/./core/object/callable_method_pointer.h:103)
[25] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/jwoon/Documents/GodotTemplates/godot/./core/variant/callable.cpp:57)
[26] Variant Callable::call<Ref<InputEvent> >(Ref<InputEvent>) const (/home/jwoon/Documents/GodotTemplates/godot/./core/variant/variant.h:875)
[27] DisplayServerWayland::_dispatch_input_event(Ref<InputEvent> const&) (/home/jwoon/Documents/GodotTemplates/godot/platform/linuxbsd/wayland/display_server_wayland.cpp:95 (discriminator 2))
[28] DisplayServerWayland::dispatch_input_events(Ref<InputEvent> const&) (/home/jwoon/Documents/GodotTemplates/godot/platform/linuxbsd/wayland/display_server_wayland.cpp:89 (discriminator 1))
[29] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/home/jwoon/Documents/GodotTemplates/godot/./core/input/input.cpp:774)
[30] Input::flush_buffered_events() (/home/jwoon/Documents/GodotTemplates/godot/./core/input/input.cpp:1055)
[31] DisplayServerWayland::process_events() (/home/jwoon/Documents/GodotTemplates/godot/platform/linuxbsd/wayland/display_server_wayland.cpp:1254 (discriminator 1))
[32] OS_LinuxBSD::run() (/home/jwoon/Documents/GodotTemplates/godot/platform/linuxbsd/os_linuxbsd.cpp:958 (discriminator 1))
[33] /mnt/Forerunner/SteamLibrary/steamapps/common/Godot Engine/godot.x11.opt.tools.64(main+0x2b3) [0x55935a1cc21c] (/home/jwoon/Documents/GodotTemplates/godot/platform/linuxbsd/godot_linuxbsd.cpp:85)
[34] /lib64/libc.so.6(+0x3248) [0x7f0b4bd5d248] (??:0)
[35] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7f0b4bd5d30b] (??:0)
[36] /mnt/Forerunner/SteamLibrary/steamapps/common/Godot Engine/godot.x11.opt.tools.64(_start+0x25) [0x55935a1cbea5] (??:?)
-- END OF BACKTRACE --

```

### Steps to reproduce

Open the editor, attempt to copy text from the output window or use the dropdown to copy the system info

### Minimal reproduction project (MRP)

N/A