Fix: Crash when using fractional scaling in Wayland #117531

Manually merged
Campbell Barton merged 1 commits from koranir/blender:fix-crash into main 2024-02-08 03:03:22 +01:00
Contributor

I encounter this error whenever I try to use Blender on my Wayland machine if fractional scaling is enabled.

GHOST/Wayland: wp_viewport@52: error 2: source rectangle out of buffer bounds
./build_linux/bin/blender() [0xd810d3]
/usr/lib/libwayland-client.so.0(+0x645a) [0x76b43bf5e45a]
/usr/lib/libwayland-client.so.0(+0x69bb) [0x76b43bf5e9bb]
/usr/lib/libffi.so.8(+0x74f6) [0x76b45c2364f6]
/usr/lib/libffi.so.8(+0x3f5e) [0x76b45c232f5e]
/usr/lib/libffi.so.8(ffi_call+0x123) [0x76b45c235b73]
/usr/lib/libwayland-client.so.0(+0x7645) [0x76b43bf5f645]
/usr/lib/libwayland-client.so.0(+0x7e73) [0x76b43bf5fe73]
/usr/lib/libwayland-client.so.0(wl_display_dispatch_queue_pending+0x4f) [0x76b43bf6010f]
/usr/lib/libnvidia-egl-wayland.so.1(+0x58ac) [0x76b43c2118ac]
/usr/lib/libc.so.6(+0x8c9eb) [0x76b45a5bd9eb]
/usr/lib/libc.so.6(+0x1107cc) [0x76b45a6417cc]
The Wayland connection experienced a fatal error: Protocol error
Error: Not freed memory blocks: 60738, total unfreed memory 19.267014 MB
Writing: /tmp/blender.crash.txt
[1]    268980 segmentation fault (core dumped)  ./build_linux/bin/blender

Reading through the Wayland docs, it doesn't seem that wp_viewport_set_source is explicitly required for the window to function normally, and removing the call in GHOST_WindowWayland.cc fixes the issue I had.

Also bonus typo fix.

I encounter this error whenever I try to use Blender on my Wayland machine if fractional scaling is enabled. ``` GHOST/Wayland: wp_viewport@52: error 2: source rectangle out of buffer bounds ./build_linux/bin/blender() [0xd810d3] /usr/lib/libwayland-client.so.0(+0x645a) [0x76b43bf5e45a] /usr/lib/libwayland-client.so.0(+0x69bb) [0x76b43bf5e9bb] /usr/lib/libffi.so.8(+0x74f6) [0x76b45c2364f6] /usr/lib/libffi.so.8(+0x3f5e) [0x76b45c232f5e] /usr/lib/libffi.so.8(ffi_call+0x123) [0x76b45c235b73] /usr/lib/libwayland-client.so.0(+0x7645) [0x76b43bf5f645] /usr/lib/libwayland-client.so.0(+0x7e73) [0x76b43bf5fe73] /usr/lib/libwayland-client.so.0(wl_display_dispatch_queue_pending+0x4f) [0x76b43bf6010f] /usr/lib/libnvidia-egl-wayland.so.1(+0x58ac) [0x76b43c2118ac] /usr/lib/libc.so.6(+0x8c9eb) [0x76b45a5bd9eb] /usr/lib/libc.so.6(+0x1107cc) [0x76b45a6417cc] The Wayland connection experienced a fatal error: Protocol error Error: Not freed memory blocks: 60738, total unfreed memory 19.267014 MB Writing: /tmp/blender.crash.txt [1] 268980 segmentation fault (core dumped) ./build_linux/bin/blender ``` Reading through the Wayland docs, it doesn't _seem_ that `wp_viewport_set_source` is explicitly required for the window to function normally, and removing the call in `GHOST_WindowWayland.cc` fixes the issue I had. Also bonus typo fix.
koranir added 1 commit 2024-01-26 09:05:27 +01:00
Iliya Katushenock added the
Interest
Wayland
label 2024-01-26 10:26:39 +01:00
Brecht Van Lommel requested review from Campbell Barton 2024-01-30 12:42:20 +01:00
Campbell Barton manually merged commit bba1893f67 into main 2024-02-08 03:03:22 +01:00

Thanks for looking into this, at first I thought we might need to explicitly set the values to be unset (which is documented to use the entire buffer), however new viewports always have an unset source & destination so this fix is correct.

Thanks for looking into this, at first I thought we might need to explicitly set the values to be unset (which is documented to use the entire buffer), however new viewports always have an unset source & destination so this fix is correct.
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
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
2 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#117531
No description provided.