Objective c iOS应用程序:几个常见主题为:SIGSEGV和_sigtramp的崩溃

Objective c iOS应用程序:几个常见主题为:SIGSEGV和_sigtramp的崩溃,objective-c,ios,cocoa-touch,Objective C,Ios,Cocoa Touch,作为obj-c的新手,我并不擅长阅读stacktraces,但我通常可以找到代码中的起始位置。然而,在测试过程中,一名测试人员始终报告几个随机碰撞。而且我无法理解stacktraces的头尾,因为它们不指向我自己的任何代码。这里有两个: 0 WIT Free 0x000a5a92 _mh_execute_header + 338578 1 WIT Free 0x000a677c _mh_execute_header + 341884 2 libsystem_c.dylib 0x355cc7ec

作为obj-c的新手,我并不擅长阅读stacktraces,但我通常可以找到代码中的起始位置。然而,在测试过程中,一名测试人员始终报告几个随机碰撞。而且我无法理解stacktraces的头尾,因为它们不指向我自己的任何代码。这里有两个:

0 WIT Free 0x000a5a92 _mh_execute_header + 338578
1 WIT Free 0x000a677c _mh_execute_header + 341884
2 libsystem_c.dylib 0x355cc7ec _sigtramp + 48
3 WIT Free 0x000fcd02 _mh_execute_header + 695554
4 WIT Free 0x000fd502 _mh_execute_header + 697602
5 WIT Free 0x000fd0a0 _mh_execute_header + 696480
6 WIT Free 0x000fea9c _mh_execute_header + 703132
7 WIT Free 0x000ffa3a _mh_execute_header + 707130
8 Foundation 0x31e1bc28 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 16
9 Foundation 0x31d736d8 -[NSURLConnectionInternalConnection invokeForDelegate:] + 28
10 Foundation 0x31d736a2 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198
11 Foundation 0x31d735c4 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 60
12 CFNetwork 0x34c6c7f4 _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 192
13 CFNetwork 0x34c614a4 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 424
14 CFNetwork 0x34c61598 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 668
15 CFNetwork 0x34c611a2 _ZN19URLConnectionClient13processEventsEv + 106
16 CFNetwork 0x34c610d8 _ZN17MultiplexerSource7performEv + 156
17 CoreFoundation 0x314b1ad2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
18 CoreFoundation 0x314b129e __CFRunLoopDoSources0 + 214
19 CoreFoundation 0x314b0044 __CFRunLoopRun + 652
20 CoreFoundation 0x314334a4 CFRunLoopRunSpecific + 300
21 CoreFoundation 0x3143336c CFRunLoopRunInMode + 104
22 GraphicsServices 0x334ad438 GSEventRunModal + 136
23 UIKit 0x30b96cd4 UIApplicationMain + 1080
24 WIT Free 0x000558b0 _mh_execute_header + 10416
25 WIT Free 0x00055857 _mh_execute_header + 10327
以及:

有人能用通俗易懂的英语解释一下我所看到的吗?一些关于为什么会发生这些崩溃的指针也会非常有用

编辑:更多信息

  • 显然,崩溃几乎总是发生在相当弱的网络连接上
  • 我正在对委托使用异步NSURLConnections
  • 我将尝试使用PLCrashReporter获取所有线程的堆栈跟踪
  • 我用的是ARC
  • 跟踪的前三行对于每个崩溃都是通用的(十六进制数-内存位置除外):
:


感谢

发生的情况是,被调用的对象(NSURLConnection)正试图调用为其设置的委托,但该委托位于已被丢弃的对象中,因此内存访问冲突

我的猜测是,您在某个地方移动了一个具有NSURLConnections对象和委托集的视图,但没有正确关闭NSURLConnection


请参见

如果他们没有指向您的代码,什么是“无智慧”?(堆栈跟踪看起来很奇怪,好像有什么东西试图将地址转换为符号并完成了大约一半的工作。)崩溃信息和用于解释它的二进制/符号之间可能不匹配。我的代码是免费的。这是怎么回事?我在网上找不到关于它的任何东西?我想这里发生的事情(部分猜测)是,无论创建堆栈跟踪的是什么,都找不到与应用程序自身代码匹配的符号
\u mh\u execute\u header
是一个已知的符号/地址,当它没有更好的信息时,它会将其用作计算偏移量的基础。好的,我终于在附加调试实例的情况下成功地再现了崩溃。崩溃确实是由第三方库造成的。我使用我的问题的堆栈跟踪来自TestFlight,但在XCode中重新符号化的实际崩溃日志没有显示
\u me\u execute\u header
。可以接受解释
\u mh\u execute\u header
的详细信息以及如何诊断此类堆栈跟踪的答案。网上关于
\u mh\u execute\u header
的内容不多,所以我相信它将来会帮助一些人!
0 WIT Free 0x00067a92 _mh_execute_header + 338578
1 WIT Free 0x0006877c _mh_execute_header + 341884
2 libsystem_c.dylib 0x355cc7ec _sigtramp + 48
3 WIT Free 0x000bfc82 _mh_execute_header + 699522
4 WIT Free 0x000cc34e _mh_execute_header + 750414
5 WIT Free 0x000cd5a0 _mh_execute_header + 755104
6 libdispatch.dylib 0x35cf5c58 _dispatch_call_block_and_release + 12
7 libdispatch.dylib 0x35d00e90 _dispatch_main_queue_callback_4CF$VARIANT$up + 196
8 CoreFoundation 0x314b02ac __CFRunLoopRun + 1268
9 CoreFoundation 0x314334a4 CFRunLoopRunSpecific + 300
10 CoreFoundation 0x3143336c CFRunLoopRunInMode + 104
11 GraphicsServices 0x334ad438 GSEventRunModal + 136
12 UIKit 0x30b96cd4 UIApplicationMain + 1080
13 WIT Free 0x000178b0 _mh_execute_header + 10416
14 WIT Free 0x00017857 _mh_execute_header + 10327
0 WIT Free 0x000a5a92 _mh_execute_header + 338578
1 WIT Free 0x000a677c _mh_execute_header + 341884
2 libsystem_c.dylib 0x355cc7ec _sigtramp + 48