EXC_BAD_INSTRUCTION(代码= EXC_I386_INVOP,子代码= 0x0)

时间:2017-02-06 09:39:14

标签: ios swift cllocationmanager

enter image description here我正在

  

EXC_BAD_INSTRUCTION(代码= EXC_I386_INVOP,子代码= 0x0)

但是我真的不知道如何追查其根本原因。我的代码使用了INTULocationRequestBlock等等。

更新:崩溃的原因是因为webserviceCall(请参阅下面的代码)从不调用onCompletion,当代码再次运行时,我收到错误EXC_BAD_INSTRUCTION。我确认情况确实如此,但不确定为什么或如何防止这种情况。

locationManager.requestLocation(withDesiredAccuracy: INTULocationAccuracy.city, timeout: 30.0, block: { (_ currentLocation: CLLocation, _ achievedAccuracy: INTULocationAccuracy, _ status: INTULocationStatus) in
     if status == INTULocationStatus.success {
            self._searchNearbyProperties(withCoordinate: currentLocation.coordinate)
     } else {
         self.delegate?.propertyManager(self, didFailToFindProperties: "Unable to find your current location.")
     }

} as! INTULocationRequestBlock)

0 个答案:

没有答案