Re: NSDictionary crash
Re: NSDictionary crash
On Sat, Jul 25, 2009 at 7:53 PM, Bill Bumgarner<email@hidden> wrote:
> On Jul 25, 2009, at 10:04 AM, email@hidden wrote:
>
>> I have never been able to reproduce this one myself, but have received
>> a number of similar crash reports. The crash occurs on this line
>> (detached thread):
>>
>> NSDictionary *iTunesLib = [[NSDictionary alloc]
>> initWithContentsOfFile:libPath];
>>
>> libPath is a retained ivar, guaranteed to be a valid path, never nil.
>
> Three possibilities off the top of my head:
>
> - file is corrupt
> - your process ran out of memory
> - the file was deleted or rewritten while -initWithContentsOfFile: was in
> the midst of reading it
I find the third option the most likely: iTunes rewrites the data file
frequently. Is there a way to lock the file while reading it, or
detect if it is being modified, or suchlike? Thanks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden