Reading too many Files into Array returns Nil
Reading too many Files into Array returns Nil
- Subject: Reading too many Files into Array returns Nil
- From: Mike Oldham <email@hidden>
- Date: Mon, 12 Sep 2005 23:14:39 -0600
New cocoa Developer, and new to the list, so bear with me.
I'm reading files with NSFileHandle.
The number of files is never the same.
When reading a few files, everything works fine.
When reading several hundred I get this Error.
2005-09-12 22:59:27.111 ArtiX[4388] An uncaught exception was raised
2005-09-12 22:59:27.111 ArtiX[4388] *** -[NSCFArray addObject:]:
attempt to insert nil
2005-09-12 22:59:27.111 ArtiX[4388] *** Uncaught exception:
<NSInvalidArgumentException> *** -[NSCFArray addObject:]: attempt to
insert nil
Here is the read code.
LargeFile = [NSFileHandle fileHandleForReadingAtPath:fString];
tmpData = [LargeFile readDataOfLength:4];
tmpStringName = [LargeFile readDataOfLength:32];
tmpData = [LargeFile readDataOfLength:4];
tmpTagName = [LargeFile readDataOfLength:4];
[ProjStringName addObject:tmpStringName];
[ProjTagName addObject:tmpTagName];
[ProjTagPosition addObject:[NSNumber numberWithInt:-1]];
[ProjTagLength addObject:fString];
The weird thing is, when i run in debug mode it works fine.
Any ideas?
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden