Resizing window causes crash on Wayland (libdecor) #107797
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#107797
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux-5.19.0-41-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: AMD Radeon RX 5700 XT (navi10, LLVM 15.0.6, DRM 3.47, 5.19.0-41-generic) AMD 4.6 (Core Profile) Mesa 22.2.5
Blender Version
Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash:
e1ccd9d4a1d3
Worked: (unknown)
Short description of error
Rapidly resizing the Blender window causes the application to crash. If I resize the window very slowly (like, 10 or 20 pixels per second), it resizes successfully and smoothly. If I do a single, quick drag of the window edge to resize it by about 100 pixels, the window takes about a second to respond but does resize successfully. If I drag an edge or corner quickly over larger distances and for longer, the window crashes with this message in the terminal:
Exact steps for others to reproduce the error
Confirmed the same behavior on the current stable and alpha daily builds:
6ee8aa4997ee
521e79b86912
One more quick update: the crash does not occur if I request an Xorg session on the Ubuntu login screen. Additionally, several other applications experience very laggy window resizing under Wayland but not Xorg (e.g., VLC, GIMP), but none of them crash in response to window resize.
Just chiming in with my own test of this. I haven't been able to crash a session even with some very fast window resizing. It resizes quite fast actually. I would say faster than most apps so I don't think I observe this same behavior of having a sluggish resize response time.
I'm on:
It's weird that I experience very laggy window resizing under X but not on wayland.
Cannot repro here
@ideasman42 : are you able to repro?
I can't redo the bug either. Things to look into:
Test on a different compositor (KDE/SWAY for example) most other compositors support server-side decorations. This issue could be related to libdecor (which handles decorations).
Test on GNOME with libdecor disabled (possible since:
a9358f5274
), included in the latest 4.0 alpha daily build.libdecor
.DISPLAY="" ./blender
This will run Blender without libdecor so you can check if this causes the error.
@dan5sch : do you have a chance to test the above?
@lichtwerk I haven't. I use this machine for my work, so I'm wary of mucking with the installation of the desktop environment itself.
@dan5sch: Running with
DISPLAY="" ./blender
doesn't require system modifications, could you please test this?Resizing window causes crashto Resizing window causes crash on Wayland@ideasman42 running Blender with
DISPLAY=""
in a Wayland Gnome session still crashed when I resized the window quickly. (To be clear, this was without uninstallinglibdecor
or any of the other steps in your original comment.)@dan5sch: hang on, you would have to make sure libdecor isn't available for this to work as expected.
@ideasman42 OK, found a way to test this. TL;DR:
DISPLAY="" blender
does NOT crash on rapid resize when loading oflibdecor
is prevented.Method:
Using the approach in this post, I was able to
LD_PRELOAD
a modifieddlopen()
that prevents loadinglibdecor
. To my pleasant surprise, this just worked.Results (again in Wayland Gnome):
blender
: crash on rapid window resize.xwininfo
does NOT say Blender is an X window.LD_PRELOAD=libmydlopen.so blender
: Window decorations resemble those of "native" Gnome 3 applications. NO crash on rapid window resize.xwininfo
says that Blender is an X window.DISPLAY="" LD_PRELOAD=libmydlopen.so blender
: NO window decorations at all. NO crash on rapid window resize after usingALT-F8
to enable resize with the mouse.xwininfo
says that Blender is NOT an X window.OK, thx getting back.
@ideasman42 : what would be the way forward here then?
Resizing window causes crash on Waylandto Resizing window causes crash on Wayland (libdecor)@lichtwerk I can't redo this bug reliably although I did manage to get a crash once.
I'm not all that satisfied with libdecor, there are currently 3 open issues relating to libdecor where I'm not sure how we might proceed, although this crash is the worst.
For reference the 2 other bugs: #109194, #108308.
So longer term it may be best to use client side decorations, although if this crash can be reproduced reliably by a developer it should be investigated of course.
Attempting to redo this crash and I wasn't able to - gnome-shell 44.3.
Unless a developer can redo the issue it doesn't seem likely it can be resolved.
@dan5sch could you check if this is resolved by recent builds? (it's possible
e1dac0b122
fixes the bug).@ideasman42 tested today's alpha build
f3f494fd63
which is now past the commite1dac0b122
you mentioned. Results:Notably, a new bug has appeared: if I begin dragging a corner of the window, move the mouse rapidly, and release the left mouse button while the mouse is still moving rapidly, the dimensions of the displayed window contents and the displayed window decoration / drop shadow appear to disagree with one another by one frame of mouse movement. Examples:
In this state:
@dan5sch thanks for checking: could you please note which versions of gnome-shell & libdecor your using?
I'm on: GNOME Shell 44.5, libdecor 0.2.0.
It may be that this issue only happens on older versions of both.
Note that I was concerned about
e1dac0b122
causing the issue you described with the border getting out of sync with the window but I wasn't able to trigger this problem, so it's unfortunate this happens for some configurations.@ideasman42 GNOME Shell 42.9, libdecor 0.1.0
These are the versions provided by Ubuntu 22.04.3 LTS.
@dan5sch could you please check if this is resolved in recent builds, it's possible
1455315111
resolves the problem.@ideasman42 tested the latest alpha build
29b5919ad1
which is past1455315111
. Same GNOME Shell / libdecor versions as last test (from system repos).Blender continues to crash after about two seconds of rapidly resizing the window. The non-crash failure mode described in my previous reply (with the screenshots) no longer occurs.
New since my original bug report is that the program displays a stack trace upon crashing. Pasting it in case it's useful.
@dan5sch since the issue is a broken pipe in libdecor's code, it looks as if the connection is being lost outside of Blender, I'm not sure if this is something we can fix.