Crash under Wayland when switching keyboard layouts if input field in focus #96169

Closed
opened 2022-03-04 17:55:42 +01:00 by MultisampledNight · 20 comments

System Information
Operating system: Linux-5.16.12-zen1-1-zen-x86_64-with-glibc2.35 64 Bits
Graphics card: Mesa Intel(R) Iris(R) Plus Graphics (ICL GT2) Intel 4.6 (Core Profile) Mesa 21.3.7
Wayland compositor: Sway
Scale due to HiDPI: 2

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-03-04 12:59, hash: 1763ffa0be
Build command line: make CMAKE_CONFIG_ARGS='-DWITH_GHOST_WAYLAND=ON -DOPENGLES_EGL_LIBRARY=/usr/lib/libwayland-egl.so' release

Short description of error
When switching keyboard layouts while an input field is in focus, Blender crashes with a segmentation fault.

I tested only switching between Qwertz, NeoQwertz and Bone, as I don't know any other keyboard layouts. On crash, terminal output has shown that a crash file has been written, it is contained below.

Exact steps for others to reproduce the error

  • Open Blender's default scene
  • Click on the Location X text field

Switch your keyboard layout, e.g. in sway with swaymsg input type:keyboard xkb_variant neo_qwertz

blender.crash.txt

**System Information** Operating system: Linux-5.16.12-zen1-1-zen-x86_64-with-glibc2.35 64 Bits Graphics card: Mesa Intel(R) Iris(R) Plus Graphics (ICL GT2) Intel 4.6 (Core Profile) Mesa 21.3.7 Wayland compositor: Sway Scale due to HiDPI: 2 **Blender Version** Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-03-04 12:59, hash: `1763ffa0be` Build command line: `make CMAKE_CONFIG_ARGS='-DWITH_GHOST_WAYLAND=ON -DOPENGLES_EGL_LIBRARY=/usr/lib/libwayland-egl.so' release` **Short description of error** When switching keyboard layouts while an input field is in focus, Blender crashes with a segmentation fault. I tested only switching between Qwertz, NeoQwertz and Bone, as I don't know any other keyboard layouts. On crash, terminal output has shown that a crash file has been written, it is contained below. **Exact steps for others to reproduce the error** - Open Blender's default scene - Click on the `Location X` text field # Switch your keyboard layout, e.g. in sway with `swaymsg input type:keyboard xkb_variant neo_qwertz` [blender.crash.txt](https://archive.blender.org/developer/F12897500/blender.crash.txt)

Added subscriber: @multisn8-2

Added subscriber: @multisn8-2
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

I don't have wayland setup to reproduce this, but the crash happens in the wayland client library, and it doesn't seem to be caused by a direct call by Blender. What version of Wayland do you have? And might you be able to get a debug build of Blender and attach a full stacktrace?

I don't have wayland setup to reproduce this, but the crash happens in the wayland client library, and it doesn't seem to be caused by a direct call by Blender. What version of Wayland do you have? And might you be able to get a debug build of Blender and attach a full stacktrace?
Member

Apparently Wayland is not exactly supported yet in Blender. #90676 So this is likely an issue in XWayland as opposed to Blender. Maybe for your other report #96170 as well.

Apparently Wayland is not exactly supported yet in Blender. #90676 So this is likely an issue in XWayland as opposed to Blender. Maybe for your other report #96170 as well.

Blender was built on my system with -DWITH_GHOST_WAYLAND as cmake config argument, so I'll update the other report, too. I'm quite sure that Blender was running on Wayland. Actually, I thought that'd be obvious, but it's also reasonable to expect information on how I actually got Blender.

Blender was built on my system with `-DWITH_GHOST_WAYLAND` as cmake config argument, so I'll update the other report, too. I'm quite sure that Blender was running on Wayland. Actually, I thought that'd be obvious, but it's also reasonable to expect information on how I actually got Blender.

In #96169#1317933, @OmarEmaraDev wrote:
I don't have wayland setup to reproduce this, but the crash happens in the wayland client library, and it doesn't seem to be caused by a direct call by Blender. What version of Wayland do you have? And might you be able to get a debug build of Blender and attach a full stacktrace?

On this, according to my package manager my Wayland version is 1.20.0, and sway's version is 1:1.7. I'll try to build in debug mode now and provide a more thorough backtrace, is a backtrace as in coredumpctl debug and then backtrace as gdb command better by chance?

> In #96169#1317933, @OmarEmaraDev wrote: > I don't have wayland setup to reproduce this, but the crash happens in the wayland client library, and it doesn't seem to be caused by a direct call by Blender. What version of Wayland do you have? And might you be able to get a debug build of Blender and attach a full stacktrace? On this, according to my package manager my Wayland version is `1.20.0`, and sway's version is `1:1.7`. I'll try to build in debug mode now and provide a more thorough backtrace, is a backtrace as in `coredumpctl debug` and then `backtrace` as gdb command better by chance?

