问题描述
我刚从Crashlytics收到了我的第一份崩溃报告,并正在尝试纠正此问题。不幸的是,只有一行代码可以在较旧的设备上运行,因此我无法在iPhone 6上对其进行测试。
Crashlytics的崩溃报告突出显示了两个线程,第一读:
致命异常:NSInvalidArgumentException
-[CABasicAnimation height]:无法识别的选择器已发送到实例0x17734440
第二读时:
崩溃:地图更新:: NSOperation 0x1a839470
SIGABRT ABORT at 0x316a3dfc
两个线程的指示代码行是:
let relativeAlt = mylocation.altitude-appDelegate.elevation
其中:
let mylocation = self.mapView.myLocation
let appDelegate =(UIApplication.sharedApplication()。delegate as AppDelegate)
我正在尝试了解崩溃报告中的内容。我对程序的理解方式是由于某种原因无法理解海拔
参考?这对我来说没有意义,因为该崩溃似乎是在该应用运行了几分钟后没有错误发生的,突出显示的代码行可能在该应用崩溃之前已经运行了数百次。这里到底发生了什么?
其他信息:
自撰写以来,我收到了其他崩溃信息,我认为这些崩溃源于同一问题:
崩溃:地图更新:: NSOperation 0x19fb2d50
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x11d077ca
崩溃:地图更新:: NSOperation 0x145ced50
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x81450a64
第一个突出显示了以下行我的代码(我相信自从此Beta版本发布以来我一直在开发应用程序,并且行号略有变化):
self .lastLocation =(self.mapView.myLocation as CLLocation).coordinate
第二次崩溃只是给我:
libobjc.A.dylib
objc_msg发送+ 5
第一次新的崩溃(提供了一行代码)提供了此报告:
线程:崩溃:地图更新:: NS操作0x19fb2d50
0 libobjc.A.dylib 0x3105c708 objc_release + 7
1 FlightTracker 0x000ba830 FlightTracker.MapViewController。 (locationManager(FlightTracker.MapViewController)->(Swift.ImplicitlyUnwrappedOptional< ObjectiveC.CLLocationManager> ;, didUpdateLocations:Swift.ImplicitlyUnwrappedOptional< Swift.Array< Swift.AnyObject>>)->())(关闭#1)。 MapViewController.swift:168)
2基金会0x244ce0fd __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 8
3基金会0x24438fc5-[NSBlockOperation main] + 148
4基金会0x2442b845-[__ NSOperb] +内部768基金会0x244d0a57 __NSOQSchedule_f + 186
6 libdispatch.dylib 0x315ad5d9 _dispatch_queue_drain $ VARIANT $ mp + 948
7 libdispatch.dylib 0x315ad0a9 _dispatch_queue_invoke $ lib $ dd0b3db 0b $ d3 $ bdisbatch.dylib 0x315ad0a9 _dispatch_queue_invoke $ VARIANT $ mp 3 b $ b 9 libdispatch.dylib 0x315b01fb _dispatch_worker_thread3 + 106
10 libsystem_pthread.dylib 0x31720e25 _pthread_wqthread + 668
可能不是您的问题,但我只是有一个SIGABRT令我发疯(这就是我最终看这个问题的方式),我将发布我的解决方案,以防将来对将来有所帮助
在我的(iPad,并不重要)应用中,您可以按一个按钮,导致创建一个非全屏 UIViewController
包含一个 UITableView
,并且此viewController通过 UIPopoverController
呈现。 / p>
在我的情况下,我在装入tableView项时搞砸了,在创建tableView单元时,我最终试图向其中添加空值一本字典。 (这是一个很长的故事,与一个基础结构类有关,该类期望数据采用某种格式。)
无论如何,尝试访问 newViewController.view
导致了该行的SIGABRT,没有任何线索表明问题与填充tableView单元有关。在堆栈跟踪中没有发现与tableView相关的任何内容,因此我花了相当长的时间才能缩小范围。我最终只是猜测也许是tableview,并断开了 IBOutlet
和委托/数据源,以查看崩溃是否消失了。
...确实如此。这使我无法找到真正的问题。
无论如何,这就是我的故事。希望它对某人有帮助。
I just received my first crash report from Crashlytics and am attempting to correct the issue. Unfortunately it is only with a line of code that runs on older devices so I can't test it on my iPhone 6.
The crash report from Crashlytics highlights two threads, the first reads:
Fatal Exception: NSInvalidArgumentException
-[CABasicAnimation altitude]: unrecognized selector sent to instance 0x17734440
While the second reads:
Crashed: Map Update :: NSOperation 0x1a839470
SIGABRT ABORT at 0x316a3dfc
The indicated line of code for both threads is:
let relativeAlt = mylocation.altitude - appDelegate.elevation
Where:
let mylocation = self.mapView.myLocation
let appDelegate = (UIApplication.sharedApplication().delegate as AppDelegate)
I'm trying to understand what I'm reading in the crash report. The way I see it the program doesn't understand the altitude
reference made for some reason? This doesn't make sense to me since this crash seems to occur after that app has been running for several minutes without error, the highlighted line of code is run possibly hundreds of times before the app crashed. What is really happening here?
Additional Information:
Since writing, I have received additional crashes that I believe stem from the same issue:
Crashed: Map Update :: NSOperation 0x19fb2d50
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x11d077ca
Crashed: Map Update :: NSOperation 0x145ced50
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x81450a64
The first highlighted the following line in my code (I believe since I had worked on the app since this beta release and the line numbers have changed slightly):
self.lastLocation = (self.mapView.myLocation as CLLocation).coordinate
While the second crash just gave me:
libobjc.A.dylib
objc_msgSend + 5
The first of the new crashes (That provided a line of code) provided this report:
Thread : Crashed: Map Update :: NSOperation 0x19fb2d50
0 libobjc.A.dylib 0x3105c708 objc_release + 7
1 FlightTracker 0x000ba830 FlightTracker.MapViewController. (locationManager (FlightTracker.MapViewController) -> (Swift.ImplicitlyUnwrappedOptional<ObjectiveC.CLLocationManager>, didUpdateLocations : Swift.ImplicitlyUnwrappedOptional<Swift.Array<Swift.AnyObject>>) -> ()).(closure #1) (MapViewController.swift:168)
2 Foundation 0x244ce0fd __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 8
3 Foundation 0x24438fc5 -[NSBlockOperation main] + 148
4 Foundation 0x2442b845 -[__NSOperationInternal _start:] + 768
5 Foundation 0x244d0a57 __NSOQSchedule_f + 186
6 libdispatch.dylib 0x315ad5d9 _dispatch_queue_drain$VARIANT$mp + 948
7 libdispatch.dylib 0x315ad0a9 _dispatch_queue_invoke$VARIANT$mp + 84
8 libdispatch.dylib 0x315af0d3 _dispatch_root_queue_drain + 330
9 libdispatch.dylib 0x315b01fb _dispatch_worker_thread3 + 106
10 libsystem_pthread.dylib 0x31720e25 _pthread_wqthread + 668
Probably not your problem, but I just had a SIGABRT that was driving me nuts (that's how I ended up looking at this question) and I'll post my solution in case it helps some future S.O. spelunker.
In my (iPad, not that it matters) app, you can push a button that results in the creation of a not-full-screen UIViewController
which contains a UITableView
, and this viewController is presented via UIPopoverController
.
In my case I had a screw-up in my loading of the tableView items which, at the time of creating the tableView cell I ended up trying to add a null value into a dictionary. (It's a long story, having to do with an infrastructure class that expects the data to be in a certain format.)
Anyway, attempting to access newViewController.view
caused the SIGABRT on that line, with no clue that the problem was related to filling the tableView cell. Nothing tableView-related was evident in the stack trace, so it took me quite a while to narrow things down. I eventually just guessed "maybe it's the tableview" and disconnected the IBOutlet
and delegate/dataSource to see if the crash went away.
...And it did. Which lead me down the path of finding the real problem.
Anyway, that's my story. Hope it's helpful to someone.
这篇关于了解iOS崩溃[SIGABRT ABORT]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!