Metal backend + Matplotlib = Blender crash (MacOS) #114881

Open
opened 2023-11-15 03:55:05 +01:00 by TonyG · 4 comments

System Information
Operating system: macOS-12.5-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M2 1.2

Blender Version
Broken: version: 4.0.0, branch: blender-v4.0-release, commit date: 2023-11-13 17:26, hash: 878f71061b8e
Worked: Never worked with Metal backend, always worked with OpenGL backend.

Short description of error
When closing a Matplotlib graph window, Blender instantly crash.
It's related to Metal backend.

Exact steps for others to reproduce the error

  1. if using Blender 3, in Preferences > System > GPU Backend : choose "Metal"
  2. install Matplotlib and use it to draw a graph
  3. close the graph > crash

It doesn't crash when using the OpenGL backend (which has been removed since Blender 4.0).
It doesn't crash when using Python3 outside of Blender.

Here attached are 2 files :

  • Blend file with script that reproduce the steps
  • MacOS crash report
**System Information** Operating system: macOS-12.5-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M2 1.2 **Blender Version** Broken: version: 4.0.0, branch: blender-v4.0-release, commit date: 2023-11-13 17:26, hash: `878f71061b8e` Worked: Never worked with Metal backend, always worked with OpenGL backend. **Short description of error** When closing a Matplotlib graph window, Blender instantly crash. It's related to Metal backend. **Exact steps for others to reproduce the error** 1. if using Blender 3, in Preferences > System > GPU Backend : choose "Metal" 2. install Matplotlib and use it to draw a graph 3. close the graph > crash It doesn't crash when using the OpenGL backend (which has been removed since Blender 4.0). It doesn't crash when using Python3 outside of Blender. Here attached are 2 files : - Blend file with script that reproduce the steps - MacOS crash report
TonyG added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-11-15 03:55:05 +01:00
Jesse Yurkovich added the
Platform
macOS
label 2023-11-15 04:02:52 +01:00
TonyG changed title from Metal backend + Matplotlib = Blender crash to Metal backend + Matplotlib = Blender crash (MacOS) 2023-11-15 04:12:12 +01:00
Author

Update :

  • by default Matplotlib use the "MacOSX" rendering backend
  • if I install PyQT6 and force Matplotlib to use "QtAgg" to render, it doesn't crash anymore !

Attached a new blend file to demonstrate this finding.

Update : - by default Matplotlib use the "MacOSX" rendering backend - if I install PyQT6 and force Matplotlib to use "QtAgg" to render, it doesn't crash anymore ! Attached a new blend file to demonstrate this finding.
Member

Hi, thanks for the report. I'm not sure if we track bug reports caused due to external python libraries.
@lichtwerk ^

Hi, thanks for the report. I'm not sure if we track bug reports caused due to external python libraries. @lichtwerk ^
Pratik Borhade added
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2023-11-15 06:23:29 +01:00
Author

Understandable ^^
Matplotlib is a must-have for anyone doing data science/statistics though.
Let me know what you think and if you have any clue about the crash, maybe I'll try reporting on the project's Github.

Understandable ^^ Matplotlib is a must-have for anyone doing data science/statistics though. Let me know what you think and if you have any clue about the crash, maybe I'll try reporting on the project's Github.

Are you able to upgrade your system to at least macOS Ventura (13.6.x) or even Sonoma (14.1.1)...? Metal support in those macOS version has been changed / improved...

Are you able to upgrade your system to at least macOS Ventura (13.6.x) or even Sonoma (14.1.1)...? Metal support in those macOS version has been changed / improved...
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#114881
No description provided.