iOS应用程序:几个崩溃与共同的主题:SIGSEGV和_sigtramp [英] iOS App: Several crashes with common themes of: SIGSEGV and _sigtramp

查看:4230
本文介绍了iOS应用程序:几个崩溃与共同的主题:SIGSEGV和_sigtramp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为obj-c的新手我不是读堆栈跟踪的主人,但我通常可以找出代码中的哪里开始查找。然而,在测试期间,其中一个测试者总是报告几个随机崩溃。我不能使头和尾的堆栈跟踪,因为他们不指向我自己的任何代码。以下是两个:

Being new to obj-c I'm no master at reading stacktraces but I can usually figure out where in the code to start looking. However, during testing one of the testers is consistently reporting several random crashes. And I cannot make head nor tail of the stacktraces since they don't point to any of my own code. Here are two:

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

和:

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

有人可以解密这个问题,并解释我在纯英语中看到的内容吗?

Can someone decipher this and explain what I am seeing in plain English? Some pointer to why these crashes might be occuring would also be very helpful!

编辑:更多信息


  • 显然,崩溃几乎总是发生在相当弱的网络连接上。

  • 我使用异步NSURLConnections和委托

  • 我将尝试使用PLCrashReporter为所有线程获取堆栈跟踪

  • 我使用ARC


  • Apparently the crashes almost always happen on a fairly weak network connection.
  • I'm using asynchronous NSURLConnections with a delegate
  • I'm going to try and get stack traces for all threads using PLCrashReporter
  • I'm using ARC
  • The top three lines of the trace are common to every single crash (except the hexadecimal number - memory location?):

0 WIT Free 0x000a5a92 _mh_execute_header + 338578
1 WIT Free 0x000a677c _mh_execute_header + 341884
2 libsystem_c.dylib 0x355cc7ec _sigtramp + 48

感谢

推荐答案

发生了什么事情是被调用的对象(NSURLConnection)试图调用为它设置的委托,但该委托是在一个已经被丢弃的对象,因此内存访问冲突。

What's happening is that the invoked object (NSURLConnection) is trying to call the delegate you set for it, but that delegate is in an object that has already been discarded, hence the memory access violation.

我的猜测是,你移出了一个视图,其中有一个NSURLConnections对象与代理集,但你没有正确关闭NSURLConnection

My guess is that somewhere you have move off a view that had a NSURLConnections object with the delegate set, but you did not close down the NSURLConnection properly

请参阅 http://stackoverflow.com/a/11232292/451482

这篇关于iOS应用程序:几个崩溃与共同的主题:SIGSEGV和_sigtramp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