CoreML crash randomly.

I'm testing a coreml model within MessageFilterExtension.However, with the same input, the model.prediction crash randomly.

The crash is in the auto generated model class, prediction function:

    func prediction(input: AISMSFilterInput) throws -> AISMSFilterOutput {
        let outFeatures = try model.prediction(from: input)
        let result = AISMSFilterOutput(output1: outFeatures.featureValue(for: "output1")!.multiArrayValue!)
        return result
    }

The outFeatures has an error:


expression produced error: error: /var/folders/6m/y69_5m7170q1kztp356nhhf80000gn/T/expr43-f2ff4b..swift:1:65: error: use of undeclared type 'MLFeatureProvider'

Swift._DebuggerSupport.stringForPrintObject(Swift.UnsafePointer<MLFeatureProvider>(bitPattern: 0x102f342f0)!.pointee)

^~~~~~~~~~~~~~~~~


How to debug this? Thanks.