简体   繁体   English

未知崩溃原因(附带CrashReport)SIGTRAP。 AFNetworking?

[英]Unknown crash reason (with CrashReport attached) SIGTRAP. AFNetworking?

I keep getting these crashes in my app that´s in the AppStore. 我一直在AppStore中的应用程序中遇到这些崩溃。 The CrashReport always looks like this: CrashReport总是如下所示:

Incident Identifier: 986486D7-F013-4102-B9E3-84F923223914
CrashReporter Key:   [TODO]
Hardware Model:      iPhone4,1
Process:         MyApp [57885]
Path:            /Users/USER/MyApp.app/MyApp
Identifier:      de.myapp.iphone
Version:         12475
Code Type:       ARM
Parent Process:  launchd [1]

Date/Time:       2012-12-20 15:48:53 +0000
OS Version:      iPhone OS 6.0.1 (10A523)
Report Version:  104

Exception Type:  SIGTRAP
Exception Codes: #0 at 0x3abd62be
Crashed Thread:  0

Thread 0 Crashed:
0   CoreFoundation                      0x363582be CFRelease + 18
1   WebCore                             0x383de395 WebCore::stopSharedTimer() + 33
2   WebCore                             0x38433515 WebCore::TimerBase::~TimerBase() + 45
3   WebCore                             0x3846003b WebCore::Document::~Document() + 2751
4   WebCore                             0x3845f56d WebCore::HTMLDocument::~HTMLDocument() + 81
5   WebCore                             0x384e9473 WebCore::JSNodeOwner::finalize(JSC::Handle<JSC::Unknown>, void*) + 79
6   JavaScriptCore                      0x321e2067 JSC::WeakBlock::sweep() + 87
7   JavaScriptCore                      0x321e22ad JSC::WeakSet::sweep() + 53
8   JavaScriptCore                      0x3213d877 JSC::Heap::collect(JSC::Heap::SweepToggle) + 175
9   JavaScriptCore                      0x3213cad9 JSC::DefaultGCActivityCallbackPlatformData::timerDidFire(__CFRunLoopTimer*, void*) + 145
10  CoreFoundation                      0x363ec5df __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 15
11  CoreFoundation                      0x363ec291 __CFRunLoopDoTimer + 273
12  CoreFoundation                      0x363eaf01 __CFRunLoopRun + 1233
13  CoreFoundation                      0x3635debd CFRunLoopRunSpecific + 357
14  CoreFoundation                      0x3635dd49 CFRunLoopRunInMode + 105
15  GraphicsServices                    0x3490e2eb GSEventRunModal + 75
16  UIKit                               0x37b2b2f9 UIApplicationMain + 1121
17  MyApp                               0x00003927 main (main.m:20)

Thread 5:
0   libsystem_kernel.dylib              0x3681feb4 mach_msg_trap + 20
1   CoreFoundation                      0x363ec045 __CFRunLoopServiceMachPort + 129
2   CoreFoundation                      0x363eada3 __CFRunLoopRun + 883
3   CoreFoundation                      0x3635debd CFRunLoopRunSpecific + 357
4   CoreFoundation                      0x3635dd49 CFRunLoopRunInMode + 105
5   Foundation                          0x307f978f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 255
6   Foundation                          0x3089d05d -[NSRunLoop(NSRunLoop) run] + 81
7   MyApp                               0x000c3225 +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:157)
8   Foundation                          0x308a667d __NSThread__main__ + 973
9   libsystem_c.dylib                   0x33ab5311 _pthread_start + 309

Thread 6:
0   libsystem_kernel.dylib              0x3681feb4 mach_msg_trap + 20
1   CoreFoundation                      0x363ec045 __CFRunLoopServiceMachPort + 129
2   CoreFoundation                      0x363eada3 __CFRunLoopRun + 883
3   CoreFoundation                      0x3635debd CFRunLoopRunSpecific + 357
4   CoreFoundation                      0x3635dd49 CFRunLoopRunInMode + 105
5   Foundation                          0x30822bcd +[NSURLConnection(Loader) _resourceLoadLoop:] + 309
6   Foundation                          0x308a667d __NSThread__main__ + 973
7   libsystem_c.dylib                   0x33ab5311 _pthread_start + 309

