Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSURLConnection/CFURLConnection ordering violation #5

Closed
kolyuchiy opened this issue Jun 23, 2014 · 5 comments
Closed

NSURLConnection/CFURLConnection ordering violation #5

kolyuchiy opened this issue Jun 23, 2014 · 5 comments

Comments

@kolyuchiy
Copy link

I get a number of such messages in Xcode console while my app is running. What could be the reason?

2014-06-23 19:04:34.888 [1751:1803] NSURLConnection/CFURLConnection ordering violation: didFinishLoading to be scheduled before didReceiveResponse

My setup: Xcode 5, iOS 7.1, proxying enabled for all HTTP requests with the following code:

    [WebViewProxy handleRequestsWithScheme:@"http" handler:^(NSURLRequest *req, WVPResponse *res) {
        [self.requestLog addObject:[[req URL] absoluteString]];
        [NSURLConnection connectionWithRequest:req delegate:res];
    }];
@kolyuchiy
Copy link
Author

Also, it crashes the app when in airplane mode.

* thread #8: tid = 0xcaba4, 0x3a3d0cc0 libobjc.A.dylib`objc_exception_throw, name = 'WebThread', stop reason = breakpoint 1.1
  * frame #0: 0x3a3d0cc0 libobjc.A.dylib`objc_exception_throw
    frame #1: 0x2fb776d6 CoreFoundation`-[__NSSetM addObject:] + 566
    frame #2: 0x37ea41f4 WebCore`-[WAKView addSubview:] + 120
    frame #3: 0x388a1134 WebKit`-[WebFrameView(WebInternal) _setDocumentView:] + 44
    frame #4: 0x388dfcce WebKit`-[WebFrameView(WebInternal) _makeDocumentViewForDataSource:] + 186
    frame #5: 0x388a0b4a WebKit`WebFrameLoaderClient::transitionToCommittedForNewPage() + 554
    frame #6: 0x37eb01d2 WebCore`WebCore::FrameLoader::transitionToCommitted(WTF::PassRefPtr<WebCore::CachedPage>) + 418
    frame #7: 0x37eafa20 WebCore`WebCore::FrameLoader::commitProvisionalLoad() + 380
    frame #8: 0x37eaf6fe WebCore`WebCore::DocumentLoader::finishedLoading(double) + 270
    frame #9: 0x37f0915a WebCore`WebCore::CachedResource::checkNotify() + 42
    frame #10: 0x37f090ba WebCore`WebCore::CachedRawResource::finishLoading(WebCore::ResourceBuffer*) + 154
    frame #11: 0x37f08f84 WebCore`WebCore::SubresourceLoader::didFinishLoading(double) + 108
    frame #12: 0x37f08eec WebCore`WebCore::didFinishLoading(_CFURLConnection*, void const*) + 132
    frame #13: 0x2f89f296 CFNetwork`___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 74
    frame #14: 0x2f89de9a CFNetwork`___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 54
    frame #15: 0x2fb6d198 CoreFoundation`CFArrayApplyFunction + 36
    frame #16: 0x2f83599a CFNetwork`RunloopBlockContext::perform() + 182
    frame #17: 0x2f835858 CFNetwork`MultiplexerSource::perform() + 220
    frame #18: 0x2f8356e8 CFNetwork`MultiplexerSource::_perform(void*) + 48
    frame #19: 0x2fc04fee CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
    frame #20: 0x2fc044b6 CoreFoundation`__CFRunLoopDoSources0 + 206
    frame #21: 0x2fc02ca6 CoreFoundation`__CFRunLoopRun + 630
    frame #22: 0x2fb6d768 CoreFoundation`CFRunLoopRunSpecific + 524
    frame #23: 0x2fb6d54a CoreFoundation`CFRunLoopRunInMode + 106
    frame #24: 0x37ea0c4c WebCore`RunWebThread(void*) + 420
    frame #25: 0x3a9ec958 libsystem_pthread.dylib`_pthread_body + 140
    frame #26: 0x3a9ec8ca libsystem_pthread.dylib`_pthread_start + 102

@marcuswestin
Copy link
Owner

Interesting! I've not seen these issues myself.

I did some cursory digging, but likely won't be fixing this myself right now.

Are you able to repro your issue by modifying either of the example apps? If yes, it would be really helpful for helping fix the issue.

Cheers!

@kolyuchiy
Copy link
Author

I can't reproduce it this time. I'll open another issue if I see it again.

@marcuswestin
Copy link
Owner

Let's keep any possible further discussion in issue #7.

@nitin-ie
Copy link

nitin-ie commented Nov 5, 2019

Also, it crashes the app when in airplane mode.

* thread #8: tid = 0xcaba4, 0x3a3d0cc0 libobjc.A.dylib`objc_exception_throw, name = 'WebThread', stop reason = breakpoint 1.1
  * frame #0: 0x3a3d0cc0 libobjc.A.dylib`objc_exception_throw
    frame #1: 0x2fb776d6 CoreFoundation`-[__NSSetM addObject:] + 566
    frame #2: 0x37ea41f4 WebCore`-[WAKView addSubview:] + 120
    frame #3: 0x388a1134 WebKit`-[WebFrameView(WebInternal) _setDocumentView:] + 44
    frame #4: 0x388dfcce WebKit`-[WebFrameView(WebInternal) _makeDocumentViewForDataSource:] + 186
    frame #5: 0x388a0b4a WebKit`WebFrameLoaderClient::transitionToCommittedForNewPage() + 554
    frame #6: 0x37eb01d2 WebCore`WebCore::FrameLoader::transitionToCommitted(WTF::PassRefPtr<WebCore::CachedPage>) + 418
    frame #7: 0x37eafa20 WebCore`WebCore::FrameLoader::commitProvisionalLoad() + 380
    frame #8: 0x37eaf6fe WebCore`WebCore::DocumentLoader::finishedLoading(double) + 270
    frame #9: 0x37f0915a WebCore`WebCore::CachedResource::checkNotify() + 42
    frame #10: 0x37f090ba WebCore`WebCore::CachedRawResource::finishLoading(WebCore::ResourceBuffer*) + 154
    frame #11: 0x37f08f84 WebCore`WebCore::SubresourceLoader::didFinishLoading(double) + 108
    frame #12: 0x37f08eec WebCore`WebCore::didFinishLoading(_CFURLConnection*, void const*) + 132
    frame #13: 0x2f89f296 CFNetwork`___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 74
    frame #14: 0x2f89de9a CFNetwork`___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 54
    frame #15: 0x2fb6d198 CoreFoundation`CFArrayApplyFunction + 36
    frame #16: 0x2f83599a CFNetwork`RunloopBlockContext::perform() + 182
    frame #17: 0x2f835858 CFNetwork`MultiplexerSource::perform() + 220
    frame #18: 0x2f8356e8 CFNetwork`MultiplexerSource::_perform(void*) + 48
    frame #19: 0x2fc04fee CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
    frame #20: 0x2fc044b6 CoreFoundation`__CFRunLoopDoSources0 + 206
    frame #21: 0x2fc02ca6 CoreFoundation`__CFRunLoopRun + 630
    frame #22: 0x2fb6d768 CoreFoundation`CFRunLoopRunSpecific + 524
    frame #23: 0x2fb6d54a CoreFoundation`CFRunLoopRunInMode + 106
    frame #24: 0x37ea0c4c WebCore`RunWebThread(void*) + 420
    frame #25: 0x3a9ec958 libsystem_pthread.dylib`_pthread_body + 140
    frame #26: 0x3a9ec8ca libsystem_pthread.dylib`_pthread_start + 102

How you fix this crash I am facing the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants