Summarizing the behaviour I see here

If I add an object (which is the principal class of a bundle) to an NSMutableArray, later in the program I get the exception that the NSFileManager default manager object does not respond to a known message selector. I further narrowed it down to a fread call (standard libc) that I do just before the exception is thrown. If I comment the fread the error appears at another point in the code when I am initializing a NSDictionary with dictionaryWithDictionary. That other error shows itself in the gdb log as a pointer modified after being freed.

Since this error is a bit difficult to track and explain through emails, I appreciate all your help, and think I will try to debug some more (change the code to some other way of doing it).

Thanks anyway


On Apr 9, 2009, at 1:38 AM, Graham Cox wrote:


On 09/04/2009, at 2:13 AM, Daniel Luis dos Santos wrote:

I expect a file manager and it tells me that it does not respond to fileExistsAtPath


No you don't.

According to your original post, you are complaining that calling - addObject on _instances throws this error. So does _instances point to NSFileManager or an array, as the code implies?

You're confused, so the rest of us have no chance.

Regarding your comments about autorelease pools, sounds like you're relying on some assumed behaviour that is not stated anywhere in any documentation. Don't do that, you're just creating problems that don't need to be there. What about the autorelease pools created around the main event loop for example?

--Graham



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to