Xcode swift failed with exit code 254

前端 未结 7 2378
灰色年华
灰色年华 2021-02-07 14:14

I am getting this compiler error in my code and I can\'t figure out why:

:0: error: unable to execute command: Segmentation fault: 11


        
7条回答
  •  半阙折子戏
    2021-02-07 14:46

    For the sake of providing other possible causes and how to fix them; I was trying to set the region of a map view within in dispatch block. If I commented out the setting of the region, the error goes away.

        dispatch_once(¢erMapLocation, {
    //                var theSpan: MKCoordinateSpan = MKCoordinateSpanMake(0.01, 0.01)
    //                var theRegion: MKCoordinateRegion = MKCoordinateRegionMake(manager.location.coordinate, theSpan)
    //                self.map.setRegion(theRegion, animated: true)
                    })
            }
    

提交回复
热议问题