Grease Pencil Fill Tool crashes with Metal GPU Backend #105059

Closed
opened 2023-02-22 03:41:35 +01:00 by Owen-Lewery · 3 comments

System Information
Operating system: macOS Monteray 12.6.2
Model: Macbook Pro 15,1 6-core i9
Graphics card: Radeon Pro 560X 4 GB

Blender Version
Broken: 3.5.0 Beta (2023-02-19 and 2023-02-21)
Worked: Works with OpenGL backend, Metal GPU Backend not available in 3.4

Short description of error
Filling a grease pencil shape immediately quits blender and produces a crash report.

Exact steps for others to reproduce the error

  1. Create a new 2D animation project.
  2. Go to prefs and make sure you have Metal selected for GPU Backend. (restart if you had to change it)
  3. Draw four overlapping edges of a rectangle
  4. Switch to fill tool.
  5. Select a fill material (optional)
  6. Click inside the rectangle and click again to fill it.

Blender quits with the attached crash report.
video at: http://allision.com/personal/owen/files/ScreenRecord-BlenderGPCrash.mov (I had crash report turned off so the included CR is from a separate session - but it does pop up. It's too large to attach here.)

**System Information** Operating system: macOS Monteray 12.6.2 Model: Macbook Pro 15,1 6-core i9 Graphics card: Radeon Pro 560X 4 GB **Blender Version** Broken: 3.5.0 Beta (2023-02-19 and 2023-02-21) Worked: Works with OpenGL backend, Metal GPU Backend not available in 3.4 **Short description of error** Filling a grease pencil shape immediately quits blender and produces a crash report. **Exact steps for others to reproduce the error** 1. Create a new 2D animation project. 2. Go to prefs and make sure you have Metal selected for GPU Backend. (restart if you had to change it) 2. Draw four overlapping edges of a rectangle 4. Switch to fill tool. 5. Select a fill material (optional) 6. Click inside the rectangle and click again to fill it. Blender quits with the attached crash report. video at: http://allision.com/personal/owen/files/ScreenRecord-BlenderGPCrash.mov (I had crash report turned off so the included CR is from a separate session - but it does pop up. It's too large to attach here.)
Owen-Lewery added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-02-22 03:41:36 +01:00
Member

@mano-wii , can you confirm the crash?

@mano-wii , can you confirm the crash?

I can confirm.
It is caused by a compilation error of shader GPU_SHADER_GPENCIL_STROKE

2023-02-22 11:13:58.254937-0300 Blender[17081:68858] Compiler failed to build request
2023-02-22 11:13:58.255038-0300 Blender[17081:68858] Compile Error - Metal Shader Library (Stage: 2), error Error Domain=MTLLibraryErrorDomain Code=3 "program_source:1962:22: error: use of undeclared identifier 'geometry_out'
  vec4 tColor = vec4(geometry_out.mColor);
                     ^
program_source:1964:7: error: use of undeclared identifier 'geometry_out'
  if (geometry_out.mColor.a < 0) {
      ^
program_source:1966:25: error: use of undeclared identifier 'geometry_out'
    float dist = length(geometry_out.mTexCoord - center);
                        ^
" UserInfo={NSLocalizedDescription=program_source:1962:22: error: use of undeclared identifier 'geometry_out'
  vec4 tColor = vec4(geometry_out.mColor);
                     ^
program_source:1964:7: error: use of undeclared identifier 'geometry_out'
  if (geometry_out.mColor.a < 0) {
      ^
program_source:1966:25: error: use of undeclared identifier 'geometry_out'
    float dist = length(geometry_out.mTexCoord - center);
                        ^
}

I can confirm. It is caused by a compilation error of shader `GPU_SHADER_GPENCIL_STROKE` ``` 2023-02-22 11:13:58.254937-0300 Blender[17081:68858] Compiler failed to build request 2023-02-22 11:13:58.255038-0300 Blender[17081:68858] Compile Error - Metal Shader Library (Stage: 2), error Error Domain=MTLLibraryErrorDomain Code=3 "program_source:1962:22: error: use of undeclared identifier 'geometry_out' vec4 tColor = vec4(geometry_out.mColor); ^ program_source:1964:7: error: use of undeclared identifier 'geometry_out' if (geometry_out.mColor.a < 0) { ^ program_source:1966:25: error: use of undeclared identifier 'geometry_out' float dist = length(geometry_out.mTexCoord - center); ^ " UserInfo={NSLocalizedDescription=program_source:1962:22: error: use of undeclared identifier 'geometry_out' vec4 tColor = vec4(geometry_out.mColor); ^ program_source:1964:7: error: use of undeclared identifier 'geometry_out' if (geometry_out.mColor.a < 0) { ^ program_source:1966:25: error: use of undeclared identifier 'geometry_out' float dist = length(geometry_out.mTexCoord - center); ^ } ```
Jeroen Bakker added this to the EEVEE & Viewport project 2023-02-22 15:34:35 +01:00
Member

Geometry shaders aren't supported in Metal. We should add a work-around for this at least. Perhaps similar to how we do it in OpenGL.

Geometry shaders aren't supported in Metal. We should add a work-around for this at least. Perhaps similar to how we do it in OpenGL.
Jeroen Bakker added this to the 3.5 milestone 2023-02-22 15:41:22 +01:00
Jeroen Bakker self-assigned this 2023-02-23 08:12:30 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-02-23 08:26:16 +01: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 Assignees
4 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#105059
No description provided.