Well, since the backtrace in /tmp/blender.crash.txt isn't particularly helpful imo, I just assume you need the gdb backtrace, too. Before rebuilding, I ran make update and according to the Report Bug builtin of Blender I'm now on 5bb2b4236d, commit date: 2022-03-07 16:10.

blender.crash.txt
blender-gdb-backtrace.txt

But indeed, it's not quite obvious if that segfault is truly Blender's error or Wayland's one. I can't tell that though as I lack expertise in working with either ones.

Well, since the backtrace in `/tmp/blender.crash.txt` isn't particularly helpful imo, I just assume you need the gdb backtrace, too. Before rebuilding, I ran `make update` and according to the `Report Bug` builtin of Blender I'm now on `5bb2b4236d`, commit date: 2022-03-07 16:10. [blender.crash.txt](https://archive.blender.org/developer/F12901022/blender.crash.txt) [blender-gdb-backtrace.txt](https://archive.blender.org/developer/F12901066/blender-gdb-backtrace.txt) But indeed, it's not quite obvious if that segfault is truly Blender's error or Wayland's one. I can't tell that though as I lack expertise in working with either ones.
Member

The stacktrace is different this time, so maybe it is a threading issue. I unfortunately don't know much about this either. But can you try opening Blender with the following flag blender -t 1?

The stacktrace is different this time, so maybe it is a threading issue. I unfortunately don't know much about this either. But can you try opening Blender with the following flag `blender -t 1`?

Suddently I'm unable to reproduce the crash, even without that argument.

Suddently I'm unable to reproduce the crash, even without that argument.

It turns out that this only seems to happen after using the computer for a while, like ~20 minutes, and suspending to RAM in-between. And then, even with blender -t 1 the crash happens. This makes it indeed quite unlikely to be a bug by Blender, but I don't know if that's truly the case and if not, where to report that else.

It turns out that this only seems to happen after using the computer for a while, like ~20 minutes, and suspending to RAM in-between. And then, even with `blender -t 1` the crash happens. This makes it indeed quite unlikely to be a bug by Blender, but I don't know if that's truly the case and if not, where to report that else.
Member

I am not sure. I would just wait and see if anyone on Wayland can reproduce.

I am not sure. I would just wait and see if anyone on Wayland can reproduce.
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

@ideasman42 Not sure if you are on Wayland, but if you are, can you look into this report and #96170, as it seems none of the triaging team is on Wayland.

@multisn8-2 Just to double check, this is still reproducible on your end, right?

@ideasman42 Not sure if you are on Wayland, but if you are, can you look into this report and #96170, as it seems none of the triaging team is on Wayland. @multisn8-2 Just to double check, this is still reproducible on your end, right?

Yes, in 3.3.0 Alpha, commit hash 371fc68678, commit date 2022-06-08 19:37, I can still reproduce this and also my other report.

Yes, in 3.3.0 Alpha, commit hash `371fc68678`, commit date 2022-06-08 19:37, I can still reproduce this and also my other report.

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Confirmed, although I found getting reproducible crashes difficult, I managed to get crashes but in different parts of the code very infrequently, perhaps 1 in 20 attempts.

Running this in a loop while using Blender, helped to redo the crash:

sleep 0.2 && sway input type:keyboard xkb_variant "colmak"

Although I wonder if this is an issue with Blender as constantly setting the keyboard variant also crashed qt-creator (which I was using for debugging).


Setting as low priority unless there is a reliable way to redo the crash every time that also impacts more popular desktop environments as Gnome/KDE.

Confirmed, although I found getting reproducible crashes difficult, I managed to get crashes but in different parts of the code very infrequently, perhaps 1 in 20 attempts. Running this in a loop while using Blender, helped to redo the crash: `sleep 0.2 && sway input type:keyboard xkb_variant "colmak"` Although I wonder if this is an issue with Blender as constantly setting the keyboard variant also crashed qt-creator (which I was using for debugging). ---- Setting as low priority unless there is a reliable way to redo the crash every time that also impacts more popular desktop environments as Gnome/KDE.

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

@multisn8-2 could you check if this has been fixed? I'm no longer able to redo the crash, it's possible fixing #98758 (Crash setting the clipboard in Wayland) also resolved this bug as both are related to thread safety.

@multisn8-2 could you check if this has been fixed? I'm no longer able to redo the crash, it's possible fixing #98758 (Crash setting the clipboard in Wayland) also resolved this bug as both are related to thread safety.

Yes, I can't reproduce it anymore, either. Seriously, thank you! My other report still persists, but for now switching layouts when using Blender should be a viable workaround.

Yes, I can't reproduce it anymore, either. Seriously, thank you! My other report still persists, but for now switching layouts when using Blender should be a viable workaround.

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'
Campbell Barton self-assigned this 2022-06-12 13:18:37 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#96169
No description provided.