Hi all, as always, apologies if the follow question is answered somewhere that 
I’ve missed.

Should AVAssetDownloadURLSession be functional in the iOS simulator? I’ve only 
been able to get it to work (as in, not immediately error) on-device.

I’m aware that there are some limitations to background sessions in the 
simulator in general, but I was under the impression that they were at least 
kinda functional. 

In the simulator, my URLSession:didBecomeInvalidWithError: delegate method is 
called immediately with code -1, and a corresponding crash log is generated 
here:

Console > User Reports > nsurlsessiond_[date]-[my machine name].crash

Its contents ominously mention:

Application Specific Information:
BUG IN CLIENT OF LIBDISPATCH: dispatch_barrier_sync called on queue already 
owned by current thread
CoreSimulator 338.16 - Device: iPhone SE - Runtime: iOS 10.2 (14C89) - 
DeviceType: iPhone SE

[snip]

Thread 3 Crashed:: Dispatch queue: <AVAssetDownloadSession: 0x7ffa5c40eff0> 
read/write queue
0   libdispatch.dylib                   0x0000000110cf8616 
_dispatch_barrier_sync_f_slow + 708
1   com.apple.avfoundation              0x000000010e230d42 
-[AVAssetDownloadSession(AVAssetDownloadSession_Local) 
_transitionToTerminalStatus:error:] + 202
2   com.apple.avfoundation              0x000000010e22f288 
__63-[AVAssetDownloadSession 
initWithAsset:destinationURL:options:]_block_invoke + 1396
3   libdispatch.dylib                   0x0000000110cee808 
_dispatch_call_block_and_release + 12
4   libdispatch.dylib                   0x0000000110d1012e 
_dispatch_client_callout + 8
5   libdispatch.dylib                   0x0000000110cf9766 
_dispatch_queue_concurrent_drain + 1543
6   libdispatch.dylib                   0x0000000110cf5ca6 
_dispatch_queue_invoke + 1125
7   libdispatch.dylib                   0x0000000110cf6047 
_dispatch_queue_override_invoke + 376
8   libdispatch.dylib                   0x0000000110cf79dc 
_dispatch_root_queue_drain + 506
9   libdispatch.dylib                   0x0000000110cf7782 
_dispatch_worker_thread3 + 113
10  libsystem_pthread.dylib             0x00000001110bc712 _pthread_wqthread + 
1299
11  libsystem_pthread.dylib             0x00000001110bc1ed start_wqthread + 13

I get a similar crash exercising the class via a Playground (my initial 
intent), an iOS unit test target, or an actual skeleton iPhone app.

Is this expected? Happy to file a bug for this if it should be working — this 
seems like a fun class to be able to play with in a Playground, in particular.

Cheers,

Peter
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to