Re: Crash in -[__NSCFURLLocalStreamTask _onSessionQueue_disavow], only on iOS 10
Re: Crash in -[__NSCFURLLocalStreamTask _onSessionQueue_disavow], only on iOS 10
- Subject: Re: Crash in -[__NSCFURLLocalStreamTask _onSessionQueue_disavow], only on iOS 10
- From: Jeff Jenkins <email@hidden>
- Date: Tue, 06 Mar 2018 09:25:55 -0800
Hi,
Try adding an implementation of the NSURLSessionStreamDelegate method:
- (void)URLSession:(NSURLSession *)session streamTask:(NSURLSessionStreamTask
*)streamTask
didBecomeInputStream:(NSInputStream
*)inputStream
outputStream:(NSOutputStream
*)outputStream;
It’s not required, but it *might* work-around and prevent the crash.
— jrj
> On Mar 6, 2018, at 9:19 AM, Jens Alfke <email@hidden> wrote:
>
> In testing our library, which uses NSURLSessionStreamTask, we're seeing a
> crash that only occurs in iOS 10.2 [simulator], not iOS 11. The crash doesn't
> involve our code — it's on the system 'com.apple.NSURLSession-work' queue, in
> a method of the internal __NSCFURLLocalStreamTask class:
>
> * thread #13, queue = 'com.apple.NSURLSession-work', stop reason =
> EXC_BAD_ACCESS (code=1, address=0x10)
> * frame #0: 0x00000001141d9757 CFNetwork`-[__NSCFURLLocalStreamTask
> _onSessionQueue_disavow] + 34
> frame #1: 0x000000011403da97 CFNetwork`__51-[NSURLSession
> delegate_task:didCompleteWithError:]_block_invoke_2 + 31
> frame #2: 0x000000010c43e122
> libclang_rt.asan_iossim_dynamic.dylib`__wrap_dispatch_async_block_invoke + 290
> frame #3: 0x0000000114bbf808
> libdispatch.dylib`_dispatch_call_block_and_release + 12
> …
>
> Is this a known bug in iOS 10 that was fixed in iOS 11? I'm not directly
> involved in debugging this; the engineer who is commented:
>
>> This seems to be an issue with NSURLSession's stream task on iOS 10.2 that
>> canceling the task after an error could cause the crash down in
>> __NSCFURLLocalStreamTask. I also noticed a weird issue that
>> -URLSession:task:didCompleteWithError: is called twice.
>
> (If you want to see the full details, they're in
> https://github.com/couchbase/couchbase-lite-ios/issues/2089 .)
>
> —Jens
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Macnetworkprog mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden