0
我正在使用AFNetworking 1.3.3並遇到一個問題,我不確定如何調試。以下是堆棧跟蹤。到目前爲止,這個問題只能在單元測試期間重現,但是這可能指向一個會在其他「隨機」時間導致問題的設計問題,所以我想弄明白。AFNetworking addOperation被鎖定
下面是堆棧跟蹤,日誌中沒有輸出,應用程序只停留在那裏。在我看來,該應用程序是在死鎖,但我不明白爲什麼會這樣。
編輯:一個細節我錯過的是,執行指出的含義:
EXC_BAD_ACCESS(code = 1, address=xxxxxx)
任何指針理解,謝謝,奧利弗
Thread 1, Queue : com.apple.main-thread
#0 0x0409e0b2 in objc_msgSend()
#1 0x030316d4 in NSKeyValuePushPendingNotificationLocal()
#2 0x0302f79f in NSKeyValueWillChange()
#3 0x03005d1a in -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:]()
#4 0x0303560c in __addOperations()
#5 0x03034f0e in -[NSOperationQueue addOperation:]()
#6 0x0025cab7 in -[AFHTTPClient enqueueHTTPRequestOperation:] at /Users/olivier/Documents/elektra/src/elektra/third_party/AFNetworking-1.3.3/AFNetworking/AFHTTPClient.m:577
#7 0x00091598 in -[ELEDataObjectSync startConnectionWithPath:parameters:HTTPBody:HTTPMethod:] at /Users/olivier/Documents/elektra/src/elektra/elektra/data_sync/ELEDataObjectSync.m:215
#8 0x0020e762 in -[ELELoginRequest loginUser:withPassword:withCompletionBlock:] at /Users/olivier/Documents/elektra/src/elektra/elektra/data_sync/ELELoginRequest.m:34
#9 0x0023542d in -[ELEUserManager loginUser:withPassword:withCompletionBlock:] at /Users/olivier/Documents/elektra/src/elektra/elektra/user/ELEUserManager.m:74
#10 0x0be94179 in +[ELEUserManager(unitTestUtilities) signInUser:withPassword:] at /Users/olivier/Documents/elektra/src/elektra/elektra/user/ELEUserManager+unitTestUtilities.m:20
#11 0x0be9e5e5 in -[ELEUserAccountRequestTest setUp] at /Users/olivier/Documents/elektra/src/elektra/elektraTests/ELEUserAccountRequestTest.m:27
#12 0x20103266 in -[XCTestCase invokeTest]()
#13 0x2010338d in -[XCTestCase performTest:]()
#14 0x2010417c in -[XCTest run]()
#15 0x20102a44 in -[XCTestSuite performTest:]()
#16 0x2010417c in -[XCTest run]()
#17 0x20102a44 in -[XCTestSuite performTest:]()
#18 0x2010417c in -[XCTest run]()
#19 0x20102a44 in -[XCTestSuite performTest:]()
#20 0x2010417c in -[XCTest run]()
#21 0x20105aa1 in +[XCTestProbe runTests:]()
#22 0x0301612c in __NSFireDelayedPerform()
#23 0x042c9bd6 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__()
#24 0x042c95bd in __CFRunLoopDoTimer()
#25 0x042b1628 in __CFRunLoopRun()
#26 0x042b0ac3 in CFRunLoopRunSpecific()
#27 0x042b08db in CFRunLoopRunInMode()
#28 0x045659e2 in GSEventRunModal()
#29 0x04565809 in GSEventRun()
#30 0x0214dd3b in UIApplicationMain()
#31 0x0000628b in main at /Users/olivier/Documents/elektra/src/elektra/elektra/main.m:49
Thread 2, Queue : com.apple.libdispatch-manager
#0 0x04ac2992 in kevent64()
#1 0x046eaf3e in _dispatch_mgr_invoke()
#2 0x046eac7a in _dispatch_mgr_thread()
Thread 3, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 4, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 5, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 6, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 7, Queue : (null)
#0 0x04abcf7a in mach_msg_trap()
#1 0x04abc16c in mach_msg()
#2 0x042abe49 in __CFRunLoopServiceMachPort()
#3 0x042b13b1 in __CFRunLoopRun()
#4 0x042b0ac3 in CFRunLoopRunSpecific()
#5 0x042b08db in CFRunLoopRunInMode()
#6 0x0303c9c5 in -[NSRunLoop(NSRunLoop) runMode:beforeDate:]()
#7 0x02fd88d1 in -[NSRunLoop(NSRunLoop) run]()
#8 0x0036660b in +[TFURLConnectionOperation _runNetworkThread:]()
#9 0x03037597 in -[NSThread main]()
#10 0x030374f6 in __NSThread__main__()
#11 0x04a845fb in _pthread_body()
#12 0x04a84485 in _pthread_start()
Thread 8 com.apple.NSURLConnectionLoader, Queue : (null)
#0 0x04abcf7a in mach_msg_trap()
#1 0x04abc16c in mach_msg()
#2 0x042abe49 in __CFRunLoopServiceMachPort()
#3 0x042b13b1 in __CFRunLoopRun()
#4 0x042b0ac3 in CFRunLoopRunSpecific()
#5 0x042b08db in CFRunLoopRunInMode()
#6 0x02fdb9de in +[NSURLConnection(Loader) _resourceLoadLoop:]()
#7 0x03037597 in -[NSThread main]()
#8 0x030374f6 in __NSThread__main__()
#9 0x04a845fb in _pthread_body()
#10 0x04a84485 in _pthread_start()
Thread 9, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 10, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 11, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 12, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 13, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 14, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 15 AFNetworking, Queue : (null)
#0 0x04abcf7a in mach_msg_trap()
#1 0x04abc16c in mach_msg()
#2 0x042abe49 in __CFRunLoopServiceMachPort()
#3 0x042b13b1 in __CFRunLoopRun()
#4 0x042b0ac3 in CFRunLoopRunSpecific()
#5 0x042b08db in CFRunLoopRunInMode()
#6 0x0303c9c5 in -[NSRunLoop(NSRunLoop) runMode:beforeDate:]()
#7 0x02fd88d1 in -[NSRunLoop(NSRunLoop) run]()
#8 0x00087fbb in +[AFURLConnectionOperation networkRequestThreadEntryPoint:] at /Users/olivier/Documents/elektra/src/elektra/third_party/AFNetworking-1.3.3/AFNetworking/AFURLConnectionOperation.m:184
#9 0x03037597 in -[NSThread main]()
#10 0x030374f6 in __NSThread__main__()
#11 0x04a845fb in _pthread_body()
#12 0x04a84485 in _pthread_start()
Thread 16 com.apple.CFSocket.private, Queue : (null)
#0 0x04ac1ace in select$DARWIN_EXTSN()
#1 0x042ef3eb in __CFSocketManager()
#2 0x04a845fb in _pthread_body()
#3 0x04a84485 in _pthread_start()
Thread 17, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 18, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()
Thread 19, Queue : (null)
#0 0x04ac2046 in __workq_kernreturn()
#1 0x04a85dcf in _pthread_wqthread()