Overview
We’re seeing a production crash on CachingPlayerItem 2.2.0 (cc00381e252ac9b2a7b691e1da6a598bd7517bdc):
Fatal Exception: NSFileHandleOperationException
at -[NSConcreteFileHandle writeData:]
The crash resolves to:
MediaFileHandle.append(data:)
writeHandle.write(data) at:
Called from:
ResourceLoaderDelegate.writeBufferDataToFileIfNeeded(forced:):
|
fileHandle.append(data: bufferData) |
Request
Would you consider handling NSFileHandleOperationException from this write path and routing it through the existing failure flow (downloadFailed(with:)) instead of crashing the process?
A minimal approach would be an Objective-C safe-write wrapper (@try/@catch) around seekToEndOfFile + writeData, returning an NSError to Swift, then calling downloadFailed(with:) when write fails.
Thank you for your consideration.
Overview
We’re seeing a production crash on CachingPlayerItem
2.2.0(cc00381e252ac9b2a7b691e1da6a598bd7517bdc):The crash resolves to:
MediaFileHandle.append(data:)writeHandle.write(data)at:CachingPlayerItem/Source/MediaFileHandle.swift
Line 74 in cc00381
Called from:
ResourceLoaderDelegate.writeBufferDataToFileIfNeeded(forced:):CachingPlayerItem/Source/ResourceLoaderDelegate.swift
Line 227 in cc00381
Request
Would you consider handling
NSFileHandleOperationExceptionfrom this write path and routing it through the existing failure flow (downloadFailed(with:)) instead of crashing the process?A minimal approach would be an Objective-C safe-write wrapper (
@try/@catch) aroundseekToEndOfFile+writeData, returning anNSErrorto Swift, then callingdownloadFailed(with:)when write fails.Thank you for your consideration.