Thread 7:
0   libsystem_kernel.dylib              0x368300fc __psynch_mutexwait + 24
1   CFNetwork                           0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2   CFNetwork                           0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3   CFNetwork                           0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4   CFNetwork                           0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5   CFNetwork                           0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6   CFNetwork                           0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7   CFNetwork                           0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8   CFNetwork                           0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 8:
0   libsystem_kernel.dylib              0x368300fc __psynch_mutexwait + 24
1   CFNetwork                           0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2   CFNetwork                           0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3   CFNetwork                           0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4   CFNetwork                           0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5   CFNetwork                           0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6   CFNetwork                           0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7   CFNetwork                           0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8   CFNetwork                           0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 10:
0   libsystem_kernel.dylib              0x368300fc __psynch_mutexwait + 24
1   CFNetwork                           0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2   CFNetwork                           0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3   CFNetwork                           0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4   CFNetwork                           0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5   CFNetwork                           0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6   CFNetwork                           0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7   CFNetwork                           0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8   CFNetwork                           0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 13:
0   libsystem_kernel.dylib              0x3682239c pread + 20
1   libsqlite3.dylib                    0x33978109 sqlite3_get_table + 125
2   libsqlite3.dylib                    0x339772a7 sqlite3_get_table + 125
3   libsqlite3.dylib                    0x33d25fb1 0x33cde000 + 294833
4   libsqlite3.dylib                    0x33d13807 0x33cde000 + 219143
5   libsqlite3.dylib                    0x33d0d49d 0x33cde000 + 193693
6   libsqlite3.dylib                    0x3398648f sqlite3_step + 2143
7   CFNetwork                           0x3138276b __CFURLCache::DoBulkLookupAndStoreBasedOnTime(__CFString const*) + 459
8   CFNetwork                           0x313c4667 __ExecuteSQLSelectAndCreateResponse_block_invoke_0 + 35
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 17:
0   libsystem_kernel.dylib              0x3683008c __psynch_cvwait + 24
1   libsystem_c.dylib                   0x33aadaa5 pthread_cond_timedwait + 45
2   JavaScriptCore                      0x320d6c75 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 109
3   JavaScriptCore                      0x321e8557 JSC::BlockAllocator::blockFreeingThreadMain() + 83
4   JavaScriptCore                      0x321fafab _ZN3WTFL19wtfThreadEntryPointEPv + 15
5   libsystem_c.dylib                   0x33ab5311 _pthread_start + 309

Thread 18:
0   libsystem_kernel.dylib              0x3683008c __psynch_cvwait + 24
1   libsystem_c.dylib                   0x33ab7f19 pthread_cond_wait + 41
2   JavaScriptCore                      0x3217bf41 JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode) + 149
3   JavaScriptCore                      0x3217be81 JSC::MarkStackThreadSharedData::markingThreadMain() + 145
4   JavaScriptCore                      0x321fafab _ZN3WTFL19wtfThreadEntryPointEPv + 15
5   libsystem_c.dylib                   0x33ab5311 _pthread_start + 309

Thread 22:
0   libsystem_kernel.dylib              0x368300fc __psynch_mutexwait + 24
1   CFNetwork                           0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2   CFNetwork                           0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3   CFNetwork                           0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4   CFNetwork                           0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5   CFNetwork                           0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6   CFNetwork                           0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7   CFNetwork                           0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8   CFNetwork                           0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 25:
0   libsystem_kernel.dylib              0x368300fc __psynch_mutexwait + 24
1   CFNetwork                           0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2   CFNetwork                           0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3   CFNetwork                           0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4   CFNetwork                           0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5   CFNetwork                           0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6   CFNetwork                           0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7   CFNetwork                           0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8   CFNetwork                           0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 43:
0   libsystem_kernel.dylib              0x3682239c pread + 20
1   libsqlite3.dylib                    0x33978109 sqlite3_get_table + 125
2   libsqlite3.dylib                    0x339772a7 sqlite3_get_table + 125
3   libsqlite3.dylib                    0x33d25fb1 0x33cde000 + 294833
4   libsqlite3.dylib                    0x33d13807 0x33cde000 + 219143
5   libsqlite3.dylib                    0x33d0d49d 0x33cde000 + 193693
6   libsqlite3.dylib                    0x3398648f sqlite3_step + 2143
7   CFNetwork                           0x3138276b __CFURLCache::DoBulkLookupAndStoreBasedOnTime(__CFString const*) + 459
8   CFNetwork                           0x313c4667 __ExecuteSQLSelectAndCreateResponse_block_invoke_0 + 35
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 44:
0   libsystem_kernel.dylib              0x368300fc __psynch_mutexwait + 24
1   CFNetwork                           0x31382619 __CFURLCache::DoBulkLookupAndStoreBasedOnTime(__CFString const*) + 121
2   CFNetwork                           0x313c4667 __ExecuteSQLSelectAndCreateResponse_block_invoke_0 + 35
3   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
4   libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
5   libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
6   libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 47:
0   libsystem_kernel.dylib              0x368300fc __psynch_mutexwait + 24
1   CFNetwork                           0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2   CFNetwork                           0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3   CFNetwork                           0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4   CFNetwork                           0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5   CFNetwork                           0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6   CFNetwork                           0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7   CFNetwork                           0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8   CFNetwork                           0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 49:
0   libsystem_kernel.dylib              0x368300fc __psynch_mutexwait + 24
1   CFNetwork                           0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2   CFNetwork                           0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3   CFNetwork                           0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4   CFNetwork                           0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5   CFNetwork                           0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6   CFNetwork                           0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7   CFNetwork                           0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8   CFNetwork                           0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 50:
0   libsystem_kernel.dylib              0x368300fc __psynch_mutexwait + 24
1   CFNetwork                           0x3137647f __CFURLCache::ExecuteSQLSelectAndCreateResponse(__CFString const*, bool) + 179
2   CFNetwork                           0x313763b1 __CFURLCache::LookupCachedURLResponse(__CFURLCacheNode*, bool) + 13
3   CFNetwork                           0x31387893 __CFURLCache::CopyResponseForRequest(_CFURLRequest const*, bool) + 231
4   CFNetwork                           0x313c2ee1 __CFURLCacheCopyResponseForRequestInternal(_CFURLCache const*, _CFURLRequest const*, unsigned char) + 33
5   CFNetwork                           0x313fe8bd ___loaderEvent_StartLoad_block_invoke_0 + 45
6   CFNetwork                           0x3141e657 ConnectionSession::withStorageSession(void ( block_pointer)(StorageSession const*)) const + 83
7   CFNetwork                           0x313ff9d5 __withStorageSessionAsync_block_invoke_0 + 17
8   CFNetwork                           0x313d3639 __withConnectionSessionAsync_block_invoke_0 + 17
9   libdispatch.dylib                   0x3807711f _dispatch_call_block_and_release + 11
10  libdispatch.dylib                   0x3807b961 _dispatch_root_queue_drain + 253
11  libdispatch.dylib                   0x3807bac1 _dispatch_worker_thread2 + 85
12  libsystem_c.dylib                   0x33aaaa11 _pthread_wqthread + 361

Thread 51:
0   libsystem_kernel.dylib              0x36830d98 __workq_kernreturn + 8
1   libsystem_c.dylib                   0x33aaaa16 _pthread_wqthread + 366

Thread 0 crashed with ARM Thread State:
    r0: 0x00000000     r1: 0x5df80157     r2: 0x1ddd4000     r3: 0x38596026 
    r4: 0x3be2c86c     r5: 0x00000000     r6: 0x00000000     r7: 0x2fd1be1c 
    r8: 0x00000000     r9: 0x00293498    r10: 0x00388800    r11: 0x04432d90 
    ip: 0x3bd68a50     sp: 0x2fd1bde8     lr: 0x368ba395     pc: 0x3abd62be 
  cpsr: 0x60000030 

I´m basically using an AFJSONRequestOperation in a UIViewController, which has been pushed onto a NavigationController to fetch a JSON it display its contents. 我基本上在UIViewController中使用AFJSONRequestOperation,它已被推送到NavigationController上以获取显示其内容的JSON。 Is it AFNetworking that´s causing the crash (in Thread 5)? 是AFNetworking导致崩溃(在线程5中)? Or could it be a flaw in my code? 或者它可能是我的代码中的缺陷? I´m really stuck and it happens quite often. 我真的被卡住了,而且经常发生。 Any help or questions very much appreciated! 任何帮助或问题非常感谢!

Its not a problem with Thread 5 according to the crash; 根据崩溃,螺纹5不是问题; it is a problem in Thread 0. 这是线程0中的问题。

Brian in his blog posting adds some background information on how the timer operates in webkit. Brian在他的博客文章中添加了一些关于计时器如何在webkit中运行的背景信息。

http://brrian.tumblr.com/post/13951629341/how-webkits-event-model-works http://brrian.tumblr.com/post/13951629341/how-webkits-event-model-works

Its interesting that the problem OS is 6.0.1, not the newer version 6.1, nor 7.x (as of the time of writing). 有趣的是,问题OS是6.0.1,而不是更新的版本6.1,也不是7.x(截至撰写本文时)。

The crash happens during a CFRelease, and this tends to happen when a resource has already been released is released. 崩溃发生在CFRelease期间,并且当资源已经释放时,这种情况往往会发生。 My suggestion is to see if the problem happens on any newer OS as it sounds like a WebKit bug. 我的建议是看看问题是否发生在任何较新的操作系统上,因为它听起来像一个WebKit错误。 Webkit is the code responsible for the timer. Webkit是负责计时器的代码。

The timer code has been re-worked anyhow: https://trac.webkit.org/changeset/143210 无论如何,计时器代码已经重新编写: https//trac.webkit.org/changeset/143210

So I think the best option is to look to see if the newest iOS ever has this crash, or the newest 6.x (6.1). 因此,我认为最好的选择是查看最新的iOS是否有此崩溃,或最新的6.x(6.1)。

Failing this, and assuming you cannot reproduce the problem, since you have networking queries (and DB queries) going on, the classic way timers come into the picture is when you have slow/unreliable network connection. 如果失败了,并且假设您无法重现问题,那么由于您正在进行网络查询(和数据库查询),定时器进入图片的经典方式是当您有慢速/不可靠的网络连接时。 Use Apple's Network Link Conditioner to simulate such conditions. 使用Apple的网络链接调节器来模拟此类情况。 This might show up the problem in WebKit. 这可能会在WebKit中显示问题。

Check if some ad opened the iTunes. 检查某个广告是否打开了iTunes。 Maybe you are opening too many threads in the initialization of your application. 也许你在应用程序的初始化中打开了太多的线程。 You can try to enqueue these requests. 您可以尝试将这些请求排入队列。 Just random thoughts.. 只是随机的想法..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM