neekeetab / CachingPlayerItem

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

App crashes at processPendingRequests() from didReceive() #46

Closed mohamedrafi-rapid closed 1 year ago

mohamedrafi-rapid commented 1 year ago

Thread 126: "-[__NSTaggedDate count]: unrecognized selector sent to instance 0x8000000000000000"

Please help @neekeetab

mohamedrafi-rapid commented 1 year ago

Resolved the issue by cancelAndInvalidate the playeritem session

mohamedrafi-rapid commented 1 year ago

@neekeetab Now I am cancelling download an ongoing session by playerItem?.resourceLoaderDelegate.session?.invalidateAndCancel(). Made resourceLoaderDelegate.session public.

Will this cause the crash? Actually crash happens very rarely. To reduce crash rate In processPendingRequests() I have added a main async now

Samigos commented 3 months ago

@neekeetab Now I am cancelling download an ongoing session by playerItem?.resourceLoaderDelegate.session?.invalidateAndCancel(). Made resourceLoaderDelegate.session public.

Will this cause the crash? Actually crash happens very rarely. To reduce crash rate In processPendingRequests() I have added a main async now

Can you please show how? I have the exact issue, but to me it happens a lot!