Blender crash frequently on MBP M3 Max Sonoma with Cycle + Metal #116243

Open
opened 2023-12-16 05:49:57 +01:00 by Yohan-Lee · 20 comments

System Information
Operating system: MacOS Sonoma 14.2
Graphics card: M3 Max

Blender Version
Broken: 4.0.2(binary version), 4.1.0a(build from source code)

Short description of error
When using the M3 GPU to accelerate in Blender's Cycles rendering mode, the workspace can be moved quickly, but if a lot of objects or shaders are changed at once, it often crashes. Rendering with the CPU rarely causes crashes, but sometimes it freezes and becomes unusable. I don't know much about how to reproduce this kind of bug, so for now I will paste the full text of the bug report. Please request any information necessary for solving the problem.

At first, I thought the binary version was not optimized for the M3, so I downloaded the source code from GitHub and tried building it directly, but that didn't solve the problem either.

Steps to Reproduce
The crash occured when I try to

  1. Rendering with Cycle using GPU and move/rotate/zoomin/zoomout the viewport rapidly while rendering
  2. Changing the frame or playing them also with rendering with Cycle using GPU
  3. Changing some nodes texture/geometry also with rendering with Cycle using GPU

concrete.blend
bugreport_231220.txt

**System Information** Operating system: MacOS Sonoma 14.2 Graphics card: M3 Max **Blender Version** Broken: 4.0.2(binary version), 4.1.0a(build from source code) **Short description of error** When using the M3 GPU to accelerate in Blender's Cycles rendering mode, the workspace can be moved quickly, but if a lot of objects or shaders are changed at once, it often crashes. Rendering with the CPU rarely causes crashes, but sometimes it freezes and becomes unusable. I don't know much about how to reproduce this kind of bug, so for now I will paste the full text of the bug report. Please request any information necessary for solving the problem. At first, I thought the binary version was not optimized for the M3, so I downloaded the source code from GitHub and tried building it directly, but that didn't solve the problem either. **Steps to Reproduce** The crash occured when I try to 1. Rendering with Cycle using GPU and move/rotate/zoomin/zoomout the viewport rapidly while rendering 2. Changing the frame or playing them also with rendering with Cycle using GPU 3. Changing some nodes texture/geometry also with rendering with Cycle using GPU [concrete.blend](https://projects.blender.org/attachments/0ff88347-0884-4537-af9b-aecd07bc2233) [bugreport_231220.txt](https://projects.blender.org/attachments/b38850d6-2b40-48be-96b5-9026ed2803a8)
Yohan-Lee added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-12-16 05:49:58 +01:00
Member

Hi, thanks for the report. From logs, crash occurred in blender::meshintersect::triangulate_polymesh (faulting thread 41)
Doesn't look mac specific from call stack, can you share affected .blend file?

Hi, thanks for the report. From logs, crash occurred in `blender::meshintersect::triangulate_polymesh` (faulting thread 41) Doesn't look mac specific from call stack, can you share affected .blend file?
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-12-19 06:40:09 +01:00
Author

Hi, thanks for reply.
Here's my blender file.

Hi, thanks for reply. Here's my blender file.
Member

Thanks. in 4.1 I'm not able to open the file. Got same stack trace as mentioned in the report.
But file opens in 3.6. It seems the following boolean operation is resulting in crash. Can you replicate again after disabling that boolean node?

Thanks. in 4.1 I'm not able to open the file. Got same stack trace as mentioned in the report. But file opens in 3.6. It seems the [following boolean operation](/attachments/42f07cb2-d33d-45e0-b769-b1f660fed46a) is resulting in crash. Can you replicate again after disabling that boolean node?
Author

I disalbed boolean node, but it still crash, especially when I change frame number.
I'll share another bug report with 4.0.2 which I usually use, since 4.1 was an alpha version.

By the way, I should re-describe my situation more detail.
I make the blender project with 4.0.2 on MBP M3 Max, and faced crash frequently for the reason above.
The crash occured when I try to,

  1. Rendering with Cycle using GPU and move/rotate/zoomin/zoomout the viewport rapidly while rendering
  2. Changing the frame or playing them also with rendering with Cycle using GPU
  3. Changing some nodes texture/geometry also with rendering with Cycle using GPU

But none of Wireframe mode, Solid mode, Material preview mode cause crash, and eevee engine works totally fine.

So I change to 4.1.0a cloning from blender github because I thought it was not optimized for M3 max (maybe very elementary suspicion), but in this case, the blender file even won't open. And the first report was from the 4.1.0a.

I disalbed boolean node, but it still crash, especially when I change frame number. I'll share another bug report with 4.0.2 which I usually use, since 4.1 was an alpha version. By the way, I should re-describe my situation more detail. I make the blender project with 4.0.2 on MBP M3 Max, and faced crash frequently for the reason above. The crash occured when I try to, 1. Rendering with Cycle using GPU and move/rotate/zoomin/zoomout the viewport rapidly while rendering 2. Changing the frame or playing them also with rendering with Cycle using GPU 3. Changing some nodes texture/geometry also with rendering with Cycle using GPU But none of Wireframe mode, Solid mode, Material preview mode cause crash, and eevee engine works totally fine. So I change to 4.1.0a cloning from blender github because I thought it was not optimized for M3 max (maybe very elementary suspicion), but in this case, the blender file even won't open. And the first report was from the 4.1.0a.
Member

This time crash occurred during viewport rendering

especially when I change frame number.

Does it happen at any particular frame?

This time crash occurred during viewport rendering > especially when I change frame number. Does it happen at any particular frame?
Author

Does it happen at any particular frame?

I've just checked, but it happened at random frame.

> Does it happen at any particular frame? I've just checked, but it happened at random frame.
Member

Thanks. I'm not able to confirm the rendering crash

#116243 (comment) : And the first report was from the 4.1.0a.

Just saw your edited comment, I can confirm the above situation as said earlier.
I'll open a new report for "crash on open" case

Thanks. I'm not able to confirm the rendering crash > https://projects.blender.org/blender/blender/issues/116243#issuecomment-1088306 : And the first report was from the 4.1.0a. Just saw your edited comment, I can confirm the above situation as said earlier. I'll open a new report for "crash on open" case
Pratik Borhade added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2023-12-20 12:10:15 +01:00
Author

Sorry for checking late!
Thank you for spliting issue 👍

Sorry for checking late! Thank you for spliting issue 👍
Member

No problem :)
Now "4.1 crash on opening file" (#116372) is fixed, can you verify the rendering crash in recent 4.1 build?
4.0 won't be maintained any further so best to check in latest alpha

No problem :) Now "4.1 crash on opening file" (#116372) is fixed, can you verify the rendering crash in recent 4.1 build? 4.0 won't be maintained any further so best to check in latest alpha
Member

Now "4.1 crash on opening file" (#116372) is fixed, can you verify the rendering crash in recent 4.1 build?

@Yohan-Lee ^

> Now "4.1 crash on opening file" (#116372) is fixed, can you verify the rendering crash in recent 4.1 build? @Yohan-Lee ^
Author

@PratikPB2123
Thanks for your work!
I'm out of my office from yesterday, so I'll try it tomorrow!

@PratikPB2123 Thanks for your work! I'm out of my office from yesterday, so I'll try it tomorrow!
Author

@PratikPB2123
Fantastic! The issue with the above blender file not opening in the latest 4.1 alpha version has been resolved.
However, the problem of blender crashing in the middle of work, which is the issue of this thread, has not been solved yet. I will share the newly emerged bug report.

Crashed thread msg:

Thread 66 Crashed::  Dispatch queue: com.Metal.CompletionQueueDispatch
0   libobjc.A.dylib               	       0x1883a7ff0 objc_release + 16
1   Metal                         	       0x192a221c4 MTLResourceListChunkFreeEntries(MTLResourceListChunk*) + 64
2   Metal                         	       0x1928f42b0 -[MTLResourceList releaseAllObjectsAndReset] + 72
3   IOGPU                         	       0x1a7089d10 IOGPUMetalCommandBufferStorageReset + 36
4   IOGPU                         	       0x1a7089cac IOGPUMetalCommandBufferStorageDealloc + 76
5   IOGPU                         	       0x1a7088130 -[IOGPUMetalCommandBuffer didCompleteWithStartTime:endTime:error:] + 240
6   Metal                         	       0x1928f3ce4 -[_MTLCommandQueue commandBufferDidComplete:startTime:completionTime:error:] + 108
7   IOGPU                         	       0x1a70896e4 __62-[IOGPUMetalCommandBuffer fillCommandBufferArgs:commandQueue:]_block_invoke.50 + 144
8   IOGPU                         	       0x1a7091b54 IOGPUNotificationQueueDispatchAvailableCompletionNotifications + 128
9   IOGPU                         	       0x1a7091c60 __IOGPUNotificationQueueSetDispatchQueue_block_invoke + 64
10  libdispatch.dylib             	       0x1885c49d0 _dispatch_client_callout4 + 20
11  libdispatch.dylib             	       0x1885e0c5c _dispatch_mach_msg_invoke + 468
12  libdispatch.dylib             	       0x1885cbd28 _dispatch_lane_serial_drain + 368
13  libdispatch.dylib             	       0x1885e1998 _dispatch_mach_invoke + 444
14  libdispatch.dylib             	       0x1885cbd28 _dispatch_lane_serial_drain + 368
15  libdispatch.dylib             	       0x1885cca08 _dispatch_lane_invoke + 432
16  libdispatch.dylib             	       0x1885cbd28 _dispatch_lane_serial_drain + 368
17  libdispatch.dylib             	       0x1885cc9d4 _dispatch_lane_invoke + 380
18  libdispatch.dylib             	       0x1885d761c _dispatch_root_queue_drain_deferred_wlh + 288
19  libdispatch.dylib             	       0x1885d6e90 _dispatch_workloop_worker_thread + 404
20  libsystem_pthread.dylib       	       0x188772114 _pthread_wqthread + 288
21  libsystem_pthread.dylib       	       0x188770e30 start_wqthread + 8
@PratikPB2123 Fantastic! The issue with the above blender file not opening in the latest 4.1 alpha version has been resolved. However, the problem of blender crashing in the middle of work, which is the issue of this thread, has not been solved yet. I will share the newly emerged bug report. Crashed thread msg: ``` Thread 66 Crashed:: Dispatch queue: com.Metal.CompletionQueueDispatch 0 libobjc.A.dylib 0x1883a7ff0 objc_release + 16 1 Metal 0x192a221c4 MTLResourceListChunkFreeEntries(MTLResourceListChunk*) + 64 2 Metal 0x1928f42b0 -[MTLResourceList releaseAllObjectsAndReset] + 72 3 IOGPU 0x1a7089d10 IOGPUMetalCommandBufferStorageReset + 36 4 IOGPU 0x1a7089cac IOGPUMetalCommandBufferStorageDealloc + 76 5 IOGPU 0x1a7088130 -[IOGPUMetalCommandBuffer didCompleteWithStartTime:endTime:error:] + 240 6 Metal 0x1928f3ce4 -[_MTLCommandQueue commandBufferDidComplete:startTime:completionTime:error:] + 108 7 IOGPU 0x1a70896e4 __62-[IOGPUMetalCommandBuffer fillCommandBufferArgs:commandQueue:]_block_invoke.50 + 144 8 IOGPU 0x1a7091b54 IOGPUNotificationQueueDispatchAvailableCompletionNotifications + 128 9 IOGPU 0x1a7091c60 __IOGPUNotificationQueueSetDispatchQueue_block_invoke + 64 10 libdispatch.dylib 0x1885c49d0 _dispatch_client_callout4 + 20 11 libdispatch.dylib 0x1885e0c5c _dispatch_mach_msg_invoke + 468 12 libdispatch.dylib 0x1885cbd28 _dispatch_lane_serial_drain + 368 13 libdispatch.dylib 0x1885e1998 _dispatch_mach_invoke + 444 14 libdispatch.dylib 0x1885cbd28 _dispatch_lane_serial_drain + 368 15 libdispatch.dylib 0x1885cca08 _dispatch_lane_invoke + 432 16 libdispatch.dylib 0x1885cbd28 _dispatch_lane_serial_drain + 368 17 libdispatch.dylib 0x1885cc9d4 _dispatch_lane_invoke + 380 18 libdispatch.dylib 0x1885d761c _dispatch_root_queue_drain_deferred_wlh + 288 19 libdispatch.dylib 0x1885d6e90 _dispatch_workloop_worker_thread + 404 20 libsystem_pthread.dylib 0x188772114 _pthread_wqthread + 288 21 libsystem_pthread.dylib 0x188770e30 start_wqthread + 8 ```

Now I have found this a similar entry. I have the same problem with the Mac M3. As soon as I set the viewport to "rendered" and work on the shader, I get a crash very quickly, but never at exactly the same change step. Payback in the rendered view also crashes quickly. Always in connection with Cycles. My ticket #117330, maybe it needs to be merged.

Now I have found this a similar entry. I have the same problem with the Mac M3. As soon as I set the viewport to "rendered" and work on the shader, I get a crash very quickly, but never at exactly the same change step. Payback in the rendered view also crashes quickly. Always in connection with Cycles. My ticket #117330, maybe it needs to be merged.

It seems to work fine on the Mac M1.
I left the playback running, while navigating the 3D View with Viewport Shading Rendered and still disconnecting and connecting some material nodes. No crash here.

Captura de Tela 2024-01-30 às 10.03.27.png

System Information
Operating system: macOS-14.2-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 1.2
Version: 4.1.0 Alpha, branch: main, commit date: 2024-01-30 00:04, hash: 961783c4443d

It seems to work fine on the Mac M1. I left the playback running, while navigating the 3D View with Viewport Shading Rendered and still disconnecting and connecting some material nodes. No crash here. ![Captura de Tela 2024-01-30 às 10.03.27.png](/attachments/2c7410e3-4a65-4296-aa5b-5114cb8bd740) **System Information** Operating system: macOS-14.2-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M1 1.2 Version: 4.1.0 Alpha, branch: main, commit date: 2024-01-30 00:04, hash: `961783c4443d`

I had the same issue, also on M3 Max.
I think it has something to do with large textures.
Try using material override to replace with a simple default material.
See if this works, if it does you need to downsize your textures.

I had the same issue, also on M3 Max. I think it has something to do with large textures. Try using material override to replace with a simple default material. See if this works, if it does you need to downsize your textures.
Germano Cavalcante added the
Module
Render & Cycles
Platform
macOS
Interest
Metal
labels 2024-02-14 01:26:46 +01:00
Member

@Michael-Jones hi, can you check?

@Michael-Jones hi, can you check?

Even if no textures are included, only procedural materials, Blender often crashes. Especially with a split screen. One of them in solid mode and the other in rendered mode with Cyles Renderer. Changing something in edit mode causes a crash. If I had a simple document I would share it immediately. As soon as I have something like that, I'll upload it. Blender 4.1 didn't fix the problem either.

Even if no textures are included, only procedural materials, Blender often crashes. Especially with a split screen. One of them in solid mode and the other in rendered mode with Cyles Renderer. Changing something in edit mode causes a crash. If I had a simple document I would share it immediately. As soon as I have something like that, I'll upload it. Blender 4.1 didn't fix the problem either.

@PratikPB2123, we are going to do a QA pass over Cycles viewport rendering with Metal - at a glance there is some hazardous syncing logic that I can see causing problems.

@PratikPB2123, we are going to do a QA pass over Cycles viewport rendering with Metal - at a glance there is some hazardous syncing logic that I can see causing problems.
Member

Thanks :D

Thanks :D

Hi,

I'm also experiencing these crashes a lot, since version 4.0 to 4.1 actual version on a M3 max with cycles rendered preview mode. Basically on all files. It's easy to make it happen on my machine: Edit mode + Rendered preview + moving camera or vertices/edges/faces and it will happen in the minute.

It seems related to metalRT as when metalRT is off crashes don't happen anymore

My last crash report:

Hi, I'm also experiencing these crashes a lot, since version 4.0 to 4.1 actual version on a M3 max with cycles rendered preview mode. Basically on all files. It's easy to make it happen on my machine: Edit mode + Rendered preview + moving camera or vertices/edges/faces and it will happen in the minute. It seems related to metalRT as when metalRT is off crashes don't happen anymore My last crash report:
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
7 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#116243
No description provided.