Re: AVAssetReaderTrackOutput fails with error code -11800
Re: AVAssetReaderTrackOutput fails with error code -11800
- Subject: Re: AVAssetReaderTrackOutput fails with error code -11800
- From: Zachary Kulis <email@hidden>
- Date: Fri, 17 Jun 2011 11:10:40 -0400
Heinrich,
Thank you very much for the useful information. I actually succeeded in
exporting all 1500 MP3s last night by shutting down all of the
extraneous audio resources (I am using a Remote IO to play the exported
file) and performing the exports in the main thread. So, there does seem
to be an issue when exporting and trying to stream the exported audio
file on-the-fly. I am still trying to isolate my exact bug, but it seems
like we might be observing the same root issue with assetd and
mediaserverd. Perhaps the pausing will work -- my test app is a stress
test, so there is absolutely no pausing between successive exports.
Thanks again. I will follow up with my own bug report shortly (and
reference yours). If I find a workaround, I'll let you know.
Regards,
Zach
> Hi Zach,
>
> I have recently experienced the exact same odd behavior (iOS 4.3.3). I have already filed a bug with ID 9557175. If you have filed one, too, I suggest you add a comment that identifies your report as a duplicate/related one to mine. I was able to present this issue to the AVAssetReader engineers last week at WWDC. I know that WWDC is confidential but I think it is safe to say that they have looked into it and that they are now aware of the problem (it is a bug). They will follow up on my bug report as soon as they can.
>
> From my own experience I could tell that the problem arises when the mediaserver-daemon and asset-daemon are exhausted. But there is really no way of predicting the moment of failure (when AVAssetReader fails to be initialized).
>
> However, I assume that you are performing your export operation as a background task and I have experienced that it is much less likely to run into the bug when you are using a low-priority queue instead of a default or high priority queue. In my case I was handing off the processing task as a block to dispatch_get_global_queue with DISPATCH_QUEUE_PRIORITY_LOW). The issue then still exists, but it might take much longer to encounter the error. You can find this implementation in this test app that isolates the bug:
>
> http://files.hfink.eu/AVAssetReaderBug.tar.gz
>
> I have attached this project this also with my bug report.
>
> Another way to work around the problem could be to pause the export operation for some time after let's say after 200 MP3s for 2 seconds. Maybe this gives the media-server a chance to clean up resources which prevents the error. I haven't tried that yet, though.
>
> This is my story with this issue so far.
>
> best regards,
>
> Heinrich
>
> On Jun 16, 2011, at 17:37 , Zachary Kulis wrote:
>
>> Hi all,
>>
>> I am currently plagued with a most perplexing issue. I am trying to
>> export the raw data packets from MP3s that are stored in my device's
>> iTunes library. I have about roughly 1500 MP3s stored on my iPhone 4. I
>> am using an AVAssetReader and an AVAssetReaderTrackOutput to write the
>> raw audio samples. Unfortunately, after about 370 successful exports,
>> the call to create/init the AVAssetReader fails with the following
>> error: "The operation couldn't be completed. (AVFoundationErrorDomain error
>> -11800.)
>>
>> The problem is, the AVFoundation framework seems unable to recover when
>> this error occurs. This means that all future attempts to export an MP3
>> (or an M4A file using an AVAssetExportSession) fail immediately with
>> error -11800.
>>
>> Has anyone observed this behavior? I've tried many different
>> permutations of allocating/releasing the AVAssetReader. Instruments does
>> not report any memory leaks. Does anyone know of a way to "reset" the
>> AVFoundation framework once this error occurs?
>>
>> Thanks very much,
>> Zach
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Coreaudio-api 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.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden