• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Reading too many Files into Array returns Nil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Reading too many Files into Array returns Nil
      • From: John Stiles <email@hidden>
  • Prev by Date: Re: Semi-OT QuickTime/OpenGL Textures
  • Next by Date: Re: How To Design A Queue of Messages? [warning: complete source]
  • Previous by thread: Re: 2 TableViews - 1 Controller - Best Practice?
  • Next by thread: Re: Reading too many Files into Array returns Nil
  • Index(es):
    • Date
    • Thread