GKNoise / remapValues function

Getting an "unrecognized selector sent to instance" error dump when executing the GKNoise.remapValues() function according to the developer doc at https://developer.apple.com/documentation/gameplaykit/gknoise/1823487-remapvalues


Copy and paste the below into a playground to replicate:


import GameplayKit
let selectFrequency = 5.1
let selectOctaves = 7
let selectPersistence = 1.1
let selectLacunarity = 1.2
let sizeVec = vector_double2(1.0, 1.0)
let origVec = vector_double2(0.0, 0.0)
let sampleSizeVec = vector_int2(Int32(100), Int32(100))
let selectionNoise = GKNoise(GKPerlinNoiseSource(frequency: selectFrequency, octaveCount: selectOctaves, persistence: selectPersistence, lacunarity: selectLacunarity, seed: 5000))


selectionNoise.remapValues(toCurveWithControlPoints: [-1.0: -1.0, -0.5: 0.5, 0.5: -0.5, 1.0: 1.0])

let noiseMap = GKNoiseMap(selectionNoise, size: sizeVec, origin: origVec, sampleCount: sampleSizeVec, seamless: false)


Wondering if anyone else has encountered the issue?

Replies

The equivalent code in Objective-C causes the same runtime error. So, `Swift` may not be a good place to post this issue.

There's a topic area dedicated for GameplayKit in the Dev Forums: GameplayKit.

Or, Bug Reporter may be a better place.

Thanks. I've moved it over to GameplayKit, and I submitted a bug report as well.

Just tested - this crash still occurs in Xcode 9.0.

Crash still occurs in XCode 9.2. No response yet on the bug submission.