SceneKit Fox Code Crashes on M1

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.

  • 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.

Add a Comment

Accepted Reply

Could you try the Fox2 sample that is attached to this session? This is from WWDC21, so it might have a fix for whatever issue you are seeing. If you still hit the bug, please file the issue on Feedback Assistant.

Add a Comment

Replies

Could you try the Fox2 sample that is attached to this session? This is from WWDC21, so it might have a fix for whatever issue you are seeing. If you still hit the bug, please file the issue on Feedback Assistant.

Add a Comment