Strange bug

My SceneKit Game failed with a
com.apple.scenekit.scnview-renderer (10): signal SIGABRT
The error was marked on the line

@main

Here's the log navigator:

2022-05-25 15:24:18.829319+0800 MyWorldiOS[9022:293392] Metal API Validation Enabled

validateRenderPassDescriptor:899: failed assertion `RenderPass Descriptor Validation

MTLRenderPassAttachmentDescriptor MTLStoreActionMultisampleResolve store action for the depth attachment is not supported by device

PixelFormat MTLPixelFormatDepth32Float cannot be a MSAA resolve target

'

dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/wangkeshijian/Library/Developer/Xcode/DerivedData/MyWorld-aayoxjgvyfzbxvgqnvylzgvlwkyr/Build/Products/Debug-iphonesimulator:/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/wangkeshijian/Library/Developer/Xcode/DerivedData/MyWorld-aayoxjgvyfzbxvgqnvylzgvlwkyr/Build/Products/Debug-iphonesimulator

validateRenderPassDescriptor:899: failed assertion `RenderPass Descriptor Validation

MTLRenderPassAttachmentDescriptor MTLStoreActionMultisampleResolve store action for the depth attachment is not supported by device

PixelFormat MTLPixelFormatDepth32Float cannot be a MSAA resolve target

'

CoreSimulator 802.6 - Device: MyPhone (EBB1ECDE-8AD7-4418-84AF-0B761E0A2EA7) - Runtime: iOS 15.4 (19E5234a) - DeviceType: iPhone 12

(lldb) 

I'm not sure what else should I put in here

Answered by in 714737022

Hi makabaka, I see this is running on a simulator device. It seems the simulator does not currently support MSAA depth resolves, although the physical iPhone 12 does indeed have support for this feature. SceneKit also seems to not correctly check if the simulator supports the feature. I would expect it to disable MSAA on devices that do not support it.

Please file a bug report using Feedback Assistant, provide your device configuration and if possible an xcode project that reproduces the error, then post the FB number back here so I can see it. I can then escalate the issue to the appropiate channels to resolve it.

In the mean-time, when using a simulator you can set the antialiasingMode of your SCNView to SCNAntialiasingModeNone;

scnView.antialiasingMode = (
#if TARGET_OS_SIMULATOR
  SCNAntialiasingModeNone
#else
  // whatever anti-aliasing mode for physical device
#endif
);

or the equivalent of swift with #if targetEnvironment(simulator)

Accepted Answer

Hi makabaka, I see this is running on a simulator device. It seems the simulator does not currently support MSAA depth resolves, although the physical iPhone 12 does indeed have support for this feature. SceneKit also seems to not correctly check if the simulator supports the feature. I would expect it to disable MSAA on devices that do not support it.

Please file a bug report using Feedback Assistant, provide your device configuration and if possible an xcode project that reproduces the error, then post the FB number back here so I can see it. I can then escalate the issue to the appropiate channels to resolve it.

In the mean-time, when using a simulator you can set the antialiasingMode of your SCNView to SCNAntialiasingModeNone;

scnView.antialiasingMode = (
#if TARGET_OS_SIMULATOR
  SCNAntialiasingModeNone
#else
  // whatever anti-aliasing mode for physical device
#endif
);

or the equivalent of swift with #if targetEnvironment(simulator)

Strange bug
 
 
Q