Group Group Group Group Group Group Group Group Group

Xcode 11.4 Runtime Error

Hey,

Is anyone using Xcode 11.4? There seems to be an issue with all the examples that use this gesture recognizer:

@objc func handlePan(gesture: NSPanGestureRecognizer)

The applications now all crash with and the following error is displayed:

Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

Best,
Eoin

Somehow missed the post below!

As stated the solution is to assign the whole [x, y, z] float3 value to the rotation at one time.

override func rotate(delta: float2) {
let sensitivity: Float = 0.005

    var x = rotation.x + delta.y * sensitivity
    x = max(-Float.pi/2, min((x), Float.pi/2))
    
    let y = rotation.y + delta.x * sensitivity

    // Need to assign the whole [x, y, z] float3 value to the rotation at one time
    rotation = [x, y, 0]
    _viewMatrix = updateViewMatrix()
}
2 Likes

@eoey1 Thank you for sharing your solution - much appreciated!