I'm trying to run the Fox game sample SceneKit code from WWDC2017, but it crashes when calculating the collision bounding box.
// Setup collision shape
let (min, max) = model.boundingBox
Thread 1: EXC_BAD_ACCESS (code=1, address=0x7fffc0000020)
This error only occurs on my M1 iMac, but runs fine on Intel (using Rosetta).
I really want to get started on SceneKit development for M1 Macs so any help would be appreciated.
Fox Demo Game Code: https://developer.apple.com/library/archive/samplecode/scenekit-2017/Introduction/Intro.html#//apple_ref/doc/uid/TP40017656
I took my 20K app using SceneKit running on an Apple M1 and pruned it down to a 2 line program which fails. It runs on an x86 2013 MacBook pro. To duplicate, make a new CommandLine app and plonk the following lines down.
import SceneKit let _ = SCNMatrix4Mult(SCNMatrix4Identity, SCNMatrix4Identity)
It responds with
Thread 1: EXC_BAD_ACCESS (code=1, address=0x20)
I think this may be the same problem, and hope that it gets you closer to the problem. When I code matrix 4 multiply by hand, then I get a boundingBox bad address fault.
@PAllenKing can you file this as a bug on Feedback Assistant? That is a very good repro case and should make it easy to debug.