OSX metal crash

Hi Juce Team,

I got some report of crashes with the new Metal layer using JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS

Any ideas ?

Thanks !

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   AGXMetalG13X                  	    0x7ffa1bec0f04 0x7ffa1bc7c000 + 2379524
1   Falcon                        	       0x222e12a4f bool juce::CoreGraphicsMetalLayerRenderer<NSView>::drawRectangleList<juce::NSViewComponentPeer::setNeedsDisplayRectangles()::'lambda0'()::operator()() const::'lambda'(CGContext*, CGRect)>(NSView*, float, juce::NSViewComponentPeer::setNeedsDisplayRectangles()::'lambda0'()::operator()() const::'lambda'(CGContext*, CGRect)&&, juce::RectangleList<float> const&) + 1039
2   Falcon                        	       0x222e122ad juce::NSViewComponentPeer::setNeedsDisplayRectangles() + 461
3   Falcon                        	       0x222e1e26e juce::NSViewComponentPeer::AsyncRepainter::handleAsyncUpdate() + 254
4   Falcon                        	       0x222cdd154 juce::MessageQueue::deliverNextMessage() + 52
5   Falcon                        	       0x222cdd0ce juce::MessageQueue::runLoopCallback() + 14
6   CoreFoundation                	    0x7ff80c34f37a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
7   CoreFoundation                	    0x7ff80c34f2e2 __CFRunLoopDoSource0 + 180
8   CoreFoundation                	    0x7ff80c34f060 __CFRunLoopDoSources0 + 242
9   CoreFoundation                	    0x7ff80c34da70 __CFRunLoopRun + 892
10  CoreFoundation                	    0x7ff80c34d034 CFRunLoopRunSpecific + 562
11  HIToolbox                     	    0x7ff8154695e6 RunCurrentEventLoopInMode + 292
12  HIToolbox                     	    0x7ff81546934a ReceiveNextEventCommon + 594
13  HIToolbox                     	    0x7ff8154690e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
14  AppKit                        	    0x7ff80ecbdfad _DPSNextEvent + 927
15  AppKit                        	    0x7ff80ecbc66a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394
16  AppKit                        	    0x7ff80ecaed19 -[NSApplication run] + 586
17  Cubase 12                     	       0x10488f738 0x100e89000 + 60843832
18  Cubase 12                     	       0x1046a70e5 0x100e89000 + 58843365
19  Cubase 12                     	       0x102a94333 0x100e89000 + 29406003
20  Cubase 12                     	       0x102a99d2b 0x100e89000 + 29429035
21  dyld                          	       0x20611852e start + 462

OS Version: macOS 12.5 (21G72)

1 Like

Bump :slight_smile:

Is this supposed to be fixed by

?

If the crash happened on an older device then it’s likely to be fixed. If it’s a newer device then it’s hard to say. Unfortunately the stack trace doesn’t tell us much.

The first issue reported here should be addressed:

The second is a little harder to work out, but there are some things we can try.