Blank scene with xcode connected and "Metal -> API Validation" turned off.

I'm not sure which combination of iOS/XCode/Mac OS is causing this issue, but all of a sudden when I try to run our SceneKit app and the "Scheme -> Diagnostics -> Metal -> API Validation" setting is turned off the scene won't render and the console is just full of the following errors:

Execution of the command buffer was aborted due to an error during execution. Invalid Resource (00000009:kIOGPUCommandBufferCallbackErrorInvalidResource)

[SceneKit] Error: Main command buffer execution failed with status 5, error: Error Domain=MTLCommandBufferErrorDomain Code=9 "Invalid Resource (00000009:kIOGPUCommandBufferCallbackErrorInvalidResource)" 

)

If you run the app outside of xcode it's fine, also enabling the "API Validation" option stops the issue.

One of my schemes has this option disabled since the project began and never had an issue before. Just throwing this out there incase someone else has spent hours of their life trying to figure out why this is not working for them.

Also you can just create a new SceneKit project and turn that diagnostic option off and the app won't render anything.

Replies

Yeah, it started happening to me too after updating (I think) to Xcode 13.3.1. The same console spam + when running the app not from Xcode all is good.

Hey there! Apologies for resurrecting this older post.

I've run into this exact issue with the current version of Xcode. Did you ever find a solution? Additionally, have you discovered if this problem is tied to specific iOS versions or if it impacts the app in any other way? Thanks in advance for any insights!