godot: Renaming Node Crashes Editor on Linux with i3wm
Godot version
4.0.beta17
System information
Linux.x86_64
Issue description
Renaming a node in the scene tree by double clicking randomly crashes the running editor instance with the following error message:
================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.beta17.official (c40020513ac8201a449b5ae2eeb58fef0ce0a2a4)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x389e0) [0x7f729c7cf9e0] (??:0)
[2] /opt/godot/Godot_v4.0-beta17_linux.x86_64() [0x44ef5c1] (??:0)
[3] /opt/godot/Godot_v4.0-beta17_linux.x86_64() [0x4b802d7] (??:0)
[4] /opt/godot/Godot_v4.0-beta17_linux.x86_64() [0x2bc69f1] (??:0)
[5] /opt/godot/Godot_v4.0-beta17_linux.x86_64() [0x4957fc4] (??:0)
[6] /opt/godot/Godot_v4.0-beta17_linux.x86_64() [0xe76ab5] (??:0)
[7] /opt/godot/Godot_v4.0-beta17_linux.x86_64() [0xde8ec2] (??:0)
[8] /usr/lib/libc.so.6(+0x23290) [0x7f729c7ba290] (??:0)
[9] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f729c7ba34a] (??:0)
[10] /opt/godot/Godot_v4.0-beta17_linux.x86_64() [0xe0908e] (??:0)
-- END OF BACKTRACE --
================================================================
The error occurs about 8 out of 10 times.
Steps to reproduce
- Create a blank project
- Create a scene
- Add any root node
- Rename the root node by double clicking the name in the Scene Tree view
Minimal reproduction project
A blank project with no scene produces this error.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 23 (21 by maintainers)
Great, I have opened PR - https://github.com/godotengine/godot/pull/73239.
IME require an invisible sub-window to work (which determine candidate window drawing position, and dispatching input event to the IME engine). So each time a LineEdit or TextEdit is focused, the IME window is mapped and input focus is transferred to it. IME engines and WMs (especially on XWayland) are quite inconsistent in handling it and sensitive to window focus. Before IME support was implementation, all popups (including the node rename popup) were unfocusable, but this does not work on XWayland (it locks all input when focus is transferred to IME sub-window), so it was changed to be focusable. Dead keys without IME (input key handling changes) are not directly related to the issue or IME implementation, it was never supported before and was found only during IME issues debugging.
No, it’s the same with or without IME, all modern distros should have IME enabled (even if you do not have keyboard layout configured) by default. Note: If IME is fully disabled, Godot will print
XOpenIM failedwarning on the start, so you can detect it this way.Yes, rename popup are too big on i3. But no matter what I try, the third click always lands inside a popup and cause text selection, not popup closing.
The only thing I suspect can have some effect is event callback not being cleaned. Try adding the following code to the
Window::_clear_window()in thescene/main/window.cpp:So caused by https://github.com/godotengine/godot/pull/72497. It’s been there for a while, but has become way easier to trigger recently
Can confirm, this happens if I triple click on a node. The two first clicks make the node enter rename mode and the third dispatches the WINDOW_EVENT_FOCUS_OUT.
If done too fast it leads to a segfault coming from here.
I’m on i3 as well. This is a recent crash I think. I can try to bisect it.
Well, I found a related issue #72763, which can be reproduced on i3wm and Cinnamon.
@geowarin If you search for “dead keys” you’ll see quite a lot of issues.
My understanding is that #18020 broke people’s ability to use dead keys (which are quite common, e.g. the Spanish and International US layouts use them). 72370 makes it possible to use those layouts again (because without it, only IME input works, which is to mean, Chinese/Japanese dead keys, but not Western dead keys because they don’t rely on IME)
https://user-images.githubusercontent.com/1045636/217247843-f03d66cc-dfdf-42cb-b778-e200749fc15e.mp4
While git bisecting, I was reproducing it 100% of the time by clicking a lot on a node. On latest git revision, 3 clicks are sufficient, in previous revisions I had to click a bunch but this is something I can pull of very consistently in less than 2 seconds.
It IS sensitive to timing.