I am working on a browser app in iOS. In UIWebview's function shouldstartloading I do the following.
I send an async request. wait untill I get response from server.
Then I set runLoop mode as [[NSRunLoop currentRunLoop] runMode:UITrackingRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.2]]; and NSDefaultRunLoopMode so that touch events can be received and processed and user does not feel its stuck.
But it often hangs at __psynch_mutexwait + 26
and control at that time stucks at [[NSRunLoop currentRunLoop] runMode:UITrackingRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.2]];
see code snipet
BOOL bDone = [object getRequestStatus:someRequest];
while (bDone == NO)
{
NSAutoreleasePool *p = [[NSAutoreleasePool alloc]init];
[[NSRunLoop currentRunLoop] runMode:UITrackingRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.2]];
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
[p release];
bDone = [object getRequestStatus:someRequest];
}
call stack
thread #1: tid = 0xe482, 0x0289f91a libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x0289f91a libsystem_kernel.dylib`__psynch_mutexwait + 10
frame #1: 0x0276019b libsystem_c.dylib`pthread_mutex_lock + 595
frame #2: 0x0881212c WebCore`_WebTryThreadLock(bool) + 44
frame #3: 0x088130ee WebCore`WebThreadLock + 94
frame #4: 0x013029be UIKit`-[UIWebDocumentView(Interaction) gestureRecognizerShouldBegin:] + 188
frame #5: 0x01459466 UIKit`-[UIGestureRecognizer _shouldBegin] + 1309
frame #6: 0x01455d89 UIKit`-[UIGestureRecognizer setState:] + 171
frame #7: 0x0146ac61 UIKit`-[UILongPressGestureRecognizer enoughTimeElapsed:] + 149
frame #8: 0x021f582b libobjc.A.dylib`-[NSObject performSelector:withObject:] + 70
frame #9: 0x0125b469 UIKit`-[UIDelayedAction timerFired:] + 83
frame #10: 0x00ce0de7 Foundation`__NSFireTimer + 97
frame #11: 0x03047ac6 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
frame #12: 0x030474ad CoreFoundation`__CFRunLoopDoTimer + 1181
frame #13: 0x0302f538 CoreFoundation`__CFRunLoopRun + 1816
frame #14: 0x0302e9d3 CoreFoundation`CFRunLoopRunSpecific + 467
frame #15: 0x0302e7eb CoreFoundation`CFRunLoopRunInMode + 123
frame #16: 0x00d06e35 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 284
frame #17: 0x000cc7ce myapp`-[Tab webView:shouldStartLoadWithRequest:navigationType:](self=0x0bd0a3f0, _cmd=0x018ca604, wV=0x0bd0b320, request=0x13eb62a0, navigationType=UIWebViewNavigationTypeOther) + 7054 at Tab.m:1082
frame #18: 0x0130f5a8 UIKit`-[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 318
frame #19: 0x01311b74 UIKit`-[UIWebViewWebViewDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 77
frame #20: 0x0307d91d CoreFoundation`__invoking___ + 29
frame #21: 0x0307d82a CoreFoundation`-[NSInvocation invoke] + 362
frame #22: 0x0307d9aa CoreFoundation`-[NSInvocation invokeWithTarget:] + 74
frame #23: 0x077f21dd WebKit`-[_WebSafeForwarder forwardInvocation:] + 157
frame #24: 0x030792da CoreFoundation`___forwarding___ + 458
frame #25: 0x030790ee CoreFoundation`__forwarding_prep_0___ + 14
frame #26: 0x07795711 WebKit`WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(void (WebCore::PolicyChecker::*)(WebCore::PolicyAction), WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>) + 225
frame #27: 0x083e9eeb WebCore`WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool), void*) + 1147
frame #28: 0x07cad932 WebCore`WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>) + 962
frame #29: 0x07cac94d WebCore`WebCore::FrameLoader::loadWithNavigationAction(WebCore::ResourceRequest const&, WebCore::NavigationAction const&, bool, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>) + 573
frame #30: 0x07caa4b3 WebCore`WebCore::FrameLoader::loadURL(WebCore::KURL const&, WTF::String const&, WTF::String const&, bool, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::FormState>) + 1299
frame #31: 0x07ca5a12 WebCore`WebCore::FrameLoader::loadFrameRequest(WebCore::FrameLoadRequest const&, bool, bool, WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::FormState>, WebCore::ShouldSendReferrer) + 722
frame #32: 0x07ca51cd WebCore`WebCore::FrameLoader::urlSelected(WebCore::FrameLoadRequest const&, WTF::PassRefPtr<WebCore::Event>, bool, bool, WebCore::ShouldSendReferrer, WebCore::ShouldReplaceDocumentIfJavaScriptURL) + 333
frame #33: 0x07ca4ef2 WebCore`WebCore::FrameLoader::changeLocation(WebCore::SecurityOrigin*, WebCore::KURL const&, WTF::String const&, bool, bool, bool) + 178
frame #34: 0x07be67b3 WebCore`WebCore::DOMWindow::createWindow(WTF::String const&, WTF::AtomicString const&, WebCore::WindowFeatures const&, WebCore::DOMWindow*, WebCore::Frame*, WebCore::Frame*, void (*)(WebCore::DOMWindow*, void*), void*) + 627
frame #35: 0x07be6eea WebCore`WebCore::DOMWindow::open(WTF::String const&, WTF::AtomicString const&, WTF::String const&, WebCore::DOMWindow*, WebCore::DOMWindow*) + 682
frame #36: 0x0802b1e7 WebCore`WebCore::JSDOMWindow::open(JSC::ExecState*) + 631
frame #37: 0x08022d03 WebCore`WebCore::jsDOMWindowPrototypeFunctionOpen(JSC::ExecState*) + 179
frame #38: 0x10b37d0f
frame #39: 0x0a2b1a7f JavaScriptCore`JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 591
frame #40: 0x0a18ea31 JavaScriptCore`JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 97
frame #41: 0x0a30841a JavaScriptCore`JSC::boundFunctionCall(JSC::ExecState*) + 682
frame #42: 0x10a69a0f
frame #43: 0x0a2b1a7f JavaScriptCore`JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 591
frame #44: 0x0a18ea31 JavaScriptCore`JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 97
frame #45: 0x07f60af6 WebCore`WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 198
frame #46: 0x0804af05 WebCore`WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 997
frame #47: 0x07c46030 WebCore`WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow>&) + 544
frame #48: 0x07c45c40 WebCore`WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 240
frame #49: 0x07c2a328 WebCore`WebCore::MouseOrFocusEventContext::handleLocalEvents(WebCore::Event*) const + 200
frame #50: 0x07c2b44c WebCore`WebCore::EventDispatcher::dispatch() + 1020
frame #51: 0x0839a9f0 WebCore`WebCore::MouseEventDispatchMediator::dispatchEvent(WebCore::EventDispatcher*) const + 560
frame #52: 0x07c2a3fa WebCore`WebCore::EventDispatcher::dispatchEvent(WebCore::Node*, WTF::PassRefPtr<WebCore::EventDispatchMediator>) + 138
frame #53: 0x083b0111 WebCore`WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 97
frame #54: 0x07c45a51 WebCore`WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, int&) + 113
frame #55: 0x08147148 WebCore`WebCore::jsNodePrototypeFunctionDispatchEvent(JSC::ExecState*) + 280
frame #56: 0x10add30f
frame #57: 0x0a2b1a7f JavaScriptCore`JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 591
frame #58: 0x0a18ea31 JavaScriptCore`JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 97
frame #59: 0x07f60af6 WebCore`WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 198
frame #60: 0x0804af05 WebCore`WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 997
frame #61: 0x07c46030 WebCore`WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow>&) + 544
frame #62: 0x07c45c40 WebCore`WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 240
frame #63: 0x07c2a0d8 WebCore`WebCore::EventContext::handleLocalEvents(WebCore::Event*) const + 88
frame #64: 0x07c2b44c WebCore`WebCore::EventDispatcher::dispatch() + 1020
frame #65: 0x07c2bb41 WebCore`WebCore::EventDispatchMediator::dispatchEvent(WebCore::EventDispatcher*) const + 17
frame #66: 0x07c2a3fa WebCore`WebCore::EventDispatcher::dispatchEvent(WebCore::Node*, WTF::PassRefPtr<WebCore::EventDispatchMediator>) + 138
frame #67: 0x083b0153 WebCore`WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 163
frame #68: 0x07c45a51 WebCore`WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, int&) + 113
frame #69: 0x07c36ca2 WebCore`WebCore::EventHandler::dispatchTouchEvent(WebCore::PlatformTouchEvent const&, WTF::AtomicString const&, WTF::HashMap<WebCore::EventTarget*, WTF::Vector<WTF::RefPtr<WebCore::Touch>, 0ul, WTF::CrashOnOverflow>*, WTF::PtrHash<WebCore::EventTarget*>, WTF::HashTraits<WebCore::EventTarget*>, WTF::HashTraits<WTF::Vector<WTF::RefPtr<WebCore::Touch>, 0ul, WTF::CrashOnOverflow>*> > const&, float, float) + 914
frame #70: 0x07c38cc7 WebCore`WebCore::EventHandler::handleTouchEvent(WebCore::PlatformTouchEvent const&) + 6519
frame #71: 0x07c34ff2 WebCore`WebCore::EventHandler::touchEvent(WebEvent*) + 66
frame #72: 0x077b32b0 WebKit`-[WebHTMLView touch:] + 80
frame #73: 0x087fbe9c WebCore`-[WAKView _selfHandleEvent:] + 124
frame #74: 0x087fbdf3 WebCore`-[WAKView handleEvent:] + 67
frame #75: 0x087ff23d WebCore`-[WAKWindow sendEventSynchronously:] + 349
frame #76: 0x01590278 UIKit`-[UIWebBrowserView _dispatchWebEvent:] + 88
frame #77: 0x0159074c UIKit`-[UIWebBrowserView _webTouchEventsRecognized:] + 499
frame #78: 0x021f582b libobjc.A.dylib`-[NSObject performSelector:withObject:] + 70
frame #79: 0x0130add8 UIKit`-[UIWebTouchEventsGestureRecognizer _processTouches:withEvent:type:] + 385
frame #80: 0x0130b04a UIKit`-[UIWebTouchEventsGestureRecognizer touchesEnded:withEvent:] + 77
frame #81: 0x010fd843 UIKit`-[UIWindow _sendGesturesForEvent:] + 756
frame #82: 0x010fe971 UIKit`-[UIWindow sendEvent:] + 1021
frame #83: 0x010d05f2 UIKit`-[UIApplication sendEvent:] + 242
frame #84: 0x010ba353 UIKit`_UIApplicationHandleEventQueue + 11455
frame #85: 0x0301277f CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
frame #86: 0x0301210b CoreFoundation`__CFRunLoopDoSources0 + 235
frame #87: 0x0302f1ae CoreFoundation`__CFRunLoopRun + 910
frame #88: 0x0302e9d3 CoreFoundation`CFRunLoopRunSpecific + 467
frame #89: 0x0302e7eb CoreFoundation`CFRunLoopRunInMode + 123
frame #90: 0x040445ee GraphicsServices`GSEventRunModal + 192
frame #91: 0x0404442b GraphicsServices`GSEventRun + 104
frame #92: 0x010bcf9b UIKit`UIApplicationMain + 1225
frame #93: 0x00005cf8 myapp`main(argc=1, argv=0xbfffed78) + 152 at main.m:15
Related
When I use WebTRTC Video, I got the delegate method, And I got the RTCICEGatheringState == RTCICEGatheringComplete, then Crashed. Please help me.
peerConnection:(RTCPeerConnection *)peerConnection iceGatheringChanged:(RTCICEGatheringState)newState
* thread #28, name = 'Thread 0x0x10a706e70', stop reason = breakpoint 2.1
frame #0: 0x00000001864085a4 libsystem_malloc.dylib`malloc_error_break
frame #1: 0x00000001864081bc libsystem_malloc.dylib`nano_common_error + 240
* frame #2: 0x00000001863fc890 libsystem_malloc.dylib`nanov2_allocate_from_block$VARIANT$mp + 548
frame #3: 0x00000001863fbc1c libsystem_malloc.dylib`nanov2_allocate$VARIANT$mp + 176
frame #4: 0x00000001863fbb1c libsystem_malloc.dylib`nanov2_malloc$VARIANT$mp + 60
frame #5: 0x00000001863f7828 libsystem_malloc.dylib`malloc_zone_malloc + 156
frame #6: 0x00000001863f8c0c libsystem_malloc.dylib`malloc + 32
frame #7: 0x0000000103366954 qim_appstore`bn_wexpand + 84
frame #8: 0x000000010336f0d4 qim_appstore`BN_lshift + 84
frame #9: 0x0000000103367ee4 qim_appstore`BN_div + 384
frame #10: 0x0000000103368320 qim_appstore`BN_nnmod + 52
frame #11: 0x00000001033684ac qim_appstore`BN_mod_mul + 132
frame #12: 0x00000001033857e8 qim_appstore`ec_GFp_simple_is_on_curve + 260
frame #13: 0x000000010337ad8c qim_appstore`EC_POINT_set_affine_coordinates_GFp + 112
frame #14: 0x000000010337a778 qim_appstore`EC_GROUP_new_by_curve_name + 664
frame #15: 0x000000010337bd44 qim_appstore`EC_KEY_new_by_curve_name + 40
frame #16: 0x000000010338b240 qim_appstore`eckey_type2param + 92
frame #17: 0x000000010338aa70 qim_appstore`eckey_pub_decode + 92
frame #18: 0x00000001033a6d1c qim_appstore`X509_PUBKEY_get + 148
frame #19: 0x00000001033b5ff4 qim_appstore`ssl3_get_server_certificate + 468
frame #20: 0x00000001033b2114 qim_appstore`dtls1_connect + 1160
frame #21: 0x000000010351d8f0 qim_appstore`rtc::OpenSSLStreamAdapter::ContinueSSL() + 164
frame #22: 0x000000010351d59c qim_appstore`rtc::OpenSSLStreamAdapter::OnEvent(rtc::StreamInterface*, int, int) + 572
frame #23: 0x0000000103526860 qim_appstore`sigslot::signal3<rtc::StreamInterface*, int, int, sigslot::single_threaded>::operator()(rtc::StreamInterface*, int, int) + 96
frame #24: 0x000000010353a928 qim_appstore`cricket::StreamInterfaceChannel::OnPacketReceived(char const*, unsigned long) + 60
frame #25: 0x000000010353d108 qim_appstore`cricket::DtlsTransportChannelWrapper::HandleDtlsPacket(char const*, unsigned long) + 84
frame #26: 0x000000010353af3c qim_appstore`cricket::DtlsTransportChannelWrapper::OnReadPacket(cricket::TransportChannel*, char const*, unsigned long, rtc::PacketTime const&, int) + 88
frame #27: 0x000000010353d084 qim_appstore`sigslot::signal5<cricket::TransportChannel*, char const*, unsigned long, rtc::PacketTime const&, int, sigslot::single_threaded>::operator()(cricket::TransportChannel*, char const*, unsigned long, rtc::PacketTime const&, int) + 116
frame #28: 0x0000000103541264 qim_appstore`cricket::P2PTransportChannel::OnReadPacket(cricket::Connection*, char const*, unsigned long, rtc::PacketTime const&) + 84
frame #29: 0x000000010354ce90 qim_appstore`sigslot::signal4<cricket::Connection*, char const*, unsigned long, rtc::PacketTime const&, sigslot::single_threaded>::operator()(cricket::Connection*, char const*, unsigned long, rtc::PacketTime const&) + 108
frame #30: 0x000000010354ca54 qim_appstore`cricket::Connection::OnReadPacket(char const*, unsigned long, rtc::PacketTime const&) + 216
frame #31: 0x00000001035784a4 qim_appstore`cricket::UDPPort::HandleIncomingPacket(rtc::AsyncPacketSocket*, char const*, unsigned long, rtc::SocketAddress const&, rtc::PacketTime const&) + 12
frame #32: 0x000000010350b0dc qim_appstore`sigslot::signal5<rtc::AsyncPacketSocket*, char const*, unsigned long, rtc::SocketAddress const&, rtc::PacketTime const&, sigslot::single_threaded>::operator()(rtc::AsyncPacketSocket*, char const*, unsigned long, rtc::SocketAddress const&, rtc::PacketTime const&) + 116
frame #33: 0x000000010350b608 qim_appstore`rtc::AsyncUDPSocket::OnReadEvent(rtc::AsyncSocket*) + 112
frame #34: 0x0000000103523090 qim_appstore`sigslot::signal1<rtc::AsyncSocket*, sigslot::multi_threaded_local>::ope
rator()(rtc::AsyncSocket*) + 76
frame #35: 0x00000001035202b0 qim_appstore`rtc::SocketDispatcher:
:OnEvent(unsigned int, int) + 120
frame #36: 0x0000000103520a9c qim_appstore`rtc::PhysicalSocketServer::Wait(int, bool) + 852
frame #37: 0x0000000103513804 qim_appstore`rtc::MessageQueue::Get(rtc::Message*, int, bool) + 816
frame #38: 0x0000000103527d70 qim_appstore`rtc::Thread::ProcessMessages(int) + 108
frame #39: 0x0000000103527bfc qim_appstore`rtc::Thread::PreRun(void*) + 112
frame #40: 0x000000018643b1e4 libsystem_pthread.dylib`_pthread_body + 128
frame #41: 0x000000018643b164 libsystem_pthread.dylib`_pthread_start + 40
frame #42: 0x000000018643a070 libsystem_pthread.dylib`thread_start + 4
I have an app which contains a WebView using Bootstrap. The app previously worked fine on iOS 8 & 9 when compiled with Xcode 6 and Swift 1.2, but having upgraded to Xcode 7 and Swift 2.0, for some reason the app keeps crashing.
Curiously, I have traced the cause of the crash to the inclusion of <link href="css/bootstrap.min.css" rel="stylesheet"> in my HTML in the WebView (the HTML file, along with bootstrap.min.css is loaded locally from the app bundle). As soon as I comment-out the <link> tag, it works fine.
The backtrace I get is as follows:
* thread #16: tid = 0xa95c2, 0x00000001975927d4 libc++abi.dylib`__cxa_throw, name = 'WebThread', stop reason = breakpoint 1.2
* frame #0: 0x00000001975927d4 libc++abi.dylib`__cxa_throw
frame #1: 0x000000018cf38728 libType1Scaler.dylib`TType1LWFNMultipleMasterHFMXTable::TType1LWFNMultipleMasterHFMXTable(TFontObjectSurrogate const&, int, short, short, int*) + 132
frame #2: 0x000000018cf38638 libType1Scaler.dylib`TType1LWFNFont::CreateHFMXTable() const + 96
frame #3: 0x000000018cf385c4 libType1Scaler.dylib`TType1HFMXTableSurrogate::TType1HFMXTableSurrogate(TType1PSFont const&) + 48
frame #4: 0x000000018cf37e6c libType1Scaler.dylib`TType1PSFont::GetFontInstanceSpec(TType1Transform const&, FixedPoint&, FixedPoint&, FixedPoint&, FixedPoint&, FixedPoint&, FixedRectangle&, FontMetrics&) const + 520
frame #5: 0x000000018cf37bdc libType1Scaler.dylib`TType1Strike::GetSpecs(StrikeSpecs&) const + 112
frame #6: 0x000000018cf31584 libType1Scaler.dylib`Type1GetStrikeSpecs(unsigned int, TStrikeDescription const*, StrikeSpecs*) + 48
frame #7: 0x000000018ce34bc0 libFontParser.dylib`TConcreteFontScaler::GetFontInfo(FPFontInfo*) const + 60
frame #8: 0x000000018ce0eea4 libFontParser.dylib`TFPFont::FillFontInfo(TFPFontInfo&) const + 200
frame #9: 0x000000018ce0ed90 libFontParser.dylib`TFPFont::GetFontInfo() const + 56
frame #10: 0x000000018ce0ed4c libFontParser.dylib`FPFontIsMonospaced + 12
frame #11: 0x00000001836cd468 libCGXType.A.dylib`get_font_info + 56
frame #12: 0x000000018356e314 CoreGraphics`get_font_info + 72
frame #13: 0x00000001835717e4 CoreGraphics`CGFontGetNumberOfGlyphs + 12
frame #14: 0x0000000183ddb7f4 CoreText`TBaseFont::CopyGraphicsFont() const + 52
frame #15: 0x0000000183e8b500 CoreText`TBaseFont::CopyTable(unsigned int) const + 212
frame #16: 0x0000000183ddf4ac CoreText`TBaseFont::GetCmapTable() const + 60
frame #17: 0x0000000183ddf284 CoreText`TBaseFont::GetUnicodeEncoding() const + 64
frame #18: 0x0000000183e86e54 CoreText`TBaseFont::GetUnicodeCmapSubHeader(void const**) const + 40
frame #19: 0x0000000183de1074 CoreText`TBaseFont::CopyCharacterSet() const + 212
frame #20: 0x0000000183e0b3c0 CoreText`TBaseFont::GetCharacterSetInternal() const + 44
frame #21: 0x0000000183e48ac4 CoreText`CompareCharSet(__CFCharacterSet const*, TBaseFont const*) + 24
frame #22: 0x0000000183e00260 CoreText`TDescriptorSource::CopyDescriptorsForRequestFromArray(__CFArray const*, __CFDictionary const*, CFComparisonResult (*)(void const*, void const*, void*), void*, unsigned long, bool) const + 1040
frame #23: 0x0000000183e4c7a0 CoreText`TDescriptorSource::CopyDescriptorsForRequest(__CFDictionary const*, __CFSet const*, CFComparisonResult (*)(void const*, void const*, void*), void*, unsigned long, TCFRef<__CFArray const*>*) const + 2044
frame #24: 0x0000000183e4bcb4 CoreText`TDescriptorSource::CopySystemWideFallbackDescriptorForCharacters(TBaseFont const&, unsigned short const*, long, UIFontFlag, TCFRef<__CFArray const*>*) const + 616
frame #25: 0x0000000183e8b0c4 CoreText`TBaseFont::CreateDescriptorForCharacters(__CFArray const*, UIFontFlag, unsigned short const*, long, long&) const + 360
frame #26: 0x0000000183e3a850 CoreText`TFont::InitDescriptor(TFont const&, unsigned short const*, long, __CFString const*, long&) + 328
frame #27: 0x0000000183e31b10 CoreText`CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage + 144
frame #28: 0x0000000195262478 WebCore`WebCore::FontCache::systemFallbackForCharacters(WebCore::FontDescription const&, WebCore::Font const*, bool, unsigned short const*, unsigned int) + 356
frame #29: 0x000000019525eaa4 WebCore`WebCore::Font::systemFallbackFontForCharacter(int, WebCore::FontDescription const&, bool) const + 528
frame #30: 0x000000019526d920 WebCore`WebCore::FontCascadeFonts::glyphDataForSystemFallback(int, WebCore::FontDescription const&, WebCore::FontVariant) + 100
frame #31: 0x000000019526e76c WebCore`WebCore::FontCascadeFonts::glyphDataForCharacter(int, WebCore::FontDescription const&, WebCore::FontVariant) + 772
frame #32: 0x0000000194e042e0 WebCore`unsigned int WebCore::WidthIterator::advanceInternal<WebCore::SurrogatePairAwareTextIterator>(WebCore::SurrogatePairAwareTextIterator&, WebCore::GlyphBuffer*) + 564
frame #33: 0x0000000194e0408c WebCore`WebCore::WidthIterator::advance(int, WebCore::GlyphBuffer*) + 136
frame #34: 0x0000000195265770 WebCore`WebCore::FontCascade::floatWidthForSimpleText(WebCore::TextRun const&, WTF::HashSet<WebCore::Font const*, WTF::PtrHash<WebCore::Font const*>, WTF::HashTraits<WebCore::Font const*> >*, WebCore::GlyphOverflow*) const + 248
frame #35: 0x0000000195265634 WebCore`WebCore::FontCascade::width(WebCore::TextRun const&, WTF::HashSet<WebCore::Font const*, WTF::PtrHash<WebCore::Font const*>, WTF::HashTraits<WebCore::Font const*> >*, WebCore::GlyphOverflow*) const + 396
frame #36: 0x0000000195983e48 WebCore`WebCore::RenderText::computePreferredLogicalWidths(float, WTF::HashSet<WebCore::Font const*, WTF::PtrHash<WebCore::Font const*>, WTF::HashTraits<WebCore::Font const*> >&, WebCore::GlyphOverflow&) + 1532
frame #37: 0x0000000194ec893c WebCore`WebCore::RenderText::computePreferredLogicalWidths(float) + 48
frame #38: 0x0000000194ec8294 WebCore`WebCore::RenderText::trimmedPrefWidths(float, float&, bool&, float&, bool&, bool&, bool&, float&, float&, float&, float&, bool&) + 160
frame #39: 0x00000001958a9f5c WebCore`WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths(WebCore::LayoutUnit&, WebCore::LayoutUnit&) const + 5372
frame #40: 0x00000001958a87dc WebCore`WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths(WebCore::LayoutUnit&, WebCore::LayoutUnit&) const + 76
frame #41: 0x0000000194ec0e3c WebCore`WebCore::RenderBlock::computePreferredLogicalWidths() + 336
frame #42: 0x0000000194eb9a24 WebCore`WebCore::RenderBox::minPreferredLogicalWidth() const + 40
frame #43: 0x00000001958a8c2c WebCore`WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths(WebCore::LayoutUnit&, WebCore::LayoutUnit&) const + 460
frame #44: 0x00000001958a87dc WebCore`WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths(WebCore::LayoutUnit&, WebCore::LayoutUnit&) const + 76
frame #45: 0x0000000194ec0e3c WebCore`WebCore::RenderBlock::computePreferredLogicalWidths() + 336
frame #46: 0x0000000194eb9a24 WebCore`WebCore::RenderBox::minPreferredLogicalWidth() const + 40
frame #47: 0x0000000194e18f18 WebCore`WebCore::RenderBox::computeLogicalWidthInRegionUsing(WebCore::SizeType, WebCore::Length, WebCore::LayoutUnit, WebCore::RenderBlock const*, WebCore::RenderRegion*) const + 628
frame #48: 0x0000000194e10bdc WebCore`WebCore::RenderBox::computeLogicalWidthInRegion(WebCore::RenderBox::LogicalExtentComputedValues&, WebCore::RenderRegion*) const + 1360
frame #49: 0x0000000194e105f8 WebCore`WebCore::RenderBox::updateLogicalWidth() + 40
frame #50: 0x000000019589b978 WebCore`WebCore::RenderBlock::recomputeLogicalWidth() + 60
frame #51: 0x00000001958aa83c WebCore`WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) + 96
frame #52: 0x0000000194e0fecc WebCore`WebCore::RenderBlock::layout() + 72
frame #53: 0x00000001958bdca8 WebCore`WebCore::RenderBlockFlow::layoutLineBoxes(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 1308
frame #54: 0x00000001958aaba0 WebCore`WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) + 964
frame #55: 0x0000000194e0fecc WebCore`WebCore::RenderBlock::layout() + 72
frame #56: 0x00000001958aca5c WebCore`WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&, WebCore::RenderBlockFlow::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 880
frame #57: 0x00000001958ab8a4 WebCore`WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&) + 496
frame #58: 0x00000001958aab18 WebCore`WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) + 828
frame #59: 0x0000000194e0fecc WebCore`WebCore::RenderBlock::layout() + 72
frame #60: 0x00000001958aca5c WebCore`WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&, WebCore::RenderBlockFlow::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 880
frame #61: 0x00000001958ab8a4 WebCore`WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&) + 496
frame #62: 0x00000001958aab18 WebCore`WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) + 828
frame #63: 0x0000000194e0fecc WebCore`WebCore::RenderBlock::layout() + 72
frame #64: 0x00000001958aca5c WebCore`WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&, WebCore::RenderBlockFlow::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 880
frame #65: 0x00000001958ab8a4 WebCore`WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&) + 496
frame #66: 0x00000001958aab18 WebCore`WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) + 828
frame #67: 0x0000000194e0fecc WebCore`WebCore::RenderBlock::layout() + 72
frame #68: 0x00000001958aca5c WebCore`WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&, WebCore::RenderBlockFlow::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 880
frame #69: 0x00000001958ab8a4 WebCore`WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&) + 496
frame #70: 0x00000001958aab18 WebCore`WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) + 828
frame #71: 0x0000000194e0fecc WebCore`WebCore::RenderBlock::layout() + 72
frame #72: 0x0000000194e6c6d4 WebCore`WebCore::RenderView::layout() + 896
frame #73: 0x0000000194e6ace8 WebCore`WebCore::FrameView::layout(bool) + 2832
frame #74: 0x0000000195172c90 WebCore`WebCore::Document::updateLayoutIfDimensionsOutOfDate(WebCore::Element&, WebCore::DimensionsCheck) + 1312
frame #75: 0x0000000194ed27fc WebCore`WebCore::Element::offsetWidth() + 40
frame #76: 0x000000019552ca48 WebCore`WebCore::jsElementOffsetWidth(JSC::ExecState*, JSC::JSObject*, long long, JSC::PropertyName) + 48
frame #77: 0x000000018495f35c JavaScriptCore`llint_slow_path_get_by_id + 1960
frame #78: 0x0000000184da6820 JavaScriptCore`llint_entry + 9936
frame #79: 0x0000000184da9f84 JavaScriptCore`llint_entry + 24116
frame #80: 0x0000000184da9db4 JavaScriptCore`llint_entry + 23652
frame #81: 0x0000000184da9db4 JavaScriptCore`llint_entry + 23652
frame #82: 0x0000000184da9db4 JavaScriptCore`llint_entry + 23652
frame #83: 0x0000000184da3f38 JavaScriptCore`vmEntryToJavaScript + 312
frame #84: 0x0000000184cd0c84 JavaScriptCore`JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 180
frame #85: 0x000000018496adc4 JavaScriptCore`JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 400
frame #86: 0x0000000184a7a37c JavaScriptCore`JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 80
frame #87: 0x0000000194f5382c WebCore`WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 828
frame #88: 0x0000000195233e18 WebCore`WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow, 16ul>&) + 696
frame #89: 0x0000000194e60d14 WebCore`WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 328
frame #90: 0x0000000195228a50 WebCore`WebCore::EventContext::handleLocalEvents(WebCore::Event&) const + 112
frame #91: 0x00000001952296cc WebCore`WebCore::EventDispatcher::dispatchEvent(WebCore::Node*, WTF::PassRefPtr<WebCore::Event>) + 904
frame #92: 0x0000000194e60a80 WebCore`WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 36
frame #93: 0x0000000194e65fe0 WebCore`WebCore::Document::finishedParsing() + 156
frame #94: 0x0000000194e628dc WebCore`WebCore::HTMLDocumentParser::prepareToStopParsing() + 172
frame #95: 0x0000000194ea1a20 WebCore`WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution() + 376
frame #96: 0x00000001953191f4 WebCore`non-virtual thunk to WebCore::HTMLDocumentParser::notifyFinished(WebCore::CachedResource*) + 100
frame #97: 0x0000000194e9d734 WebCore`WebCore::CachedResource::checkNotify() + 284
frame #98: 0x0000000194e9d500 WebCore`WebCore::SubresourceLoader::didFinishLoading(double) + 1020
frame #99: 0x0000000182a07488 CFNetwork`___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 100
frame #100: 0x0000000182af5ad4 CFNetwork`___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 108
frame #101: 0x0000000101635d30 libdispatch.dylib`_dispatch_client_callout + 16
frame #102: 0x000000010163f47c libdispatch.dylib`_dispatch_block_invoke + 564
frame #103: 0x00000001829f3c70 CFNetwork`RunloopBlockContext::_invoke_block(void const*, void*) + 36
frame #104: 0x00000001831e87ec CoreFoundation`CFArrayApplyFunction + 68
frame #105: 0x00000001829f3b54 CFNetwork`RunloopBlockContext::perform() + 136
frame #106: 0x00000001829f3a14 CFNetwork`MultiplexerSource::perform() + 312
frame #107: 0x00000001829f3840 CFNetwork`MultiplexerSource::_perform(void*) + 68
frame #108: 0x00000001832bc5a4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
frame #109: 0x00000001832bbfb8 CoreFoundation`__CFRunLoopDoSources0 + 412
frame #110: 0x00000001832b9d38 CoreFoundation`__CFRunLoopRun + 724
frame #111: 0x00000001831e8dc0 CoreFoundation`CFRunLoopRunSpecific + 384
frame #112: 0x0000000194e51aa0 WebCore`RunWebThread(void*) + 456
frame #113: 0x000000019890bb3c libsystem_pthread.dylib`_pthread_body + 156
frame #114: 0x000000019890baa0 libsystem_pthread.dylib`_pthread_start + 156
It does appear to be something wrong with the font rendering, but I'm not sure what it could be, I'm not doing anything particularly unusual, just displaying locally bundled HTML content with Bootstrap!
UPDATE 20 OCT 15:
I have now narrowed this down to the use of certain Glyphicons. For example glyphicon-asterisk and glyphicon-user work fine, but using glyphicon-share-alt causes the whole app to crash every time, with the above backtrace.
I've not managed to find a solution, other than to restrict my use of Glyphicons. Is anyone else experiencing this issue and does anyone have any suggestions?
I'm using Boostrap v3.3.5
My app is in app store which supports iOS 7.1.2 to iOS 8.4 and it is working fine till 8.4 version. When I tried to run the same app on iOS 9 beta 5 its getting crashed.It was working fine in iOS 9 beta 4. After debugging I found that the crash is due to the custom font we have used in our app. Is this the problem with iOs 9 beta 5 ? What should I do to support my app on iOS 9.0 main release which will be expecting in a week.
Below is the stack trace of crash
thread #1: tid = 0x6d68, 0x0000000184d6e1a4 CoreTextOTL::GPOS::ApplyPairPos(OTL::LookupSubtable const*,
OTL::TGlyphIterator&, OTL::Coverage const&) const + 636, queue =
'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1,
address=0x3020451cc)
frame #0: 0x0000000184d6e1a4 CoreTextOTL::GPOS::ApplyPairPos(OTL::LookupSubtable const*,
OTL::TGlyphIterator&, OTL::Coverage const&) const + 636
frame #1: 0x0000000184d72b14 CoreTextOTL::GPOS::ApplyLookupSubtable(OTL::Lookup const&, unsigned
int, OTL::LookupSubtable const*, OTL::TGlyphIterator&, OTL::Coverage
const&) const + 116
frame #2: 0x0000000184d81690 CoreTextOTL::GPOS::ApplyLookups(TRunGlue&, int, OTL::GlyphLookups&)
const + 544
frame #3: 0x0000000184d80dc0 CoreTextTOpenTypePositioningEngine::PositionRuns(SyncState&,
KerningStatus&) + 628
frame #4: 0x0000000184cea7b4 CoreTextTKerningEngine::PositionGlyphs(TRunGlue&, ShapingType,
AnnexTableFlag) + 188
frame #5: 0x0000000184ce90a4 CoreTextCTFontTransformGlyphs + 440
frame #6: 0x000000019504c85c UIFoundation__NSStringDrawingEngine + 8788
frame #7: 0x000000019504a5bc UIFoundation-[NSString(NSExtendedStringDrawing)
boundingRectWithSize:options:attributes:context:] + 156
frame #8: 0x0000000189731724 UIKit-[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 780
frame #9: 0x000000018973137c UIKit-[UILabel _intrinsicSizeWithinSize:] + 132
frame #10: 0x000000018982c548 UIKit-[UILabel intrinsicContentSize] + 72
frame #11: 0x000000018982c3a8 UIKit-[UIView(UIConstraintBasedLayout)
_generateContentSizeConstraints] + 48
frame #12: 0x000000018982bdbc UIKit-[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints]
588
frame #13: 0x0000000189827e5c UIKit-[UIView(AdditionalLayoutSupport) updateConstraints] + 244
frame #14: 0x000000018982bb60 UIKit-[UILabel updateConstraints] + 220
frame #15: 0x0000000189f28c8c UIKit`-[UIView(AdditionalLayoutSupport)
_internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:]
460
frame #16: 0x0000000189f28ef4 UIKit`-[UIView(AdditionalLayoutSupport)
_updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:]
200
frame #17: 0x0000000189f28bbc UIKit`-[UIView(AdditionalLayoutSupport)
_internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:]
252
frame #18: 0x00000001850b0c00 Foundation-[NSISEngine withBehaviors:performModifications:] + 168
frame #19: 0x000000018982ab78 UIKit-[UIView(AdditionalLayoutSupport)
_withAutomaticEngineOptimizationDisabledIfEngineExists:] + 64
frame #20: 0x0000000189f28ec8 UIKit`-[UIView(AdditionalLayoutSupport)
_updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:]
156
frame #21: 0x0000000189f28bbc UIKit`-[UIView(AdditionalLayoutSupport)
_internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:]
252
frame #22: 0x0000000189f28ef4 UIKit`-[UIView(AdditionalLayoutSupport)
_updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:]
200
frame #23: 0x000000018982ba5c UIKit__60-[UIView(AdditionalLayoutSupport)
updateConstraintsIfNeeded]_block_invoke + 100
frame #24: 0x00000001850b0c00 Foundation-[NSISEngine withBehaviors:performModifications:] + 168
frame #25: 0x000000018982ab78 UIKit-[UIView(AdditionalLayoutSupport)
_withAutomaticEngineOptimizationDisabledIfEngineExists:] + 64
frame #26: 0x000000018982b690 UIKit-[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded] +
244
frame #27: 0x0000000189848094 UIKit-[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded] +
108
frame #28: 0x0000000189f29598 UIKit-[UIView(AdditionalLayoutSupport)
_updateConstraintsAtEngineLevelIfNeeded] + 268
frame #29: 0x0000000189a27808 UIKit-[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 176
frame #30: 0x0000000189722640 UIKit-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 688
frame #31: 0x0000000188f31f14 QuartzCore-[CALayer layoutSublayers] + 148
frame #32: 0x0000000188f2cb20 QuartzCoreCA::Layer::layout_if_needed(CA::Transaction*) + 292
frame #33: 0x0000000188f2c9e0 QuartzCoreCA::Layer::layout_and_display_if_needed(CA::Transaction*) +
32
frame #34: 0x0000000188f2c07c QuartzCoreCA::Context::commit_transaction(CA::Transaction*) + 252
frame #35: 0x0000000188f2bdd0 QuartzCoreCA::Transaction::commit() + 516
frame #36: 0x0000000188f254bc QuartzCoreCA::Transaction::observer_callback(CFRunLoopObserver*,
unsigned long, void*) + 80
frame #37: 0x00000001841cc768 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION
32
frame #38: 0x00000001841ca50c CoreFoundation__CFRunLoopDoObservers + 372
frame #39: 0x00000001840f98c0 CoreFoundationCFRunLoopRunSpecific + 416
frame #40: 0x00000001897931ec UIKit-[UIApplication _run] + 460
frame #41: 0x000000018978e0d4 UIKitUIApplicationMain + 204 * frame #42: 0x000000010004eb08 SampleFontmain(argc=1,
argv=0x000000016fdb7af0) + 124 at main.m:14
frame #43: 0x00000001994ae8b8 libdyld.dylibstart + 4
I am getting a rather peculiar issue of EXC_BAD_ACCESS. In an inventory based app, when creating a receipt..the app works fine if the vehicle already exists in the database and crashes when a receipt with new vehicle is being viewed.
I tried to run the app with NSZombieEnabled but nothing gets logged onto the console when the app crashes except lldb.
So the question is that if NSZombieEnabled does not work, how do I determine what is causing the crash in an app.
I am running Xcode 5 (latest version) for development.
Edit On running bt in command prompt..here's the backtrace I get
(lldb) bt
* thread #1: tid = 0x16915d, 0x006e427f OpenGLES`+[EAGLContext setCurrentContext:] + 80, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xc)
frame #0: 0x006e427f OpenGLES`+[EAGLContext setCurrentContext:] + 80
frame #1: 0x0c725f2a CoreImage`CIEAGLContextTexImageIOSurface + 389
frame #2: 0x0c70b6a8 CoreImage`CI::GLESTextureManager::attach_IOSurface(__IOSurface*, bool, int, unsigned int, int, int, int, bool) + 950
frame #3: 0x0c70f6ab CoreImage`CI::GLESContext::bind_surface(__IOSurface*, int, bool, bool, bool) + 261
frame #4: 0x0c70ec6a CoreImage`CI::GLESContext::bind_textures(CI::SerialObjectPtrArray*, CI::Kernel*) + 336
frame #5: 0x0c70e7a7 CoreImage`CI::GLESContext::render_apply_node(CI::Node const*, bool) + 151
frame #6: 0x0c70e5bb CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 697
frame #7: 0x0c70e498 CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 406
frame #8: 0x0c70e36b CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 105
frame #9: 0x0c70e498 CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 406
frame #10: 0x0c70e36b CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 105
frame #11: 0x0c70f068 CoreImage`CI::GLESContext::render(CI::Node*) + 176
frame #12: 0x0c71bfa9 CoreImage`CI::image_get_cgimage(CI::Context*, CI::Image*, CGRect, CGColorSpace*, CI::PixelFormat) + 2069
frame #13: 0x0c6f41c3 CoreImage`-[CIContext createCGImage:fromRect:format:colorSpace:] + 671
frame #14: 0x0c6f3eb6 CoreImage`-[CIContext createCGImage:fromRect:] + 99
frame #15: 0x0c55a82f CoreUI`-[CUITextEffectStack drawProcessedMask:atBounds:inContext:withScale:] + 909
frame #16: 0x0c55b8dd CoreUI`-[CUITextEffectStack drawGlyphs:inContext:usingFont:atPositions:count:lineHeight:inBounds:atScale:] + 540
frame #17: 0x0c565460 CoreUI`-[CUICatalog drawGlyphs:atPositions:inContext:withFont:count:stylePresetName:styleConfiguration:foregroundColor:] + 1770
frame #18: 0x0c3e0c05 UIFoundation`-[NSLineFragmentRenderingContext drawAtPoint:inContext:] + 3657
frame #19: 0x0c41721a UIFoundation`__NSStringDrawingEngine + 18606
frame #20: 0x0c41a10b UIFoundation`-[NSAttributedString(NSExtendedStringDrawing) drawWithRect:options:context:] + 622
frame #21: 0x01bd6891 UIKit`-[UILabel _drawTextInRect:baselineCalculationOnly:] + 6626
frame #22: 0x01bd4574 UIKit`-[UILabel drawTextInRect:] + 581
frame #23: 0x01bd6996 UIKit`-[UILabel drawRect:] + 98
frame #24: 0x01a4b95c UIKit`-[UIView(CALayerDelegate) drawLayer:inContext:] + 519
frame #25: 0x00a7fd61 QuartzCore`-[CALayer drawInContext:] + 118
frame #26: 0x00a7fc97 QuartzCore`backing_callback(CGContext*, void*) + 96
frame #27: 0x009644fe QuartzCore`CABackingStoreUpdate_ + 2788
frame #28: 0x00a7fc2f QuartzCore`___ZN2CA5Layer8display_Ev_block_invoke + 93
frame #29: 0x00ab5416 QuartzCore`x_blame_allocations + 15
frame #30: 0x00a7fa95 QuartzCore`CA::Layer::display_() + 1591
frame #31: 0x00a7fce6 QuartzCore`-[CALayer _display] + 33
frame #32: 0x00a7f456 QuartzCore`CA::Layer::display() + 142
frame #33: 0x00a7fcc0 QuartzCore`-[CALayer display] + 33
frame #34: 0x00a73ef6 QuartzCore`CA::Layer::display_if_needed(CA::Transaction*) + 322
frame #35: 0x00a73f7c QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 38
frame #36: 0x009d23c6 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 284
frame #37: 0x009d378c QuartzCore`CA::Transaction::commit() + 392
frame #38: 0x009d3e58 QuartzCore`CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
frame #39: 0x032df9de CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
frame #40: 0x032df920 CoreFoundation`__CFRunLoopDoObservers + 400
frame #41: 0x032d535a CoreFoundation`__CFRunLoopRun + 1226
frame #42: 0x032d4bcb CoreFoundation`CFRunLoopRunSpecific + 443
frame #43: 0x032d49fb CoreFoundation`CFRunLoopRunInMode + 123
frame #44: 0x0622124f GraphicsServices`GSEventRunModal + 192
frame #45: 0x0622108c GraphicsServices`GSEventRun + 104
frame #46: 0x019c08b6 UIKit`UIApplicationMain + 1526
* frame #47: 0x0028951d Racks`main(argc=1, argv=0xbff245a8) + 141 at main.m:16
frame #48: 0x03dbdac9 libdyld.dylib`start + 1
I have an application with several UIWebViews inside UITableViewCells that are rendering some locally loaded HTML, with some additional Javascript libraries applied (such as Prettify.js).
There is, at most, one UIWebView inside of a UITableViewCell. Things work well overall, except that, when I have many UIWebViews loading, and I rotate the device back and forth, I am getting repeatable crashes from WebCore::RenderBlock.
Some wacky ideas I have tried (and failed):
Disable rotation while the UIWebViews are loading
Use dispatch_semaphor_t to prevent the rotation from happening.
This ends up blocking the main thread, a strategy which fails
because UITableView updates have to occur on the
main thread, resulting in a deadlock.
Use an NSOperationQueue to delay the tableView updates a bit if a rotation occur.
I am beginning to run out of ideas, and am looking for new approaches on how to attack this issue. Has anyone encountered this sort of issue before?
My current conclusion is that this occurs because of some thread synchronization problem between UIWebView -> WebCore and the UIKit rotation/rendering thread.
thread #1: tid = 0x2355ad, 0x0077c976 libgmalloc.dylib`breakIfDebugging + 158, queue = 'com.apple.main-thread, stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
frame #0: 0x0077c976 libgmalloc.dylib`breakIfDebugging + 158
frame #1: 0x0077cbcf libgmalloc.dylib`GMmalloc_zone_malloc_internal + 182
frame #2: 0x0077bcfe libgmalloc.dylib`GMmalloc_zone_malloc + 161
frame #3: 0x0077bb7f libgmalloc.dylib`GMmalloc_zone_calloc + 180
frame #4: 0x0077b7a4 libgmalloc.dylib`GMcalloc + 58
frame #5: 0x0d82f3cd libCGFreetype.A.dylib`(anonymous namespace)::allocate(FT_MemoryRec_*, long) + 25
frame #6: 0x0d8311f5 libCGFreetype.A.dylib`ft_mem_alloc + 29
frame #7: 0x0d841991 libCGFreetype.A.dylib`T1_Face_Init + 611
frame #8: 0x0d832565 libCGFreetype.A.dylib`open_face + 155
frame #9: 0x0d831fbe libCGFreetype.A.dylib`FT_Open_Face + 390
frame #10: 0x0d826ccc libCGFreetype.A.dylib`(anonymous namespace)::open_face(FT::stream*, long, __CFString const*) + 79
frame #11: 0x0d826e26 libCGFreetype.A.dylib`FT::font::create_fonts_with_path(__CFString const*) + 86
frame #12: 0x0d82f536 libCGFreetype.A.dylib`(anonymous namespace)::create_private_data_with_path(__CFString const*) + 34
frame #13: 0x009dffa8 CoreGraphics`CGFontCreateFontsWithPath + 44
frame #14: 0x0090132e CoreGraphics`add_fonts_at_path_locked + 42
frame #15: 0x0090229f CoreGraphics`fault_all_locked + 212
frame #16: 0x00901e3f CoreGraphics`apply_function_locked + 42
frame #17: 0x00901de3 CoreGraphics`CGFontDBApplyFunction + 77
frame #18: 0x009e00a0 CoreGraphics`CGFontApplyFunction + 88
frame #19: 0x00b8f87b CoreText`TDescriptorSource::CreateAllDescriptorsCache(void*) + 73
frame #20: 0x032d84b0 libdispatch.dylib`_dispatch_client_callout + 14
frame #21: 0x032c7e17 libdispatch.dylib`dispatch_once_f + 182
frame #22: 0x00b8fb59 CoreText`TDescriptorSource::CopyCachedAllDescriptors() + 171
frame #23: 0x00b8fb78 CoreText`TDescriptorSource::CopyAllDescriptorsInternal(bool, CFComparisonResult (*)(void const*, void const*, void*)) const + 26
frame #24: 0x00b8fcdf CoreText`TDescriptorSource::CopyAllDescriptors() const + 79
frame #25: 0x00b9153e CoreText`TDescriptorSource::CopyDescriptorsForRequest(__CFDictionary const*, __CFSet const*, CFComparisonResult (*)(void const*, void const*, void*), void*, unsigned long) const + 3040
frame #26: 0x00b9070f CoreText`TDescriptorSource::CopySystemWideFallbackDescriptor(CGFont*, unsigned short const*, long, UIFontFlag) const + 797
frame #27: 0x00b91f16 CoreText`TDescriptorSource::CopySystemWideFallbackDescriptor(CGFont*, __CFString const*, CFRange, UIFontFlag) const + 210
frame #28: 0x00b7e8b6 CoreText`TFontCascade::CreateSystemWideFallback(__CTFont const*, __CFString const*, CFRange) const + 132
frame #29: 0x00b7e35c CoreText`TFontCascade::CreateFallback(__CTFont const*, __CFString const*, CTEmojiPolicy) const + 1446
frame #30: 0x00b53d0b CoreText`TGlyphEncoder::AppendUnmappedCharRun(TCFRef<CTRun*>&, __CTFont const*, CFRange, CFRange, TGlyphList<TDeletedGlyphIndex>&, TGlyphList<TDeletedGlyphIndex>&, TFontCascade const&, TGlyphEncoder::ClusterMatching) + 453
frame #31: 0x00b538b7 CoreText`TGlyphEncoder::RunUnicodeEncoderRecursively(TCFRef<CTRun*>&&, __CTFont const*, CFRange, TGlyphList<TDeletedGlyphIndex>&, TGlyphList<TDeletedGlyphIndex>&, TFontCascade const*, TGlyphEncoder::ClusterMatching, bool) + 1443
frame #32: 0x00b5326e CoreText`TGlyphEncoder::RunUnicodeEncoder(TCFRef<CTRun*>&&, __CTFont const*, CFRange, TGlyphList<TDeletedGlyphIndex>&, TFontCascade const*) + 166
frame #33: 0x00b52c89 CoreText`TGlyphEncoder::EncodeChars(CFRange, TAttributes const&, TGlyphList<TDeletedGlyphIndex>&, TGlyphEncoder::Fallbacks) + 1257
frame #34: 0x00b67a65 CoreText`TTypesetterUniChar::Initialize() + 355
frame #35: 0x00b678c6 CoreText`TTypesetterUniChar::TTypesetterUniChar(unsigned short const* (*)(long, long*, __CFDictionary const**, void*), void (*)(unsigned short const*, void*), void*) + 178
frame #36: 0x00b576ac CoreText`CTLineCreateWithUniCharProvider + 80
frame #37: 0x07f79c4a WebCore`WebCore::ComplexTextController::collectComplexTextRunsForCharacters(unsigned short const*, unsigned int, unsigned int, WebCore::SimpleFontData const*) + 1674
frame #38: 0x07f7503c WebCore`WebCore::ComplexTextController::collectComplexTextRuns() + 620
frame #39: 0x07f749f8 WebCore`WebCore::ComplexTextController::ComplexTextController(WebCore::Font const*, WebCore::TextRun const&, bool, WTF::HashSet<WebCore::SimpleFontData const*, WTF::PtrHash<WebCore::SimpleFontData const*>, WTF::HashTraits<WebCore::SimpleFontData const*> >*, bool) + 696
frame #40: 0x07f78ab8 WebCore`WebCore::TextLayout::TextLayout(WebCore::RenderText*, WebCore::Font const&, float) + 152
frame #41: 0x07f7457a WebCore`WebCore::Font::createLayout(WebCore::RenderText*, float, bool) const + 170
frame #42: 0x089baaa7 WebCore`WebCore::RenderBlock::LineBreaker::nextSegmentBreak(WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>&, WebCore::LineInfo&, WebCore::RenderBlock::RenderTextInfo&, WebCore::RenderBlock::FloatingObject*, unsigned int, WTF::Vector<WebCore::WordMeasurement, 64ul, WTF::CrashOnOverflow>&) + 6855
frame #43: 0x089b42f7 WebCore`WebCore::RenderBlock::layoutRunsAndFloatsInRange(WebCore::LineLayoutState&, WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>&, WebCore::InlineIterator const&, WebCore::BidiStatus const&, unsigned int) + 583
frame #44: 0x089b3438 WebCore`WebCore::RenderBlock::layoutRunsAndFloats(WebCore::LineLayoutState&, bool) + 1336
frame #45: 0x089b6dbf WebCore`WebCore::RenderBlock::layoutInlineChildren(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 2543
frame #46: 0x089901de WebCore`WebCore::RenderBlock::layoutBlock(bool, WebCore::LayoutUnit) + 1614
frame #47: 0x0898f541 WebCore`WebCore::RenderBlock::layout() + 81
frame #48: 0x08997837 WebCore`WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 711
frame #49: 0x08991b7b WebCore`WebCore::RenderBlock::layoutBlockChildren(bool, WebCore::LayoutUnit&) + 587
frame #50: 0x089901f9 WebCore`WebCore::RenderBlock::layoutBlock(bool, WebCore::LayoutUnit) + 1641
frame #51: 0x0898f541 WebCore`WebCore::RenderBlock::layout() + 81
frame #52: 0x08997837 WebCore`WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 711
frame #53: 0x08991b7b WebCore`WebCore::RenderBlock::layoutBlockChildren(bool, WebCore::LayoutUnit&) + 587
frame #54: 0x089901f9 WebCore`WebCore::RenderBlock::layoutBlock(bool, WebCore::LayoutUnit) + 1641
frame #55: 0x0898f541 WebCore`WebCore::RenderBlock::layout() + 81
frame #56: 0x08997837 WebCore`WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 711
frame #57: 0x08991b7b WebCore`WebCore::RenderBlock::layoutBlockChildren(bool, WebCore::LayoutUnit&) + 587
frame #58: 0x089901f9 WebCore`WebCore::RenderBlock::layoutBlock(bool, WebCore::LayoutUnit) + 1641
frame #59: 0x0898f541 WebCore`WebCore::RenderBlock::layout() + 81
frame #60: 0x08af387e WebCore`WebCore::RenderView::layout() + 1374
frame #61: 0x08253531 WebCore`WebCore::FrameView::layout(bool) + 1713
frame #62: 0x080b0a64 WebCore`WebCore::Document::updateLayout() + 228
frame #63: 0x080b40fa WebCore`WebCore::Document::updateLayoutIgnorePendingStylesheets() + 298
frame #64: 0x0819a310 WebCore`WebCore::Element::offsetHeight() + 32
frame #65: 0x085a9534 WebCore`WebCore::jsElementOffsetHeight(JSC::ExecState*, JSC::JSValue, JSC::PropertyName) + 20
frame #66: 0x0a6ccb47 JavaScriptCore`JSC::JSValue::get(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) const + 727
frame #67: 0x0a8eb309 JavaScriptCore`llint_slow_path_get_by_id + 233