Segmentation fault: 11 in Xcode 10 beta

Hello,

 

I’m trying to build my app using Xcode 10 beta – but I get an error wich I don’t get on the previous versions. Any idea of what it could be?

 

While silgen emitConstructor SIL function "@$S14PROJECT25SBMonitoredVehicleJourneyV12directionRef04lineG017publishedLineName9monitored0L4Call15monitoringError24originAimedDepartureTime011destinationq7ArrivalS05delay08courseOfeG00pG00pK00tG00tK005routeG015vehicleLocation0Z4Mode0zG0AcA011SBDirectionG0OSg_SSSgAYSbAA0cM0VAA012SBMonitoringO0OSgA9yA17SBVehicleLocationVSgAA13SBVehicleModeOAYtcfC".
for 'init(directionRef:lineRef:publishedLineName:monitored:monitoredCall:monitoringError:originAimedDepartureTime:destinationAimedArrivalTime:delay:courseOfJourneyRef:originRef:originName:destinationRef:destinationName:routeRef:vehicleLocation:vehicleMode:vehicleRef:)' at /Users/name/Developer/PROJECT/PROJECT/Models/SBMonitoredVehicleJourney.swift:11:8
error: Segmentation fault: 11

 

struct SBMonitoredVehicleJourney: Equatable, Codable {   
    let directionRef: SBDirectionRef?
    /// Identifies the Line.
    let lineRef: String?
    /// Name or Number by which the line is known to the public.
    let publishedLineName: String?
    /// Whether there is real-time information available for journey; if not present, not known.
    let monitored: Bool
    let monitoredCall: SBMonitoredCall
    let monitoringError: SBMonitoringError?
    let originAimedDepartureTime, destinationAimedArrivalTime, delay, courseOfJourneyRef: String?
    let originRef, originName, destinationRef, destinationName: String?
    /// Identifier of Route that Journey follows.
    let routeRef: String?
    let vehicleLocation: SBVehicleLocation?
    let vehicleMode: SBVehicleMode
    /// Reference to a vehicle
    let vehicleRef: String?
    
    lazy var departureStatus: SBDepartureStatus = {
        if delay != nil {
            let startDate = Date()
            let components = NSDateComponents.duration(from: delay!)
            let endDate = NSCalendar.current.date(byAdding: components as DateComponents, to: startDate)
            
            if let timeInterval = endDate?.timeIntervalSince(startDate) {
                
                switch timeInterval {
                case ...(-60): return .early
                case 0...120: return .ontime
                case 120...: return .delayed
                default: return .noreport
                }
            }
        }
        
        return .noreport
    }()
    
    enum CodingKeys: String, CodingKey {
        case courseOfJourneyRef = "CourseOfJourneyRef"
        case delay = "Delay"
        case destinationAimedArrivalTime = "DestinationAimedArrivalTime"
        case destinationName = "DestinationName"
        case destinationRef = "DestinationRef"
        case directionRef = "DirectionRef"
        case lineRef = "LineRef"
        case monitored = "Monitored"
        case monitoredCall = "MonitoredCall"
        case monitoringError = "MonitoringError"
        case originAimedDepartureTime = "OriginAimedDepartureTime"
        case originName = "OriginName"
        case originRef = "OriginRef"
        case publishedLineName = "PublishedLineName"
        case routeRef = "RouteRef"
        case vehicleLocation = "VehicleLocation"
        case vehicleMode = "VehicleMode"
        case vehicleRef = "VehicleRef"
    }
}

Powered by WPeMatico

About

You may also like...

Comments are closed.