使用Facebook SDK的iPhone应用程序崩溃,“有超出允许时间的活动断言”错误

时间:2012-07-06 19:04:21

标签: ios facebook crash

我有一个使用当前Facebook iOS SDK的iPhone(iOS原生)应用。当尝试通过单点登录过程连接我的应用程序时,我经常发生崩溃,说明我的应用程序“在超过允许的时间内有活动断言”。在Stack Overflow(例如iPhone app "has active assertions beyond permitted time")上查看其他类似报告后,我找不到任何符合我情况的内容。我正在遵循Facebook推荐的集成SSO的做法(来自https://developers.facebook.com/docs/mobile/ios/build/#implementsso)。这意味着我在主线程上调用Facebook SDK。 Facebook似乎并不认为这会成为一个问题。

任何人都可以解释这个特殊错误的含义吗?我假设一些iOS管理程序机制正在杀死我的应用程序,因为它花了太长时间做某事,但具体是什么?是因为前台任务被锁定的时间太长了吗?或者是什么?

这是一个显示错误的iOS应用崩溃报告。

Incident Identifier: F2486727-9EAC-4D7F-8A45-07AC51ADD186
CrashReporter Key:   b3825455d63e6e7f659074b5ea5fb89cf8ed1b9f
Hardware Model:      iPhone2,1
Process:         JouleBug [2060]
Path:            /var/mobile/Applications/FA3DB4BA-92AF-4D14-AD3A-1553EFA1FA16/JouleBug.app/JouleBug
Identifier:      JouleBug
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2012-07-05 14:44:30.751 -0400
OS Version:      iPhone OS 5.1.1 (9B206)
Report Version:  104

Exception Type:  00000020
Exception Codes: 0x8badf00d
Highlighted Thread:  3

Application Specific Information:
JouleBug[2060] has active assertions beyond permitted time: 
{(
    <SBProcessAssertion: 0xe2ed000> identifier: Suspending process: JouleBug[2060] permittedBackgroundDuration: 10.000000 reason: suspend owner pid:52 preventSuspend  preventThrottleDownCPU  preventThrottleDownUI 
)}

Elapsed total CPU time (seconds): 6.190 (user 6.190, system 0.000), 84% CPU 
Elapsed application CPU time (seconds): 1.515, 21% CPU

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib            0x37e23dcc __open + 8
1   Foundation                        0x31ab412a _NSmkstemp83 + 322
2   Foundation                        0x31ab3f4a _NSCreateTemporaryFile + 118
3   Foundation                        0x31ab3b36 _NSWriteBytesToFileWithExtendedAttributes + 186
4   Foundation                        0x31ab3a70 _NSWriteBytesToFile + 24
5   Foundation                        0x31ab3a48 -[NSData(NSData) writeToFile:atomically:] + 76
6   JouleBug                          0x00109c5c -[LazyJSONModelMapper save] (LazyJSONModelMapper.m:106)
7   JouleBug                          0x00109b40 __36-[LazyJSONModelMapper initWithFile:]_block_invoke_0 (LazyJSONModelMapper.m:63)
8   Foundation                        0x31a856c2 -[__NSObserver _doit:] + 286
9   Foundation                        0x31b1152a __67-[NSNotificationCenter addObserverForName:object:queue:usingBlock:]_block_invoke_0 + 22
10  CoreFoundation                    0x311d6540 ___CFXNotificationPost_block_invoke_0 + 64
11  CoreFoundation                    0x31162090 _CFXNotificationPost + 1400
12  Foundation                        0x31a853e4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60
13  UIKit                             0x3090524e -[UIApplication _handleApplicationSuspend:eventInfo:] + 786
14  UIKit                             0x30895ef8 -[UIApplication handleEvent:withNewEvent:] + 2088
15  UIKit                             0x30895560 -[UIApplication sendEvent:] + 48
16  UIKit                             0x30894f34 _UIApplicationHandleEvent + 5820
17  GraphicsServices                  0x331db224 PurpleEventCallback + 876
18  CoreFoundation                    0x311deacc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
19  CoreFoundation                    0x311de32e __CFRunLoopDoSources0 + 358
20  CoreFoundation                    0x311dd03e __CFRunLoopRun + 646
21  CoreFoundation                    0x3116049e CFRunLoopRunSpecific + 294
22  CoreFoundation                    0x31160366 CFRunLoopRunInMode + 98
23  GraphicsServices                  0x331da432 GSEventRunModal + 130
24  UIKit                             0x308c3cce UIApplicationMain + 1074
25  JouleBug                          0x00033ac6 main (main.m:14)
26  JouleBug                          0x00003900 0x1000 + 10496

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib            0x37e143a8 kevent + 24
1   libdispatch.dylib                 0x35a2eea4 _dispatch_mgr_invoke + 708
2   libdispatch.dylib                 0x35a2ebc2 _dispatch_mgr_thread + 30

Thread 2:
0   libsystem_kernel.dylib            0x37e24cd4 __workq_kernreturn + 8
1   libsystem_c.dylib                 0x352aaf36 _pthread_wqthread + 610
2   libsystem_c.dylib                 0x352aacc8 start_wqthread + 0

Thread 3 name:  WebThread
Thread 3:
0   libsystem_kernel.dylib            0x37e240d8 __psynch_mutexwait + 24
1   libsystem_c.dylib                 0x352a4674 pthread_mutex_lock + 376
2   WebCore                           0x362614e8 _ZL17_WebTryThreadLockb + 208
3   WebCore                           0x362c016c _ZL19SendDelegateMessageP12NSInvocation + 700
4   WebKit                            0x36bfad80 -[_WebSafeForwarder forwardInvocation:] + 112
5   CoreFoundation                    0x3120ca7c ___forwarding___ + 660
6   CoreFoundation                    0x31167648 _CF_forwarding_prep_0 + 40
7   WebCore                           0x3631bf7c WebCore::FrameLoader::finishedParsing() + 56
8   WebCore                           0x3631bf12 WebCore::Document::finishedParsing() + 186
9   WebCore                           0x3631be50 WebCore::HTMLTreeBuilder::finished() + 16
10  WebCore                           0x3630cfbe WebCore::HTMLDocumentParser::prepareToStopParsing() + 106
11  WebCore                           0x3630cc9e WebCore::HTMLDocumentParser::finish() + 90
12  WebCore                           0x3630cc3a WebCore::Document::finishParsing() + 14
13  WebCore                           0x36309e62 WebCore::DocumentWriter::endIfNotLoadingMainResource() + 74
14  WebCore                           0x363084fa WebCore::DocumentLoader::finishedLoading() + 74
15  WebCore                           0x363559c8 WebCore::FrameLoader::finishedLoading() + 48
16  WebCore                           0x36355938 WebCore::MainResourceLoader::didFinishLoading(double) + 88
17  WebCore                           0x363558c2 _ZN7WebCoreL16didFinishLoadingEP16_CFURLConnectionPKv + 46
18  CFNetwork                         0x349997ee URLConnectionClient::_clientDidFinishLoading(URLConnectionClient::ClientConnectionEventQueue*) + 186
19  CFNetwork                         0x3498e49e URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 418
20  CFNetwork                         0x3498e592 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 662
21  CFNetwork                         0x3498e19c URLConnectionClient::processEvents() + 100
22  CFNetwork                         0x3498e0d2 MultiplexerSource::perform() + 150
23  CoreFoundation                    0x311deacc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
24  CoreFoundation                    0x311de32e __CFRunLoopDoSources0 + 358
25  CoreFoundation                    0x311dd03e __CFRunLoopRun + 646
26  CoreFoundation                    0x3116049e CFRunLoopRunSpecific + 294
27  CoreFoundation                    0x31160366 CFRunLoopRunInMode + 98
28  WebCore                           0x36304c9c _ZL12RunWebThreadPv + 396
29  libsystem_c.dylib                 0x352b072e _pthread_start + 314
30  libsystem_c.dylib                 0x352b05e8 thread_start + 0

Thread 4:
0   libsystem_kernel.dylib            0x37e14004 mach_msg_trap + 20
1   libsystem_kernel.dylib            0x37e141fa mach_msg + 50
2   CoreFoundation                    0x311de3ec __CFRunLoopServiceMachPort + 120
3   CoreFoundation                    0x311dd124 __CFRunLoopRun + 876
4   CoreFoundation                    0x3116049e CFRunLoopRunSpecific + 294
5   CoreFoundation                    0x311dd444 CFRunLoopRun + 92
6   JouleBug                          0x00071800 +[ASIHTTPRequest runRequests] (ASIHTTPRequest.m:4772)
7   Foundation                        0x31a92a7a -[NSThread main] + 66
8   Foundation                        0x31b2658a __NSThread__main__ + 1042
9   libsystem_c.dylib                 0x352b072e _pthread_start + 314
10  libsystem_c.dylib                 0x352b05e8 thread_start + 0

Thread 5 name:  com.apple.NSURLConnectionLoader
Thread 5:
0   libsystem_kernel.dylib            0x37e14004 mach_msg_trap + 20
1   libsystem_kernel.dylib            0x37e141fa mach_msg + 50
2   CoreFoundation                    0x311de3ec __CFRunLoopServiceMachPort + 120
3   CoreFoundation                    0x311dd124 __CFRunLoopRun + 876
4   CoreFoundation                    0x3116049e CFRunLoopRunSpecific + 294
5   CoreFoundation                    0x31160366 CFRunLoopRunInMode + 98
6   Foundation                        0x31a92bb2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7   Foundation                        0x31a92a7a -[NSThread main] + 66
8   Foundation                        0x31b2658a __NSThread__main__ + 1042
9   libsystem_c.dylib                 0x352b072e _pthread_start + 314
10  libsystem_c.dylib                 0x352b05e8 thread_start + 0

Thread 6 name:  com.apple.CFSocket.private
Thread 6:
0   libsystem_kernel.dylib            0x37e24570 __select + 20
1   CoreFoundation                    0x311e263a __CFSocketManager + 726
2   libsystem_c.dylib                 0x352b072e _pthread_start + 314
3   libsystem_c.dylib                 0x352b05e8 thread_start + 0

Thread 7:
0   libsystem_kernel.dylib            0x37e14004 mach_msg_trap + 20
1   libsystem_kernel.dylib            0x37e141fa mach_msg + 50
2   CoreFoundation                    0x311de3ec __CFRunLoopServiceMachPort + 120
3   CoreFoundation                    0x311dd124 __CFRunLoopRun + 876
4   CoreFoundation                    0x3116049e CFRunLoopRunSpecific + 294
5   CoreFoundation                    0x31160366 CFRunLoopRunInMode + 98
6   Foundation                        0x31a86b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7   Foundation                        0x31aa051c -[NSRunLoop(NSRunLoop) run] + 72
8   JouleBug                          0x0014e516 0x1000 + 1365270
9   Foundation                        0x31a92a7a -[NSThread main] + 66
10  Foundation                        0x31b2658a __NSThread__main__ + 1042
11  libsystem_c.dylib                 0x352b072e _pthread_start + 314
12  libsystem_c.dylib                 0x352b05e8 thread_start + 0

Thread 8 name:  Dispatch queue: com.apple.root.default-priority
Thread 8:
0   libsystem_kernel.dylib            0x37e2451c __rename + 8
1   libsystem_kernel.dylib            0x37e15b6e rename + 2
2   Foundation                        0x31ab3dac _NSWriteBytesToFileWithExtendedAttributes + 816
3   Foundation                        0x31ab3a70 _NSWriteBytesToFile + 24
4   Foundation                        0x31ab3a48 -[NSData(NSData) writeToFile:atomically:] + 76
5   JouleBug                          0x00109c5c -[LazyJSONModelMapper save] (LazyJSONModelMapper.m:106)
6   JouleBug                          0x00109a4e -[LazyJSONModelMapper initWithFile:] (LazyJSONModelMapper.m:85)
7   JouleBug                          0x001097c6 -[LazyJSONModelMapper initWithData:fromFile:] (LazyJSONModelMapper.m:45)
8   JouleBug                          0x00089e5c +[GameDataManager storePinFromPinDict:] (GameDataManager.m:238)
9   JouleBug                          0x000dd378 +[GameDataLoader processData:] (GameDataLoader.m:62)
10  JouleBug                          0x000ae300 +[DataLoader refreshDataSynchronously] (DataLoader.m:54)
11  JouleBug                          0x000ae29c __25+[DataLoader refreshData]_block_invoke_0 (DataLoader.m:36)
12  Foundation                        0x31acbe50 -[NSBlockOperation main] + 196
13  Foundation                        0x31aad38c -[__NSOperationInternal start] + 856
14  JouleBug                          0x000ccb06 -[TimedBlockOperation start] (NSOperationExtensions.m:96)
15  Foundation                        0x31b1678c __block_global_6 + 96
16  libdispatch.dylib                 0x35a22c52 _dispatch_call_block_and_release + 6
17  libdispatch.dylib                 0x35a2e7b4 _dispatch_worker_thread2 + 256
18  libsystem_c.dylib                 0x352aadf4 _pthread_wqthread + 288
19  libsystem_c.dylib                 0x352aacc8 start_wqthread + 0

Thread 9:
0   libsystem_kernel.dylib            0x37e24cd4 __workq_kernreturn + 8
1   libsystem_c.dylib                 0x352aaf36 _pthread_wqthread + 610
2   libsystem_c.dylib                 0x352aacc8 start_wqthread + 0

Thread 10:
0   libsystem_kernel.dylib            0x37e24cd4 __workq_kernreturn + 8
1   libsystem_c.dylib                 0x352aaf36 _pthread_wqthread + 610
2   libsystem_c.dylib                 0x352aacc8 start_wqthread + 0

Thread 11 name:  WebCore: CFNetwork Loader
Thread 11:
0   libsystem_kernel.dylib            0x37e14004 mach_msg_trap + 20
1   libsystem_kernel.dylib            0x37e141fa mach_msg + 50
2   CoreFoundation                    0x311de3ec __CFRunLoopServiceMachPort + 120
3   CoreFoundation                    0x311dd124 __CFRunLoopRun + 876
4   CoreFoundation                    0x3116049e CFRunLoopRunSpecific + 294
5   CoreFoundation                    0x31160366 CFRunLoopRunInMode + 98
6   WebCore                           0x3632e0d2 _ZN7WebCoreL15runLoaderThreadEPv + 122
7   libsystem_c.dylib                 0x352b072e _pthread_start + 314
8   libsystem_c.dylib                 0x352b05e8 thread_start + 0

Thread 12:
0   libsystem_kernel.dylib            0x37e24cd4 __workq_kernreturn + 8
1   libsystem_c.dylib                 0x352aaf36 _pthread_wqthread + 610
2   libsystem_c.dylib                 0x352aacc8 start_wqthread + 0

Unknown thread crashed with unknown flavor: 5, state_count: 1

1 个答案:

答案 0 :(得分:1)

我终于找到了这个。就像在Stack Overflow上报告的其他类似事件一样,这对于尝试在后台运行的计划操作来说也是一个问题。我的问题解决了。