I had this crash occurs while testing the map using Xcode 4.3.2; targeting iOS 5.1, below is the backtrace :
(lldb) bt all
* thread #1: tid = 0x1f03, 0x026edcaa libobjc.A.dylib`objc_exception_throw, stop reason = breakpoint 1.3
frame #0: 0x026edcaa libobjc.A.dylib`objc_exception_throw
frame #1: 0x029da644 CoreFoundation`-[__NSArrayI objectAtIndex:] + 196
frame #2: 0x000f21fb SubwayDA`-[LocationsMapSubviewController mapView:annotationView:calloutAccessoryControlTapped:] + 699 at LocationsMapSubviewController.m:174
frame #3: 0x00073b27 SubwayDA`-[CalloutMapAnnotationView calloutAccessoryTapped:] + 263 at CalloutMapAnnotationView.m:382
frame #4: 0x029efe99 CoreFoundation`-[NSObject performSelector:withObject:withObject:] + 73
frame #5: 0x00f1514e UIKit`-[UIApplication sendAction:to:from:forEvent:] + 96
frame #6: 0x00f150e6 UIKit`-[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
frame #7: 0x00fbbade UIKit`-[UIControl sendAction:to:forEvent:] + 66
frame #8: 0x00fbbfa7 UIKit`-[UIControl(Internal) _sendActionsForEvents:withEvent:] + 503
frame #9: 0x00fba1f8 UIKit`-[UIControl cancelTrackingWithEvent:] + 142
frame #10: 0x00fba0b9 UIKit`-[UIControl cancelTouchTracking] + 65
frame #11: 0x00fbb47b UIKit`-[UIControl _didMoveFromWindow:toWindow:] + 109
frame #12: 0x00f4dedb UIKit`-[UIView(Internal) _didMoveFromWindow:toWindow:] + 479
frame #13: 0x00f4a692 UIKit`-[UIView(Hierarchy) _postMovedFromSuperview:] + 158
frame #14: 0x00f48ee6 UIKit`__UIViewWasRemovedFromSuperview + 140
frame #15: 0x00f48b61 UIKit`-[UIView(Hierarchy) removeFromSuperview] + 176
frame #16: 0x00caaa83 MapKit`MKLongHash + 38425
frame #17: 0x00caa91c MapKit`MKLongHash + 38066
frame #18: 0x00caa620 MapKit`MKLongHash + 37302
frame #19: 0x00caa6b5 MapKit`MKLongHash + 37451
frame #20: 0x00c98370 MapKit
frame #21: 0x000f3615 SubwayDA`-[LocationsMapSubviewController updateMapWithSpan:centered:] + 293 at LocationsMapSubviewController.m:304
frame #22: 0x000f9f5e SubwayDA`-[LocationsViewController DidFCPositionUpdateFinished] + 94 at LocationsViewController.m:570
frame #23: 0x029efdea CoreFoundation`-[NSObject performSelector:] + 58
frame #24: 0x00080904 SubwayDA`-[ModelDataServerSynchronizer callSuccesfulDelegate] + 228 at ModelDataServerSynchronizer.m:1031
frame #25: 0x000807f6 SubwayDA`-[ModelDataServerSynchronizer CallDelegates] + 134 at ModelDataServerSynchronizer.m:1015
frame #26: 0x0007b12f SubwayDA`-[ModelDataServerSynchronizer DidUpdateAllFCPositions:] + 751 at ModelDataServerSynchronizer.m:542
frame #27: 0x00079e1d SubwayDA`-[ModelDataServerSynchronizer requestFinished:] + 429 at ModelDataServerSynchronizer.m:346
frame #28: 0x029efe42 CoreFoundation`-[NSObject performSelector:withObject:] + 66
frame #29: 0x0008b8f6 SubwayDA`-[RestDataService requestFinished:] + 1766 at RestDataService.m:350
frame #30: 0x029efe42 CoreFoundation`-[NSObject performSelector:withObject:] + 66
frame #31: 0x00031eeb SubwayDA`-[ASIHTTPRequest reportFinished] + 171 at ASIHTTPRequest.m:2019
frame #32: 0x029efe42 CoreFoundation`-[NSObject performSelector:withObject:] + 66
frame #33: 0x018389df Foundation`__NSThreadPerformPerform + 254
frame #34: 0x029c294f CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
frame #35: 0x02925b43 CoreFoundation`__CFRunLoopDoSources0 + 243
frame #36: 0x02925424 CoreFoundation`__CFRunLoopRun + 1012
frame #37: 0x02924d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #38: 0x02924c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #39: 0x02df17d8 GraphicsServices`GSEventRunModal + 190
frame #40: 0x02df188a GraphicsServices`GSEventRun + 103
frame #41: 0x00f12626 UIKit`UIApplicationMain + 1163
frame #42: 0x0000269d SubwayDA`main + 125 at main.m:12
thread #3: tid = 0x2403, 0x980b990a libsystem_kernel.dylib`kevent + 10
frame #0: 0x980b990a libsystem_kernel.dylib`kevent + 10
frame #1: 0x02d97372 libdispatch.dylib`_dispatch_mgr_invoke + 918
frame #2: 0x02d95be1 libdispatch.dylib`_dispatch_mgr_thread + 53
thread #5: tid = 0x2603, 0x980b6c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x980b6c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x980b61f6 libsystem_kernel.dylib`mach_msg + 70
frame #2: 0x029c210a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x029255d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x02924d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x02924c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x06ef9420 WebCore`_ZL12RunWebThreadPv + 560
frame #7: 0x9b2c3ed9 libsystem_c.dylib`_pthread_start + 335
thread #9: tid = 0x2a03, 0x980b6c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x980b6c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x980b61f6 libsystem_kernel.dylib`mach_msg + 70
frame #2: 0x029c210a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x029255d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x02924d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x02924c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x01912e30 Foundation`+[NSURLConnection(Loader) _resourceLoadLoop:] + 398
frame #7: 0x018244d6 Foundation`-[NSThread main] + 76
frame #8: 0x01824447 Foundation`__NSThread__main__ + 1258
frame #9: 0x9b2c3ed9 libsystem_c.dylib`_pthread_start + 335
thread #10: tid = 0x2b03, 0x980b902e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x980b902e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x9b2c5ccf libsystem_c.dylib`_pthread_wqthread + 773
thread #13: tid = 0x2e03, 0x980b902e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x980b902e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x9b2c5ccf libsystem_c.dylib`_pthread_wqthread + 773
thread #14: tid = 0x2f03, 0x980b8b42 libsystem_kernel.dylib`select$DARWIN_EXTSN + 10
frame #0: 0x980b8b42 libsystem_kernel.dylib`select$DARWIN_EXTSN + 10
frame #1: 0x029567cb CoreFoundation`__CFSocketManager + 939
frame #2: 0x9b2c3ed9 libsystem_c.dylib`_pthread_start + 335
thread #15: tid = 0x3003, 0x980b6c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x980b6c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x980b61f6 libsystem_kernel.dylib`mach_msg + 70
frame #2: 0x029c210a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x029255d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x02924d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x02926e81 CoreFoundation`CFRunLoopRun + 129
frame #6: 0x000416ef SubwayDA`+[ASIHTTPRequest runRequests] + 223 at ASIHTTPRequest.m:4793
frame #7: 0x018244d6 Foundation`-[NSThread main] + 76
frame #8: 0x01824447 Foundation`__NSThread__main__ + 1258
frame #9: 0x9b2c3ed9 libsystem_c.dylib`_pthread_start + 335
thread #16: tid = 0x3103, 0x980b6c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x980b6c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x980b61f6 libsystem_kernel.dylib`mach_msg + 70
frame #2: 0x029c210a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x029255d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x02924d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x02924c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x00ca086b MapKit`MKNormalizedPointForLayer + 30057
frame #7: 0x018244d6 Foundation`-[NSThread main] + 76
frame #8: 0x01824447 Foundation`__NSThread__main__ + 1258
frame #9: 0x9b2c3ed9 libsystem_c.dylib`_pthread_start + 335
thread #17: tid = 0x3203, 0x980b6c76 libsystem_kernel.dylib`semaphore_timedwait_trap + 10
frame #0: 0x980b6c76 libsystem_kernel.dylib`semaphore_timedwait_trap + 10
frame #1: 0x02d990ad libdispatch.dylib`_dispatch_semaphore_wait_slow + 247
frame #2: 0x02d990fa libdispatch.dylib`dispatch_semaphore_wait + 36
frame #3: 0x0080bac3 CoreLocation`CLClientInvokeCallback(__CLClient*, CLClientEvent, __CFDictionary const*) + 469
frame #4: 0x0080de18 CoreLocation`___CLClientCreateConnection_block_invoke_0 + 307
frame #5: 0x0084183d CoreLocation`__setDefaultMessageHandler_onQueue_block_invoke_0 + 76
frame #6: 0x0083ef01 CoreLocation`CLConnection::handleMessage(CLConnectionMessage*) + 75
frame #7: 0x0083eeb1 CoreLocation`__initializeConnection_nl_block_invoke_0 + 27
frame #8: 0x0083fc07 CoreLocation`__setEventHandler_block_invoke_0 + 286
frame #9: 0x02db4c84 libxpc.dylib`__XPC_CONNECTION_EVENT_HANDLER_CALLOUT__ + 52
frame #10: 0x02db70e3 libxpc.dylib`_xpc_connection_recv_message + 650
frame #11: 0x02db7b87 libxpc.dylib`_xpc_connection_wakeup_recv + 199
frame #12: 0x02db7a2e libxpc.dylib`_xpc_connection_wakeup2 + 1598
frame #13: 0x02db7c59 libxpc.dylib`_xpc_connection_wakeup + 101
frame #14: 0x02d9a450 libdispatch.dylib`_dispatch_source_invoke + 719
frame #15: 0x02d96cc4 libdispatch.dylib`_dispatch_queue_invoke + 66
frame #16: 0x02d96e50 libdispatch.dylib`_dispatch_queue_drain + 272
frame #17: 0x02d96cb4 libdispatch.dylib`_dispatch_queue_invoke + 50
frame #18: 0x02d96e50 libdispatch.dylib`_dispatch_queue_drain + 272
frame #19: 0x02d96cb4 libdispatch.dylib`_dispatch_queue_invoke + 50
frame #20: 0x02d96e50 libdispatch.dylib`_dispatch_queue_drain + 272
frame #21: 0x02d96cb4 libdispatch.dylib`_dispatch_queue_invoke + 50
frame #22: 0x02d96402 libdispatch.dylib`_dispatch_worker_thread2 + 247
frame #23: 0x9b2c5b24 libsystem_c.dylib`_pthread_wqthread + 346
thread #18: tid = 0x3303, 0x980b902e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x980b902e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x9b2c5ccf libsystem_c.dylib`_pthread_wqthread + 773
thread #19: tid = 0x3403, 0x980b902e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x980b902e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x9b2c5ccf libsystem_c.dylib`_pthread_wqthread + 773
(lldb)
any help to trace it or clue on what is on going on would be appreciated ?
Thanks in advance,
Related
I use openGLES in my IOS app. The deadlock occurs in some case. The deadlocked Threads are as following. It seem The EAGLContext presentRenderbuffer cause semaphore::wait() in the sync queue 'gputools.DYSharedMemoryTransport.0x109700000.send', then the main thread reach to wait the same queue, this is deadlock. My question is how EAGLContext presentRenderbuffer cause that wait semaphore::wait()?
thread #1, queue = 'com.apple.main-thread'
frame #0: 0x00000001a6c788b0 libsystem_kernel.dylib`__ulock_wait + 8
frame #1: 0x000000010915b720 libdispatch.dylib`_dlock_wait + 52
frame #2: 0x000000010915b504 libdispatch.dylib`_dispatch_thread_event_wait_slow + 48
frame #3: 0x0000000109169c60 libdispatch.dylib`__DISPATCH_WAIT_FOR_QUEUE__ + 340
frame #4: 0x0000000109169694 libdispatch.dylib`_dispatch_sync_f_slow + 176
frame #5: 0x0000000109389284 GPUToolsCore`-[DYTransport send:inReplyTo:error:replyQueue:timeout:handler:] + 556
frame #6: 0x00000001093759e0 GPUToolsCore`-[DYSharedMemoryTransport send:inReplyTo:error:replyQueue:timeout:handler:] + 232
frame #7: 0x00000001a6e52094 CoreFoundation`__NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
frame #8: 0x00000001a6d5566c CoreFoundation`-[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 192
frame #9: 0x0000000109381a60 GPUToolsCore`CADisplayLink_initWithDisplayLink(CADisplayLink*, objc_selector*, void*) + 240
frame #10: 0x00000001ad6a7fdc QuartzCore`+[CADisplayLink(CADisplayLinkPrivate) displayLinkWithDisplay:target:selector:] + 276
frame #11: 0x0000000109381fd4 GPUToolsCore`CADisplayLink_displayLinkWithDisplay_target_selector(objc_class*, objc_selector*, CADisplay*, objc_object*, objc_selector*) + 112
frame #12: 0x00000001aae4b8ec UIKitCore`-[_UITouchForceObservable receiveObservedValue:] + 164
frame #13: 0x00000001aaa65444 UIKitCore`-[UIGestureRecognizer _updateForceClassifierWithEvent:] + 72
frame #14: 0x00000001aaa655a0 UIKitCore`-[UIGestureRecognizer _touchesBegan:withEvent:] + 232
frame #15: 0x00000001aaeddda8 UIKitCore`-[UITouchesEvent _sendEventToGestureRecognizer:] + 360
frame #16: 0x00000001aaa5b7f8 UIKitCore`__47-[UIGestureEnvironment _updateForEvent:window:]_block_invoke + 68
frame #17: 0x00000001aaa5b8f4 UIKitCore`-[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 216
frame #18: 0x00000001aaa5b77c UIKitCore`-[UIGestureEnvironment _updateForEvent:window:] + 204
frame #19: 0x00000001aae9d238 UIKitCore`-[UIWindow sendEvent:] + 3324
frame #20: 0x00000001aae79f64 UIKitCore`-[UIApplication sendEvent:] + 336
frame #21: 0x00000001aaef0868 UIKitCore`__dispatchPreprocessedEventFromEventQueue + 5880
frame #22: 0x00000001aaef2dc4 UIKitCore`__handleEventQueueInternal + 4924
frame #23: 0x00000001aaeebc38 UIKitCore`__handleHIDEventFetcherDrain + 108
frame #24: 0x00000001a6dfd090 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
frame #25: 0x00000001a6dfcfe8 CoreFoundation`__CFRunLoopDoSource0 + 80
frame #26: 0x00000001a6dfc780 CoreFoundation`__CFRunLoopDoSources0 + 180
frame #27: 0x00000001a6df78cc CoreFoundation`__CFRunLoopRun + 1080
frame #28: 0x00000001a6df716c CoreFoundation`CFRunLoopRunSpecific + 464
frame #29: 0x00000001b0c2f328 GraphicsServices`GSEventRunModal + 104
frame #30: 0x00000001aae61d0c UIKitCore`UIApplicationMain + 1936
frame #31: 0x00000001046d4e00 BAvatar`main(argc=1, argv=0x000000016bc0f7b0) at main.m:14:16
frame #32: 0x00000001a6c82424 libdyld.dylib`start + 4
thread #91
frame #0: 0x00000001a6c56630 libsystem_kernel.dylib`semaphore_wait_trap + 8
frame #1: 0x00000001c9d68864 caulk`caulk::mach::semaphore::wait() + 24
frame #2: 0x00000001c9d63538 caulk`caulk::semaphore::timed_wait(double) + 140
frame #3: 0x00000001c9d67220 caulk`caulk::concurrent::details::worker_thread::run() + 40
frame #4: 0x00000001c9d673b0 caulk`void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 56
frame #5: 0x00000001a6b9c1f0 libsystem_pthread.dylib`_pthread_start + 124
* thread #187, queue = 'gputools.DYSharedMemoryTransport.0x109700000.send'
frame #0: 0x00000001a6c78238 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x00000001a6ae5664 libsystem_c.dylib`nanosleep + 212
frame #2: 0x00000001a6ae553c libsystem_c.dylib`usleep + 64
frame #3: 0x0000000109376bac GPUToolsCore`-[DYSharedMemoryTransport _waitEAGAIN] + 40
frame #4: 0x0000000109398940 GPUToolsCore`-[DYBaseStreamTransport _writeBuffers:] + 232
frame #5: 0x0000000109398ed4 GPUToolsCore`-[DYBaseStreamTransport _sendMessage:error:] + 476
frame #6: 0x0000000109389408 GPUToolsCore`__63-[DYTransport send:inReplyTo:error:replyQueue:timeout:handler:]_block_invoke.153 + 100
frame #7: 0x000000010915ac88 libdispatch.dylib`_dispatch_client_callout + 16
frame #8: 0x0000000109169dcc libdispatch.dylib`_dispatch_sync_invoke_and_complete_recurse + 132
frame #9: 0x0000000109389284 GPUToolsCore`-[DYTransport send:inReplyTo:error:replyQueue:timeout:handler:] + 556
frame #10: 0x00000001093759e0 GPUToolsCore`-[DYSharedMemoryTransport send:inReplyTo:error:replyQueue:timeout:handler:] + 232
frame #11: 0x0000000106710470 libglInterpose.dylib`handle_frame_boundary + 456
frame #12: 0x00000001068ca0d8 libglInterpose.dylib`_EAGLContext_PresentInterposeCommon(EAGLContext*, unsigned int, unsigned long, double, bool () block_pointer) + 1012
frame #13: 0x00000001068c7ee4 libglInterpose.dylib`EAGLContext_presentRenderbuffer(EAGLContext*, objc_selector*, unsigned long) + 80```
EAGLContext is part of OpenGL, which is deprecated. You should switch to Metal on this link: https://developer.apple.com/documentation/coreimage/cicontext/1437609-init
Today i find a bug in my app relate to UIWebView, there are two case for it, the url i request is https://estore-cn.pandora.net/Bracelets-1/
When I use UIWebView to show a web page, and I exit that page, the webView's dealloc been called, but the UI thread been blocked, and several minutes later it recovers.
This is the thread stack here when I press pause program execution button in Xcode.
* thread #1: tid = 0x580710, 0x0000000180da3f6c libsystem_kernel.dylib`__psynch_mutexwait + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x0000000180da3f6c libsystem_kernel.dylib`__psynch_mutexwait + 8
frame #1: 0x0000000180e7239c libsystem_pthread.dylib`_pthread_mutex_lock_wait + 96
frame #2: 0x0000000180e7257c libsystem_pthread.dylib`_pthread_mutex_lock_slow + 296
frame #3: 0x00000001850dc3b0 WebCore`_WebTryThreadLock(bool) + 52
frame #4: 0x00000001850dcb3c WebCore`WebThreadLock + 108
frame #5: 0x00000001865abfc0 UIKit`-[UIWebView dealloc] + 36
frame #6: 0x000000010032ba64 QDaily`-[QDWebView dealloc](self=0x00000001575f3980, _cmd="dealloc") + 148 at QDWebView.m:63
frame #7: 0x0000000180889ae8 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 508
frame #8: 0x00000001810e89fc CoreFoundation`_CFAutoreleasePoolPop + 28
frame #9: 0x00000001811bebc0 CoreFoundation`__CFRunLoopRun + 1636
frame #10: 0x00000001810e8c50 CoreFoundation`CFRunLoopRunSpecific + 384
frame #11: 0x00000001829d0088 GraphicsServices`GSEventRunModal + 180
frame #12: 0x00000001863d6088 UIKit`UIApplicationMain + 204
frame #13: 0x000000010037490c QDaily`main(argc=1, argv=0x000000016fd03af0) + 172 at main.m:16
frame #14: 0x0000000180c868b8 libdyld.dylib`start + 4
second case is ,when i begin skip into the webView page, the same case happened.
thread #1: tid = 0x5801dc, 0x0000000180da3f6c libsystem_kernel.dylib`__psynch_mutexwait + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x0000000180da3f6c libsystem_kernel.dylib`__psynch_mutexwait + 8
frame #1: 0x0000000180e7239c libsystem_pthread.dylib`_pthread_mutex_lock_wait + 96
frame #2: 0x0000000180e7257c libsystem_pthread.dylib`_pthread_mutex_lock_slow + 296
frame #3: 0x00000001850dc3b0 WebCore`_WebTryThreadLock(bool) + 52
frame #4: 0x00000001850dcb3c WebCore`WebThreadLock + 108
frame #5: 0x00000001867f3dc4 UIKit`-[UIWebView _webViewCommonInitWithWebView:scalesPageToFit:] + 128
frame #6: 0x00000001865a83ec UIKit`-[UIWebView initWithFrame:] + 80
frame #7: 0x00000001002abb60 QDaily`-[QDWebView initWithFrame:](self=0x0000000000000000, _cmd="initWithFrame:", frame=(origin = (x = 0, y = 20), size = (width = 414, height = 666))) + 120 at QDWebView.m:71
frame #8: 0x0000000100212244 QDaily`-[QDSimpleWebViewController viewDidLoad](self=0x0000000131225070, _cmd="viewDidLoad") + 796 at QDSimpleWebViewController.m:57
frame #9: 0x000000018636cc40 UIKit`-[UIViewController loadViewIfRequired] + 996
frame #10: 0x00000001863850d0 UIKit`-[UIViewController __viewWillAppear:] + 132
frame #11: 0x000000018651fe5c UIKit`-[UINavigationController _startCustomTransition:] + 1052
frame #12: 0x000000018642be40 UIKit`-[UINavigationController _startDeferredTransitionIfNeeded:] + 688
frame #13: 0x000000018642bb1c UIKit`-[UINavigationController __viewWillLayoutSubviews] + 60
frame #14: 0x000000018642ba84 UIKit`-[UILayoutContainerView layoutSubviews] + 208
frame #15: 0x00000001863681e4 UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 656
frame #16: 0x0000000183cf698c QuartzCore`-[CALayer layoutSublayers] + 148
frame #17: 0x0000000183cf15c8 QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 292
frame #18: 0x0000000183cf1488 QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
frame #19: 0x0000000183cf0ab8 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 252
frame #20: 0x0000000183cf0818 QuartzCore`CA::Transaction::commit() + 500
frame #21: 0x000000018636aff4 UIKit`_UIApplicationHandleEventQueue + 4980
frame #22: 0x00000001811c109c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
frame #23: 0x00000001811c0b30 CoreFoundation`__CFRunLoopDoSources0 + 540
frame #24: 0x00000001811be830 CoreFoundation`__CFRunLoopRun + 724
frame #25: 0x00000001810e8c50 CoreFoundation`CFRunLoopRunSpecific + 384
frame #26: 0x00000001829d0088 GraphicsServices`GSEventRunModal + 180
frame #27: 0x00000001863d6088 UIKit`UIApplicationMain + 204
frame #28: 0x00000001002f490c QDaily`main(argc=1, argv=0x000000016fd83af0) + 172 at main.m:16
frame #29: 0x0000000180c868b8 libdyld.dylib`start + 4
I don't know how to resolve it
ADD: this is the webThread when happened dead lock
* thread #19: tid = 0x58076c, 0x00000001854180f0 WebCore`WTF::HashMap<unsigned long, WTF::RefPtr<WebCore::ResourceLoader>, WTF::IntHash<unsigned long>, WTF::HashTraits<unsigned long>, WTF::HashTraits<WTF::RefPtr<WebCore::ResourceLoader> > >::remove(unsigned long const&) + 164, name = 'WebThread'
* frame #0: 0x00000001854180f0 WebCore`WTF::HashMap<unsigned long, WTF::RefPtr<WebCore::ResourceLoader>, WTF::IntHash<unsigned long>, WTF::HashTraits<unsigned long>, WTF::HashTraits<WTF::RefPtr<WebCore::ResourceLoader> > >::remove(unsigned long const&) + 164
frame #1: 0x0000000185126e54 WebCore`WebCore::DocumentLoader::removeSubresourceLoader(WebCore::ResourceLoader*) + 40
frame #2: 0x00000001851292a0 WebCore`WebCore::ResourceLoader::cancel(WebCore::ResourceError const&) + 492
frame #3: 0x0000000185087764 WebCore`WebCore::ResourceLoader::init(WebCore::ResourceRequest const&) + 404
frame #4: 0x00000001850873fc WebCore`WebCore::SubresourceLoader::startLoading() + 36
frame #5: 0x000000018508735c WebCore`WebCore::ResourceLoadScheduler::servePendingRequests(WebCore::ResourceLoadScheduler::HostInformation*, WebCore::ResourceLoadPriority) + 516
frame #6: 0x00000001851070b8 WebCore`WebCore::ResourceLoadScheduler::servePendingRequests(WebCore::ResourceLoadPriority) + 412
frame #7: 0x0000000185079f1c WebCore`WebCore::ThreadTimers::sharedTimerFiredInternal() + 148
frame #8: 0x0000000185079e5c WebCore`WebCore::timerFired(__CFRunLoopTimer*, void*) + 36
frame #9: 0x00000001811c1794 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
frame #10: 0x00000001811c1438 CoreFoundation`__CFRunLoopDoTimer + 884
frame #11: 0x00000001811beb4c CoreFoundation`__CFRunLoopRun + 1520
frame #12: 0x00000001810e8c50 CoreFoundation`CFRunLoopRunSpecific + 384
frame #13: 0x00000001850da108 WebCore`RunWebThread(void*) + 456
frame #14: 0x0000000180e6fb28 libsystem_pthread.dylib`_pthread_body + 156
frame #15: 0x0000000180e6fa8c libsystem_pthread.dylib`_pthread_start + 156
frame #16: 0x0000000180e6d028 libsystem_pthread.dylib`thread_start + 4
ADD: JavaScriptCore :: Marking thread
* thread #20: tid = 0x58076d, 0x0000000180da3f24 libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'JavaScriptCore::Marking'
* frame #0: 0x0000000180da3f24 libsystem_kernel.dylib`__psynch_cvwait + 8
frame #1: 0x0000000180e6ece8 libsystem_pthread.dylib`_pthread_cond_wait + 648
frame #2: 0x00000001807fb42c libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
frame #3: 0x0000000184bc0d5c JavaScriptCore`JSC::GCThread::waitForNextPhase() + 144
frame #4: 0x0000000184bc0df4 JavaScriptCore`JSC::GCThread::gcThreadMain() + 84
frame #5: 0x0000000184896614 JavaScriptCore`WTF::threadEntryPoint(void*) + 212
frame #6: 0x0000000184896524 JavaScriptCore`WTF::wtfThreadEntryPoint(void*) + 24
frame #7: 0x0000000180e6fb28 libsystem_pthread.dylib`_pthread_body + 156
frame #8: 0x0000000180e6fa8c libsystem_pthread.dylib`_pthread_start + 156
frame #9: 0x0000000180e6d028 libsystem_pthread.dylib`thread_start + 4
To push the user to the iTunes store for desired items I'm using the following function:
func openStoreProductWithiTunesItemIdentifier(identifier: String) {
let storeViewController = SKStoreProductViewController()
storeViewController.delegate = self
let parameters = [ SKStoreProductParameterITunesItemIdentifier : identifier, SKStoreProductParameterAffiliateToken : ITUNES_AFFILIATE_ID]
storeViewController.loadProductWithParameters(parameters) { [weak self] (loaded, error) -> Void in
if loaded {
self!.navigationController?.pushViewControllerWithHandler(storeViewController, animated: true) {
LilithProgressHUD.hide() // custom progress hud
}
}
}
}
extension UINavigationController {
func pushViewControllerWithHandler(viewController: UIViewController, animated: Bool, completion: Void -> Void) {
CATransaction.begin()
CATransaction.setCompletionBlock(completion)
pushViewController(viewController, animated: animated)
CATransaction.commit()
}
}
Called by
let trackID = "thisIsMyTrackID"
openStoreProductWithiTunesItemIdentifier(trackID)
This results in
If I'm instead of:
self!.navigationController?.pushViewControllerWithHandler(storeViewController, animated: true) {
LilithProgressHUD.hide() // custom progress hud
}
Using:
self?.presentViewController(storeViewController, animated: true, completion: {
LilithProgressHUD.hide() // custom progress hud
})
, it is working. But I need the controller to push within the navigationController to fit the rest of the views and animations. What am I missing? Help is very appreciated.
Backtrace as requested:
(lldb) bt all
* thread #1: tid = 0x9bb48, 0x000000018fcac524 libobjc.A.dylib`objc_exception_throw, queue = 'com.apple.main-thread', stop reason = breakpoint 1.2
frame #0: 0x000000018fcac524 libobjc.A.dylib`objc_exception_throw
frame #1: 0x0000000191274108 CoreFoundation`+[NSException raise:format:] + 116
frame #2: 0x000000019dca04d0 StoreKit`-[SKStoreProductViewController _throwUnsupportedPresentationException] + 76
frame #3: 0x000000019dc9ed24 StoreKit`-[SKStoreProductViewController willMoveToParentViewController:] + 108
frame #4: 0x0000000197159174 UIKit`-[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:] + 568
frame #5: 0x000000019714f580 UIKit`-[UINavigationController pushViewController:transition:forceImmediate:] + 1220
frame #6: 0x000000019714f06c UIKit`-[UINavigationController pushViewController:animated:] + 652
* frame #7: 0x00000001000a32f4 cya`UINavigationController.pushViewControllerWithHandler(viewController=0x00000001028ae9c0, animated=true, completion=0x00000001000a35c4 cya`partial apply forwarder for reabstraction thunk helper from #callee_unowned #convention(block) () -> (#unowned ()) to #callee_owned () -> (#unowned ()) with unmangled suffix ".16" at UINavigationControllerExtensions.swift, self=0x0000000103844600) -> ()) -> () + 504 at UINavigationControllerExtensions.swift:24
frame #8: 0x00000001000a3578 cya`#objc UINavigationController.pushViewControllerWithHandler(UIViewController, animated : Bool, completion : () -> ()) -> () + 196 at UINavigationControllerExtensions.swift:0
frame #9: 0x00000001001b04f4 cya`DJProfileAsUserMusicTableVC.(loaded=true, error=nil, self=0x0000000102a358d0, storeViewController=0x00000001028ae9c0) -> ()).(closure #1) + 416 at DJProfileAsUserMusicTableVC.swift:697
frame #10: 0x00000001001b0654 cya`thunk + 56 at DJProfileAsUserMusicTableVC.swift:0
frame #11: 0x00000001001b0714 cya`thunk + 36 at DJProfileAsUserMusicTableVC.swift:0
frame #12: 0x00000001001b0804 cya`thunk + 80 at DJProfileAsUserMusicTableVC.swift:0
frame #13: 0x000000019dc9fb84 StoreKit`-[SKStoreProductViewController _loadDidFinishWithResult:error:] + 92
frame #14: 0x000000019127a160 CoreFoundation`__invoking___ + 144
frame #15: 0x000000019116dc3c CoreFoundation`-[NSInvocation invoke] + 284
frame #16: 0x0000000192e158bc FrontBoardServices`__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
frame #17: 0x0000000192e15728 FrontBoardServices`-[FBSSerialQueue _performNext] + 176
frame #18: 0x0000000192e15ad0 FrontBoardServices`-[FBSSerialQueue _performNextFromRunLoopSource] + 56
frame #19: 0x0000000191222278 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
frame #20: 0x0000000191221bc0 CoreFoundation`__CFRunLoopDoSources0 + 524
frame #21: 0x000000019121f7c0 CoreFoundation`__CFRunLoopRun + 804
frame #22: 0x000000019114e048 CoreFoundation`CFRunLoopRunSpecific + 444
frame #23: 0x0000000192bd1198 GraphicsServices`GSEventRunModal + 180
frame #24: 0x0000000197128628 UIKit`-[UIApplication _run] + 684
frame #25: 0x0000000197123360 UIKit`UIApplicationMain + 208
frame #26: 0x000000010020c08c cya`main + 144 at AppDelegate.swift:19
frame #27: 0x00000001901305b8 libdyld.dylib`start + 4
thread #3: tid = 0x9bbc9, 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #0: 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #1: 0x0000000190305188 libsystem_pthread.dylib`_pthread_wqthread + 968
frame #2: 0x0000000190304db4 libsystem_pthread.dylib`start_wqthread + 4
thread #4: tid = 0x9bbca, 0x0000000190304db0 libsystem_pthread.dylib`start_wqthread
frame #0: 0x0000000190304db0 libsystem_pthread.dylib`start_wqthread
thread #7: tid = 0x9bbdc, 0x0000000190242314 libsystem_kernel.dylib`__semwait_signal + 8, name = 'gputools.smt_poll.0x17403cde0'
frame #0: 0x0000000190242314 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x000000019016027c libsystem_c.dylib`nanosleep + 212
frame #2: 0x000000019016019c libsystem_c.dylib`usleep + 64
frame #3: 0x00000001025adeb0 GPUToolsCore`smt_poll_thread_entry(void*) + 136
frame #4: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #5: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #6: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #8: tid = 0x9bbef, 0x0000000190242314 libsystem_kernel.dylib`__semwait_signal + 8, name = 'gputools.smt_poll.0x170220020'
frame #0: 0x0000000190242314 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x000000019016027c libsystem_c.dylib`nanosleep + 212
frame #2: 0x000000019016019c libsystem_c.dylib`usleep + 64
frame #3: 0x00000001025adeb0 GPUToolsCore`smt_poll_thread_entry(void*) + 136
frame #4: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #5: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #6: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #9: tid = 0x9bbf4, 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.apple.uikit.eventfetch-thread'
frame #0: 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x0000000190223fdc libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000191221cec CoreFoundation`__CFRunLoopServiceMachPort + 192
frame #3: 0x000000019121f908 CoreFoundation`__CFRunLoopRun + 1132
frame #4: 0x000000019114e048 CoreFoundation`CFRunLoopRunSpecific + 444
frame #5: 0x0000000191c5cb1c Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
frame #6: 0x0000000191c7d60c Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 96
frame #7: 0x0000000197a9dc7c UIKit`-[UIEventFetcher threadMain] + 136
frame #8: 0x0000000191d5a50c Foundation`__NSThread__start__ + 1024
frame #9: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #10: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #11: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #12: tid = 0x9bbfb, 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.apple.NSURLConnectionLoader'
frame #0: 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x0000000190223fdc libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000191221cec CoreFoundation`__CFRunLoopServiceMachPort + 192
frame #3: 0x000000019121f908 CoreFoundation`__CFRunLoopRun + 1132
frame #4: 0x000000019114e048 CoreFoundation`CFRunLoopRunSpecific + 444
frame #5: 0x000000019193bcec CFNetwork`+[NSURLConnection(Loader) _resourceLoadLoop:] + 336
frame #6: 0x0000000191d5a50c Foundation`__NSThread__start__ + 1024
frame #7: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #8: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #9: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #14: tid = 0x9bbfd, 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8, name = 'AVAudioSession Notify Thread'
frame #0: 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x0000000190223fdc libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000191221cec CoreFoundation`__CFRunLoopServiceMachPort + 192
frame #3: 0x000000019121f908 CoreFoundation`__CFRunLoopRun + 1132
frame #4: 0x000000019114e048 CoreFoundation`CFRunLoopRunSpecific + 444
frame #5: 0x00000001aa8f1fe8 AVFAudio`GenericRunLoopThread::Entry(void*) + 164
frame #6: 0x00000001aa917f14 AVFAudio`CAPThread::Entry(CAPThread*) + 84
frame #7: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #8: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #9: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #17: tid = 0x9bc0f, 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.squareup.SocketRocket.NetworkThread'
frame #0: 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x0000000190223fdc libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000191221cec CoreFoundation`__CFRunLoopServiceMachPort + 192
frame #3: 0x000000019121f908 CoreFoundation`__CFRunLoopRun + 1132
frame #4: 0x000000019114e048 CoreFoundation`CFRunLoopRunSpecific + 444
frame #5: 0x0000000191c5cb1c Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
frame #6: 0x00000001003f57ec cya`-[_FSRRunLoopThread main](self=0x00000001740918f0, _cmd=<unavailable>) + 252 at FSRWebSocket.m:1838
frame #7: 0x0000000191d5a50c Foundation`__NSThread__start__ + 1024
frame #8: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #9: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #10: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #18: tid = 0x9bc21, 0x000000019024223c libsystem_kernel.dylib`__select + 8, name = 'com.apple.CFSocket.private'
frame #0: 0x000000019024223c libsystem_kernel.dylib`__select + 8
frame #1: 0x0000000191228b84 CoreFoundation`__CFSocketManager + 640
frame #2: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #3: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #4: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #19: tid = 0x9bc70, 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #0: 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #1: 0x000000019030536c libsystem_pthread.dylib`_pthread_wqthread + 1452
frame #2: 0x0000000190304db4 libsystem_pthread.dylib`start_wqthread + 4
thread #20: tid = 0x9bc77, 0x0000000190304db0 libsystem_pthread.dylib`start_wqthread
frame #0: 0x0000000190304db0 libsystem_pthread.dylib`start_wqthread
thread #21: tid = 0x9bc78, 0x0000000000000000
frame #0: 0x0000000000000000
(lldb)
Backtrace without exception breakpoint:
(lldb) bt all
warning: could not load any Objective-C class information. This will significantly reduce the quality of type information available.
* thread #1: tid = 0x9c221, 0x0000000190242014 libsystem_kernel.dylib`__pthread_kill + 8, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x0000000190242014 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x0000000190309460 libsystem_pthread.dylib`pthread_kill + 112
frame #2: 0x00000001901b63f4 libsystem_c.dylib`abort + 140
frame #3: 0x000000018fc812d4 libc++abi.dylib`abort_message + 132
frame #4: 0x000000018fc9ecc0 libc++abi.dylib`default_terminate_handler() + 304
frame #5: 0x000000018fcac844 libobjc.A.dylib`_objc_terminate() + 124
frame #6: 0x000000018fcac844 libobjc.A.dylib`_objc_terminate() + 124
frame #7: 0x000000018fc9b66c libc++abi.dylib`std::__terminate(void (*)()) + 16
frame #8: 0x000000018fc9b234 libc++abi.dylib`__cxa_rethrow + 144
frame #9: 0x000000018fcac71c libobjc.A.dylib`objc_exception_rethrow + 44
frame #10: 0x000000019114e0bc CoreFoundation`CFRunLoopRunSpecific + 560
frame #11: 0x0000000192bd1198 GraphicsServices`GSEventRunModal + 180
frame #12: 0x0000000197128628 UIKit`-[UIApplication _run] + 684
frame #13: 0x0000000197123360 UIKit`UIApplicationMain + 208
* frame #14: 0x00000001001e408c cya`main + 144 at AppDelegate.swift:19
frame #15: 0x00000001901305b8 libdyld.dylib`start + 4
thread #5: tid = 0x9c29d, 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #0: 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #1: 0x000000019030536c libsystem_pthread.dylib`_pthread_wqthread + 1452
frame #2: 0x0000000190304db4 libsystem_pthread.dylib`start_wqthread + 4
thread #7: tid = 0x9c2a7, 0x0000000190242314 libsystem_kernel.dylib`__semwait_signal + 8, name = 'gputools.smt_poll.0x174036a80'
frame #0: 0x0000000190242314 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x000000019016027c libsystem_c.dylib`nanosleep + 212
frame #2: 0x000000019016019c libsystem_c.dylib`usleep + 64
frame #3: 0x000000010257deb0 GPUToolsCore`smt_poll_thread_entry(void*) + 136
frame #4: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #5: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #6: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #8: tid = 0x9c2b2, 0x0000000190242314 libsystem_kernel.dylib`__semwait_signal + 8, name = 'gputools.smt_poll.0x1740366c0'
frame #0: 0x0000000190242314 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x000000019016027c libsystem_c.dylib`nanosleep + 212
frame #2: 0x000000019016019c libsystem_c.dylib`usleep + 64
frame #3: 0x000000010257deb0 GPUToolsCore`smt_poll_thread_entry(void*) + 136
frame #4: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #5: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #6: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #9: tid = 0x9c2b6, 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.apple.uikit.eventfetch-thread'
frame #0: 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x0000000190223fdc libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000191221cec CoreFoundation`__CFRunLoopServiceMachPort + 192
frame #3: 0x000000019121f908 CoreFoundation`__CFRunLoopRun + 1132
frame #4: 0x000000019114e048 CoreFoundation`CFRunLoopRunSpecific + 444
frame #5: 0x0000000191c5cb1c Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
frame #6: 0x0000000191c7d60c Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 96
frame #7: 0x0000000197a9dc7c UIKit`-[UIEventFetcher threadMain] + 136
frame #8: 0x0000000191d5a50c Foundation`__NSThread__start__ + 1024
frame #9: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #10: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #11: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #10: tid = 0x9c2b7, 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #0: 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #1: 0x000000019030536c libsystem_pthread.dylib`_pthread_wqthread + 1452
frame #2: 0x0000000190304db4 libsystem_pthread.dylib`start_wqthread + 4
thread #12: tid = 0x9c2bf, 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.apple.NSURLConnectionLoader'
frame #0: 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x0000000190223fdc libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000191221cec CoreFoundation`__CFRunLoopServiceMachPort + 192
frame #3: 0x000000019121f908 CoreFoundation`__CFRunLoopRun + 1132
frame #4: 0x000000019114e048 CoreFoundation`CFRunLoopRunSpecific + 444
frame #5: 0x000000019193bcec CFNetwork`+[NSURLConnection(Loader) _resourceLoadLoop:] + 336
frame #6: 0x0000000191d5a50c Foundation`__NSThread__start__ + 1024
frame #7: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #8: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #9: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #14: tid = 0x9c2c3, 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8, name = 'AVAudioSession Notify Thread'
frame #0: 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x0000000190223fdc libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000191221cec CoreFoundation`__CFRunLoopServiceMachPort + 192
frame #3: 0x000000019121f908 CoreFoundation`__CFRunLoopRun + 1132
frame #4: 0x000000019114e048 CoreFoundation`CFRunLoopRunSpecific + 444
frame #5: 0x00000001aa8f1fe8 AVFAudio`GenericRunLoopThread::Entry(void*) + 164
frame #6: 0x00000001aa917f14 AVFAudio`CAPThread::Entry(CAPThread*) + 84
frame #7: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #8: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #9: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #15: tid = 0x9c2cc, 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.squareup.SocketRocket.NetworkThread'
frame #0: 0x000000019022416c libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x0000000190223fdc libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000191221cec CoreFoundation`__CFRunLoopServiceMachPort + 192
frame #3: 0x000000019121f908 CoreFoundation`__CFRunLoopRun + 1132
frame #4: 0x000000019114e048 CoreFoundation`CFRunLoopRunSpecific + 444
frame #5: 0x0000000191c5cb1c Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
frame #6: 0x00000001003cd7ec cya`-[_FSRRunLoopThread main](self=0x0000000170097c00, _cmd=<unavailable>) + 252 at FSRWebSocket.m:1838
frame #7: 0x0000000191d5a50c Foundation`__NSThread__start__ + 1024
frame #8: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #9: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #10: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #16: tid = 0x9c2d8, 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #0: 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #1: 0x000000019030536c libsystem_pthread.dylib`_pthread_wqthread + 1452
frame #2: 0x0000000190304db4 libsystem_pthread.dylib`start_wqthread + 4
thread #18: tid = 0x9c2e8, 0x000000019024223c libsystem_kernel.dylib`__select + 8, name = 'com.apple.CFSocket.private'
frame #0: 0x000000019024223c libsystem_kernel.dylib`__select + 8
frame #1: 0x0000000191228b84 CoreFoundation`__CFSocketManager + 640
frame #2: 0x0000000190307860 libsystem_pthread.dylib`_pthread_body + 240
frame #3: 0x0000000190307770 libsystem_pthread.dylib`_pthread_start + 284
frame #4: 0x0000000190304dbc libsystem_pthread.dylib`thread_start + 4
thread #19: tid = 0x9c355, 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #0: 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #1: 0x0000000190305188 libsystem_pthread.dylib`_pthread_wqthread + 968
frame #2: 0x0000000190304db4 libsystem_pthread.dylib`start_wqthread + 4
thread #20: tid = 0x9c35f, 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #0: 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #1: 0x000000019030536c libsystem_pthread.dylib`_pthread_wqthread + 1452
frame #2: 0x0000000190304db4 libsystem_pthread.dylib`start_wqthread + 4
thread #21: tid = 0x9c360, 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #0: 0x0000000190242a88 libsystem_kernel.dylib`__workq_kernreturn + 8
frame #1: 0x0000000190305188 libsystem_pthread.dylib`_pthread_wqthread + 968
frame #2: 0x0000000190304db4 libsystem_pthread.dylib`start_wqthread + 4
(lldb)
The exception and stack trace tell you that the store view controller isn't happy about being pushed into a nav stack. Your test shows it is happy being presented. From the documentation:
present the view controller modally from another view controller in your app
So, you should present it modally.
While it's possible that you could perhaps make it work in some other way it's likely to break in the future if you don't follow the (inconvenient) guidelines.
I recently get a strange problem, exception breakpoint can't catch objc_exception_throw. In this case, I can't locate where is the problem? Follow is stack strace:
(lldb) bt
* thread #7: tid = 0x40df6f, 0x00000001097a9b8a libobjc.A.dylib`objc_exception_throw, name = 'com.apple.NSURLConnectionLoader', stop reason = breakpoint 1.3 2.2
* frame #0: 0x00000001097a9b8a libobjc.A.dylib`objc_exception_throw
frame #1: 0x0000000109b749ad CoreFoundation`+[NSException raise:format:] + 205
frame #2: 0x00000001091abab7 Foundation`NSRequestConcreteImplementation + 240
frame #3: 0x00000001091b2da2 Foundation`-[NSStream(NSStream) streamStatus] + 39
frame #4: 0x0000000107ab011d CFNetwork`HTTPProtocol::useNetStreamInfoForRequest(MetaNetStreamInfo*, HTTPRequestMessage const*, unsigned char) + 311
frame #5: 0x0000000107abc561 CFNetwork`HTTPConnectionCacheEntry::dispatchConnectionToProtocol(HTTPNetConnection*, HTTPConnectionCacheEnqueuedRequestInfo*, unsigned char) + 265
frame #6: 0x0000000107abb67a CFNetwork`HTTPConnectionCacheEntry::ingestTube(Tube*) + 728
frame #7: 0x0000000107abf0d1 CFNetwork`___ZN24HTTPConnectionCacheEntry12newTubeReadyEP4TubeP9__CFError_block_invoke + 26
frame #8: 0x00000001079f7d16 CFNetwork`RunloopBlockContext::_invoke_block(void const*, void*) + 72
frame #9: 0x0000000109a7cb44 CoreFoundation`CFArrayApplyFunction + 68
frame #10: 0x00000001079f7bd7 CFNetwork`RunloopBlockContext::perform() + 133
frame #11: 0x00000001079f7a16 CFNetwork`MultiplexerSource::perform() + 256
frame #12: 0x00000001079f782c CFNetwork`MultiplexerSource::_perform(void*) + 72
frame #13: 0x0000000109aa9c91 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #14: 0x0000000109a9fb5d CoreFoundation`__CFRunLoopDoSources0 + 269
frame #15: 0x0000000109a9f194 CoreFoundation`__CFRunLoopRun + 868
frame #16: 0x0000000109a9ebc6 CoreFoundation`CFRunLoopRunSpecific + 470
frame #17: 0x0000000107a7d250 CFNetwork`+[NSURLConnection(Loader) _resourceLoadLoop:] + 434
frame #18: 0x00000001091201dd Foundation`__NSThread__main__ + 1194
frame #19: 0x000000010a874268 libsystem_pthread.dylib`_pthread_body + 131
frame #20: 0x000000010a8741e5 libsystem_pthread.dylib`_pthread_start + 176
frame #21: 0x000000010a87241d libsystem_pthread.dylib`thread_start + 13
Any suggestion will be appreciation!
I did not have this issue before. Every thing was working fine, but recently the UITextField in my every view controller crashes when I touch at it. It throws some exception like -[UITextField window]: message sent to deallocated instance 0x11843f80. I have properly set up the IBOutlet and actions, delegate for the UITextField. Until recently I did not have this problem but with addition of new view controller this problem has come across all the view controller that I am using. When I run lldb command to trace the application, the trace log shows something like this,
thread #1: tid = 0x1c03, 0x02fb3dee CoreFoundation`___forwarding___ + 206, stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
frame #0: 0x02fb3dee CoreFoundation`___forwarding___ + 206
frame #1: 0x02fb3cb2 CoreFoundation`_CF_forwarding_prep_0 + 50
frame #2: 0x00f6c592 UIKit`-[UITextSelectionView textSelectionViewActivated:] + 117
frame #3: 0x0195ea29 Foundation`__57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 40
frame #4: 0x03018855 CoreFoundation`___CFXNotificationPost_block_invoke_0 + 85
frame #5: 0x03018778 CoreFoundation`_CFXNotificationPost + 1976
frame #6: 0x018a319a Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 98
frame #7: 0x018afb03 Foundation`-[NSNotificationCenter postNotificationName:object:] + 55
frame #8: 0x00f6bcb3 UIKit`-[UITextSelectionView activate] + 83
frame #9: 0x00d428bb UIKit`-[UIFieldEditor becomeFieldEditorForView:] + 1523
frame #10: 0x00d2ff02 UIKit`-[UITextField _becomeFirstResponder] + 99
frame #11: 0x00d6e093 UIKit`-[UIResponder becomeFirstResponder] + 351
frame #12: 0x00f4d8fb UIKit`-[UITextInteractionAssistant setFirstResponderIfNecessary] + 208
frame #13: 0x00f4f5f8 UIKit`-[UITextInteractionAssistant oneFingerTap:] + 1989
frame #14: 0x00f47e29 UIKit`_UIGestureRecognizerSendActions + 143
frame #15: 0x00f47133 UIKit`-[UIGestureRecognizer _updateGestureWithEvent:] + 379
frame #16: 0x00f483bf UIKit`-[UIGestureRecognizer _delayedUpdateGesture] + 46
frame #17: 0x00f4aa21 UIKit`___UIGestureRecognizerUpdate_block_invoke_0541 + 57
frame #18: 0x00f4a97c UIKit`_UIGestureRecognizerApplyBlocksToArray + 277
frame #19: 0x00f433d7 UIKit`_UIGestureRecognizerUpdate + 1026
frame #20: 0x00ca81a2 UIKit`-[UIWindow _sendGesturesForEvent:] + 1121
frame #21: 0x00ca8532 UIKit`-[UIWindow sendEvent:] + 93
frame #22: 0x00c8edc4 UIKit`-[UIApplication sendEvent:] + 464
frame #23: 0x00c82634 UIKit`_UIApplicationHandleEvent + 8196
frame #24: 0x03451ef5 GraphicsServices`PurpleEventCallback + 1274
frame #25: 0x03021195 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
frame #26: 0x02f85ff2 CoreFoundation`__CFRunLoopDoSource1 + 146
frame #27: 0x02f848da CoreFoundation`__CFRunLoopRun + 2218
frame #28: 0x02f83d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #29: 0x02f83c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #30: 0x034507d8 GraphicsServices`GSEventRunModal + 190
frame #31: 0x0345088a GraphicsServices`GSEventRun + 103
frame #32: 0x00c80626 UIKit`UIApplicationMain + 1163
frame #33: 0x000a99bd Introdex`main + 141 at main.m:15
frame #34: 0x000029d5 Introdex`start + 53
thread #2: tid = 0x2103, 0x95de79ae libsystem_kernel.dylib`kevent + 10
frame #0: 0x95de79ae libsystem_kernel.dylib`kevent + 10
frame #1: 0x033f6372 libdispatch.dylib`_dispatch_mgr_invoke + 918
frame #2: 0x033f4be1 libdispatch.dylib`_dispatch_mgr_thread + 53
thread #4: tid = 0x2303, 0x95de691a libsystem_kernel.dylib`__psynch_mutexwait + 10
frame #0: 0x95de691a libsystem_kernel.dylib`__psynch_mutexwait + 10
frame #1: 0x969fa13b libsystem_c.dylib`pthread_mutex_lock + 595
frame #2: 0x070e475e WebCore`_WebTryThreadLock(bool) + 46
frame #3: 0x070e4455 WebCore`WebRunLoopLock(__CFRunLoopObserver*, unsigned long, void*) + 37
frame #4: 0x0302199e CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
frame #5: 0x02fb8640 CoreFoundation`__CFRunLoopDoObservers + 384
frame #6: 0x02f84635 CoreFoundation`__CFRunLoopRun + 1541
frame #7: 0x02f83d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #8: 0x02f83c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #9: 0x070e4420 WebCore`RunWebThread(void*) + 560
frame #10: 0x969f4557 libsystem_c.dylib`_pthread_start + 344
thread #8: tid = 0x2703, 0x95de47d2 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x95de47d2 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x95de3cb0 libsystem_kernel.dylib`mach_msg + 68
frame #2: 0x0302110a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x02f845d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x02f83d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x02f83c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x0199ce30 Foundation`+[NSURLConnection(Loader) _resourceLoadLoop:] + 398
frame #7: 0x018ae4d6 Foundation`-[NSThread main] + 76
frame #8: 0x018ae447 Foundation`__NSThread__main__ + 1258
frame #9: 0x969f4557 libsystem_c.dylib`_pthread_start + 344
thread #9: tid = 0x2803, 0x95de6be6 libsystem_kernel.dylib`select$DARWIN_EXTSN + 10
frame #0: 0x95de6be6 libsystem_kernel.dylib`select$DARWIN_EXTSN + 10
frame #1: 0x02fb57cb CoreFoundation`__CFSocketManager + 939
frame #2: 0x969f4557 libsystem_c.dylib`_pthread_start + 344
thread #10: tid = 0x2903, 0x95de47d2 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x95de47d2 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x95de3cb0 libsystem_kernel.dylib`mach_msg + 68
frame #2: 0x0302110a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x02f845d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x02f83d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x02f83c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x06df9f50 WebCore`WebCore::runLoaderThread(void*) + 176
frame #7: 0x086ce807 JavaScriptCore`WTF::threadEntryPoint(void*) + 71
frame #8: 0x969f4557 libsystem_c.dylib`_pthread_start + 344
thread #18: tid = 0x3103, 0x95de47d2 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x95de47d2 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x95de3cb0 libsystem_kernel.dylib`mach_msg + 68
frame #2: 0x0302110a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x02f845d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x02f83d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x02f83c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x018e240f Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
frame #7: 0x018e22d3 Foundation`-[NSRunLoop(NSRunLoop) run] + 76
frame #8: 0x0012853f Introdex`+[AFURLConnectionOperation networkRequestThreadEntryPoint:] + 111 at AFURLConnectionOperation.m:156
frame #9: 0x018ae4d6 Foundation`-[NSThread main] + 76
frame #10: 0x018ae447 Foundation`__NSThread__main__ + 1258
frame #11: 0x969f4557 libsystem_c.dylib`_pthread_start + 344
thread #21: tid = 0x3403, 0x95de70ee libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x95de70ee libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x969f704c libsystem_c.dylib`_pthread_workq_return + 45
frame #2: 0x969f6e19 libsystem_c.dylib`_pthread_wqthread + 448
What might me the issue here. Please if anyone could help me, I would really be glad.
Use Instruments for zombie. This will tell you what is really happening there.