neekeetab / CachingPlayerItem

Play and cache media content simultaneously on your iOS device
MIT License
520 stars 89 forks source link

pendingRequests accessed from different queues #24

Open pc-zhang opened 5 years ago

pc-zhang commented 5 years ago

I observed URLSessionDelegate and AVAssetResourceLoaderDelegate methods are called from different queues, and they both access pendingRequests.

neekeetab commented 4 years ago

Thanks for pointing out!

neekeetab commented 4 years ago

This can be a cause for #13

pc-zhang commented 4 years ago

You are welcome :-)

Kaspik commented 4 years ago

@neekeetab Any update on this? It's definitely cause of crashes and currently, after we added CachingPlayerItem to our project, it's the biggest crash on Fabric. 😞

neekeetab commented 4 years ago

I’m sorry for the crashes. Most likely it’s due to the race conditions. Adding a private queue may do it

zackperdue commented 4 years ago

Is there a solution to this? My users are reporting crashes and this is cause. I'd help out but I'm not that good at multithreaded swift code. Really need a fix.