当我调用saveInBackgroundWithBlock时,Parse挂在__psynch__mutexwait上

时间:2015-06-09 19:04:42

标签: ios objective-c parse-platform

当我尝试运行此代码时,我在iOS 8.3模拟器(ipad air)中重复挂起...

    self->_adminConsole[kParseUserKeyFacebookID] = fbid;
    self->_adminConsole[kParseUserKeyFacebookName] = fbname;
    [self->_adminConsole addUniqueObject:[PFInstallation currentInstallation] forKey:kACParseInstallationArray];
    [self->_adminConsole saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error){

Backtrace(全部):



(lldb) thread backtrace all
* thread #1: tid = 0x3150c3, 0x000000011482d166 libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x000000011482d166 libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x000000011485c78a libsystem_pthread.dylib`_pthread_mutex_lock + 480
  * frame #2: 0x000000010f3977b3 Photobooth`__34+[PFObject resolveInstanceMethod:]_block_invoke(.block_descriptor=0x00007f8a33c7ee80, self=<unavailable>) + 61 at PFObject.m:2830
    frame #3: 0x000000010f3cbfb3 Photobooth`-[PFPointerOrLocalIdObjectEncoder encodeParseObject:](self=<unavailable>, _cmd=<unavailable>, object=0x00007f8a33f72b70) + 65 at PFEncoder.m:145
    frame #4: 0x000000010f3cb714 Photobooth`-[PFEncoder encodeObject:](self=<unavailable>, _cmd=<unavailable>, object=<unavailable>) + 113 at PFEncoder.m:35
    frame #5: 0x000000010f3cbbde Photobooth`-[PFEncoder encodeObject:](self=0x00007f8a33c740e0, _cmd=<unavailable>, object=<unavailable>) + 1339 at PFEncoder.m:86
    frame #6: 0x000000010f3ca738 Photobooth`-[PFJSONCacheItem initWithObject:](self=<unavailable>, _cmd=<unavailable>, object=<unavailable>) + 126 at PFInternalUtils.m:325
    frame #7: 0x000000010f3ca8b6 Photobooth`+[PFJSONCacheItem cacheFromObject:](self=<unavailable>, _cmd=<unavailable>, object=<unavailable>) + 69 at PFInternalUtils.m:337
    frame #8: 0x000000010f388c27 Photobooth`-[PFObject(self=0x00007f8a362077e0, _cmd=<unavailable>, object=<unavailable>, key=<unavailable>) checkForChangesToMutableContainer:forKey:] + 207 at PFObject.m:907
    frame #9: 0x000000010f388f1b Photobooth`__55-[PFObject(.block_descriptor=<unavailable>, key=<unavailable>, obj=<unavailable>, stop=<unavailable>) checkForChangesToMutableContainers]_block_invoke + 157 at PFObject.m:928
    frame #10: 0x0000000113b85cd5 CoreFoundation`__65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 85
    frame #11: 0x0000000113b85bec CoreFoundation`-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 236
    frame #12: 0x000000010f388dfe Photobooth`-[PFObject(self=0x00007f8a362077e0, _cmd=<unavailable>) checkForChangesToMutableContainers] + 240 at PFObject.m:925
    frame #13: 0x000000010f388586 Photobooth`-[PFObject(self=0x00007f8a362077e0, _cmd=<unavailable>, considerChildren=true) isDirty:] + 65 at PFObject.m:849
    frame #14: 0x000000010f38f9ba Photobooth`__31-[PFObject(.block_descriptor=0x00007f8a33d1d920, task=<unavailable>) saveAsync:]_block_invoke686 + 91 at PFObject.m:1867
    frame #15: 0x000000010f453700 Photobooth`__55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2(.block_descriptor=<unavailable>) + 112 at BFTask.m:334
    frame #16: 0x000000010f44f654 Photobooth`__29+[BFExecutor defaultExecutor]_block_invoke_2(.block_descriptor=0x000000010f83f820, block=0x00007fff5093de88) + 484 at BFExecutor.m:45
    frame #17: 0x000000010f44ffae Photobooth`-[BFExecutor execute:](self=0x00007f8a33c70ee0, _cmd=0x000000010f76f24b, block=0x00007fff5093de88) + 94 at BFExecutor.m:109
    frame #18: 0x000000010f453634 Photobooth`__55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke(.block_descriptor=0x00007f8a33d441a0) + 244 at BFTask.m:326
    frame #19: 0x000000010f45343b Photobooth`-[BFTask continueWithExecutor:block:cancellationToken:](self=0x00007f8a33d89c50, _cmd=0x000000010f76f2e4, executor=0x00007f8a33c70ee0, block=0x00007fff5093e0a8, cancellationToken=0x0000000000000000) + 731 at BFTask.m:377
    frame #20: 0x000000010f453f44 Photobooth`-[BFTask continueWithBlock:](self=0x00007f8a33d89c50, _cmd=0x000000010f75ec88, block=0x00007fff5093e0a8) + 132 at BFTask.m:384
    frame #21: 0x000000010f38f84b Photobooth`-[PFObject(self=<unavailable>, _cmd=<unavailable>, toAwait=<unavailable>) saveAsync:] + 372 at PFObject.m:1859
    frame #22: 0x000000010f3e53e2 Photobooth`-[PFTaskQueue enqueue:](self=0x00007f8a362087e0, _cmd=<unavailable>, taskStart=<unavailable>) + 188 at PFTaskQueue.m:37
    frame #23: 0x000000010f39222a Photobooth`-[PFObject saveInBackground](self=0x00007f8a362077e0, _cmd=<unavailable>) + 121 at PFObject.m:2285
    frame #24: 0x000000010f392430 Photobooth`-[PFObject saveInBackgroundWithBlock:](self=<unavailable>, _cmd=<unavailable>, block=<unavailable>) + 49 at PFObject.m:2297
    frame #25: 0x000000010f362afc Photobooth`-[AdminConsoleManager heartbeat:](self=0x00007f8a33d7dbe0, _cmd=0x000000010f75e76e, timer=0x0000000000000000) + 396 at AdminConsoleManager.m:213
    frame #26: 0x000000010f36260a Photobooth`-[AdminConsoleManager startHeartbeatTimer](self=0x00007f8a33d7dbe0, _cmd=0x000000010f75e6d9) + 58 at AdminConsoleManager.m:195
    frame #27: 0x000000010f361d0f Photobooth`__52-[AdminConsoleManager createOrRetrieveAdminConsole:]_block_invoke_2(.block_descriptor=0x00007f8a36424480, succeeded=true, error=0x0000000000000000) + 239 at AdminConsoleManager.m:127
    frame #28: 0x000000010f3cb3b4 Photobooth`__62-[BFTask(.block_descriptor=<unavailable>, blockResult=<unavailable>, blockError=<unavailable>) thenCallBackOnMainThreadWithBoolValueAsync:]_block_invoke + 98 at BFTask+Private.m:98
    frame #29: 0x000000010f3caf80 Photobooth`__72-[BFTask(.block_descriptor=<unavailable>, task=<unavailable>) continueWithMainThreadResultBlock:executeIfCancelled:]_block_invoke + 505 at BFTask+Private.m:72
    frame #30: 0x000000010f453700 Photobooth`__55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2(.block_descriptor=<unavailable>) + 112 at BFTask.m:334
    frame #31: 0x00000001144d2186 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #32: 0x00000001144f1614 libdispatch.dylib`_dispatch_client_callout + 8
    frame #33: 0x00000001144d9a1c libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1664
    frame #34: 0x0000000113b791f9 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    frame #35: 0x0000000113b3adcb CoreFoundation`__CFRunLoopRun + 2043
    frame #36: 0x0000000113b3a366 CoreFoundation`CFRunLoopRunSpecific + 470
    frame #37: 0x0000000115833a3e GraphicsServices`GSEventRunModal + 161
    frame #38: 0x000000011217e900 UIKit`UIApplicationMain + 1282
    frame #39: 0x000000010f34d2d2 Photobooth`main(argc=1, argv=0x00007fff5093f538) + 130 at main.m:15
    frame #40: 0x0000000114525145 libdyld.dylib`start + 1
    frame #41: 0x0000000114525145 libdyld.dylib`start + 1

  thread #2: tid = 0x3150e3, 0x000000011482e232 libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x000000011482e232 libsystem_kernel.dylib`kevent64 + 10
    frame #1: 0x00000001144e076c libdispatch.dylib`_dispatch_mgr_invoke + 247
    frame #2: 0x00000001144e0511 libdispatch.dylib`_dispatch_mgr_thread + 54

  thread #9: tid = 0x31510b, 0x00000001148284de libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x00000001148284de libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x000000011482764f libsystem_kernel.dylib`mach_msg + 55
    frame #2: 0x0000000113b3b624 CoreFoundation`__CFRunLoopServiceMachPort + 212
    frame #3: 0x0000000113b3aad7 CoreFoundation`__CFRunLoopRun + 1287
    frame #4: 0x0000000113b3a366 CoreFoundation`CFRunLoopRunSpecific + 470
    frame #5: 0x0000000110a5c24d CFNetwork`+[NSURLConnection(Loader) _resourceLoadLoop:] + 434
    frame #6: 0x00000001117b709d Foundation`__NSThread__main__ + 1194
    frame #7: 0x000000011485e268 libsystem_pthread.dylib`_pthread_body + 131
    frame #8: 0x000000011485e1e5 libsystem_pthread.dylib`_pthread_start + 176
    frame #9: 0x000000011485c41d libsystem_pthread.dylib`thread_start + 13

  thread #15: tid = 0x315142, 0x00000001148284de libsystem_kernel.dylib`mach_msg_trap + 10
    frame #0: 0x00000001148284de libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x000000011482764f libsystem_kernel.dylib`mach_msg + 55
    frame #2: 0x0000000113b3b624 CoreFoundation`__CFRunLoopServiceMachPort + 212
    frame #3: 0x0000000113b3aad7 CoreFoundation`__CFRunLoopRun + 1287
    frame #4: 0x0000000113b3a366 CoreFoundation`CFRunLoopRunSpecific + 470
    frame #5: 0x00000001117b8f92 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 275
    frame #6: 0x0000000111844080 Foundation`-[NSRunLoop(NSRunLoop) run] + 74
    frame #7: 0x000000010f4cfeb5 Photobooth`+[HTTPServer bonjourThread](self=0x000000010f947f08, _cmd=0x000000010f77354b) + 213 at HTTPServer.m:758
    frame #8: 0x00000001117b709d Foundation`__NSThread__main__ + 1194
    frame #9: 0x000000011485e268 libsystem_pthread.dylib`_pthread_body + 131
    frame #10: 0x000000011485e1e5 libsystem_pthread.dylib`_pthread_start + 176
    frame #11: 0x000000011485c41d libsystem_pthread.dylib`thread_start + 13

  thread #16: tid = 0x315143, 0x000000011482d3fa libsystem_kernel.dylib`__select + 10, name = 'com.apple.CFSocket.private'
    frame #0: 0x000000011482d3fa libsystem_kernel.dylib`__select + 10
    frame #1: 0x0000000113b809ba CoreFoundation`__CFSocketManager + 730
    frame #2: 0x000000011485e268 libsystem_pthread.dylib`_pthread_body + 131
    frame #3: 0x000000011485e1e5 libsystem_pthread.dylib`_pthread_start + 176
    frame #4: 0x000000011485c41d libsystem_pthread.dylib`thread_start + 13

  thread #18: tid = 0x31561d, 0x000000011482d166 libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = 'com.apple.root.default-qos'
    frame #0: 0x000000011482d166 libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x000000011485c78a libsystem_pthread.dylib`_pthread_mutex_lock + 480
    frame #2: 0x000000010f3977b3 Photobooth`__34+[PFObject resolveInstanceMethod:]_block_invoke(.block_descriptor=0x00007f8a33c7ee80, self=<unavailable>) + 61 at PFObject.m:2830
    frame #3: 0x000000010f3cbfb3 Photobooth`-[PFPointerOrLocalIdObjectEncoder encodeParseObject:](self=<unavailable>, _cmd=<unavailable>, object=0x00007f8a362077e0) + 65 at PFEncoder.m:145
    frame #4: 0x000000010f3cb714 Photobooth`-[PFEncoder encodeObject:](self=<unavailable>, _cmd=<unavailable>, object=<unavailable>) + 113 at PFEncoder.m:35
    frame #5: 0x000000010f3cb960 Photobooth`-[PFEncoder encodeObject:](self=<unavailable>, _cmd=<unavailable>, object=<unavailable>) + 701 at PFEncoder.m:70
    frame #6: 0x000000010f3cbdbe Photobooth`__26-[PFEncoder encodeObject:]_block_invoke(.block_descriptor=0x000000011f980500, key=<unavailable>, obj=<unavailable>, stop=<unavailable>) + 60 at PFEncoder.m:93
    frame #7: 0x0000000113b51656 CoreFoundation`__65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 102
    frame #8: 0x0000000113b5155c CoreFoundation`-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204
    frame #9: 0x000000010f3cbd42 Photobooth`-[PFEncoder encodeObject:](self=0x00007f8a33c740e0, _cmd=<unavailable>, object=<unavailable>) + 1695 at PFEncoder.m:92
    frame #10: 0x000000010f38c76b Photobooth`-[PFObject(self=<unavailable>, _cmd=<unavailable>, changes=<unavailable>, encoder=<unavailable>) _convertToDictionaryForSaving:withObjectEncoder:] + 220 at PFObject.m:1475
    frame #11: 0x000000010f390709 Photobooth`-[PFObject(self=0x00007f8a33f72b70, _cmd=<unavailable>, changes=<unavailable>, sessionToken=<unavailable>, encoder=<unavailable>) _constructSaveCommandForChanges:sessionToken:objectEncoder:] + 116 at PFObject.m:1947
    frame #12: 0x000000010f38bef8 Photobooth`__56-[PFObject(.block_descriptor=0x00007f8a3643f610, task=<unavailable>) _enqueueSaveEventuallyWithChildren:]_block_invoke_3 + 225 at PFObject.m:1412
    frame #13: 0x000000010f454374 Photobooth`__62-[BFTask continueWithExecutor:successBlock:cancellationToken:]_block_invoke(.block_descriptor=0x00007f8a33ca3fa0, task=0x00007f8a36425690) + 164 at BFTask.m:408
    frame #14: 0x000000010f453700 Photobooth`__55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2(.block_descriptor=<unavailable>) + 112 at BFTask.m:334
    frame #15: 0x000000010f44f654 Photobooth`__29+[BFExecutor defaultExecutor]_block_invoke_2(.block_descriptor=0x000000010f83f820, block=0x000000011f980a48) + 484 at BFExecutor.m:45
    frame #16: 0x000000010f44ffae Photobooth`-[BFExecutor execute:](self=0x00007f8a33c70ee0, _cmd=0x000000010f76f24b, block=0x000000011f980a48) + 94 at BFExecutor.m:109
    frame #17: 0x000000010f453634 Photobooth`__55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke(.block_descriptor=0x00007f8a36424800) + 244 at BFTask.m:326
    frame #18: 0x000000010f45343b Photobooth`-[BFTask continueWithExecutor:block:cancellationToken:](self=0x00007f8a36425690, _cmd=0x000000010f76f2e4, executor=0x00007f8a33c70ee0, block=0x000000011f980c20, cancellationToken=0x0000000000000000) + 731 at BFTask.m:377
    frame #19: 0x000000010f454259 Photobooth`-[BFTask continueWithExecutor:successBlock:cancellationToken:](self=0x00007f8a36425690, _cmd=0x000000010f76f337, executor=0x00007f8a33c70ee0, block=0x000000011f980d00, cancellationToken=0x0000000000000000) + 313 at BFTask.m:404
    frame #20: 0x000000010f4544a4 Photobooth`-[BFTask continueWithSuccessBlock:](self=0x00007f8a36425690, _cmd=0x000000010f75f6f3, block=0x000000011f980d00) + 132 at BFTask.m:414
    frame #21: 0x000000010f38bdbb Photobooth`__56-[PFObject(.block_descriptor=0x00007f8a33e41680, task=<unavailable>) _enqueueSaveEventuallyWithChildren:]_block_invoke_2 + 384 at PFObject.m:1404
    frame #22: 0x000000010f453700 Photobooth`__55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2(.block_descriptor=<unavailable>) + 112 at BFTask.m:334
    frame #23: 0x00000001144d2186 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #24: 0x00000001144f1614 libdispatch.dylib`_dispatch_client_callout + 8
    frame #25: 0x00000001144db552 libdispatch.dylib`_dispatch_root_queue_drain + 1768
    frame #26: 0x00000001144dcb17 libdispatch.dylib`_dispatch_worker_thread3 + 111
    frame #27: 0x000000011485e637 libsystem_pthread.dylib`_pthread_wqthread + 729
    frame #28: 0x000000011485c40d libsystem_pthread.dylib`start_wqthread + 13

  thread #26: tid = 0x3156a3, 0x000000011482d94a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x000000011482d94a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x000000011485e6c3 libsystem_pthread.dylib`_pthread_wqthread + 869
    frame #2: 0x000000011485c40d libsystem_pthread.dylib`start_wqthread + 13
(lldb) 
&#13;
&#13;
&#13;

任何人都可以解释为什么会发生这种情况吗?

我尝试了很多不同的事情,我不明白为什么会这样。

谢谢!

0 个答案:

没有答案