SceneKit Crashes With Empty SCNView Frame

Originator:skye
Number:rdar://25537531 Date Originated:4/4/2016
Status:Open Resolved:
Product:iOS SDK Product Version:9.3
Classification:Serious Bug Reproducible:Always
 
Summary:
Even if not on screen, having an SCNView initialized with no frame will cause an internal exception to fail within SceneKit's Metal renderer.

Steps to Reproduce:
class BestAppEverViewController: UIViewController {
    // MARK:  I fail!
    let sceneView = SCNView()

    // MARK: - I work!
    let sceneView = SCNView(frame: CGRect(x: 0, y: 0, width: 1, height: 1))
}

Expected Results:
Not to see an assertion failing

Actual Results:
Assertion failed: (renderSize.x != 0), function -[SCNRenderContextMetal _setupDescriptor:forPass:isFinalTechnique:], file /BuildRoot/Library/Caches/com.apple.xbs/Sources/SceneKit/SceneKit-332.6/sources/Core3DRuntime/NewRenderer/SCNRenderContextMetal.mm, line 688.

Version:
9.3 (13E234)

Configuration:
iPhone 6s Plus, iPhone 6

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!