We see strange crashes when running our app on macOS 12 beta
21A5522h. We have not been able to fully identify the issue but it seems to happen on continue video playback in an AVPlayer
after the app has been in the background. Xcode points to some random code (seems different every time and never in our own code)
And in the log we will see:
-[MTLDebugCommandBuffer lockPurgeableObjects]:2103: failed assertion 'MTLResource 0x600002293790 (label: (null)), referenced in cmd buffer 0x7f7b2200a000 (label: (null)) is in volatile or empty purgeable state at commit'
-[MTLDebugCommandBuffer lockPurgeableObjects]:2103: failed assertion 'MTLResource 0x600002293790 (label: (null)), referenced in cmd buffer 0x7f7b2200a000 (label: (null)) is in volatile or empty purgeable state at commit'
We tried finding the object 0x600002293790 and 0x7f7b2200a000 but this gave no additional information as to why the app crashes.
We are using a custom VideoCompositor: AVVideoCompositing
and initialise the CIContext
for the work done here with these options:
if let mtlDevice = MTLCreateSystemDefaultDevice()
let options: [CIContextOption : Any] = [
CIContextOption.useSoftwareRenderer: false,
CIContextOption.outputPremultiplied: false,
]
let context = CIContext(mtlDevice: mtlDevice, options: options)
}
Not sure this is an Xcode debug issue? or an actual issue as we have not seen it crash when not using Xcode to build our app.
Any information as to locating the source of the issue or a solution would be awesome.
Update:
We seem to see messages before the crash that relate to the screen on most crashes.
****[48028:857651] [] [15:53:06.503] FPSupport_GetDisplayRefreshInformation signalled err=-12780 (kCMBaseObjectError_ParamErr) (CGDisplayModeGetRefreshRate returned 0) at FigPlayerSupport.m:3198
****[48028:857658] [] [15:53:06.548] customVideoCompositor_CopyProperty signalled err=-12784 (kFigBaseObjectError_PropertyNotFound) (unrecognised property) at FigVideoCompositor_Custom.c:581
Or this one: