Odd notification / NSCFDictionary error
Chad Armstrong
edenwaith at mac.com
Tue Dec 4 20:21:17 PST 2007
I have an application which loops an arbitrary number of times
(depending on the number of files being handled), which calls an
NSTask. I'm encountering an odd error with pre-Leopard systems where
if my program loops around 200 times, the following error is called.
2007-11-26 13:43:29.137 MyApp[3595] Exception raised during posting of
notification. Ignored. exception: *** -[NSCFDictionary
setObject:forKey:]: attempt to insert nil value
I've done some research, but I cannot find anything which seems to pin
point this particular problem. My guess is that this error is being
thrown when an NSTaskDidTerminateNotification is called after the task
is complete. What I've been able to dig up on this "notification
exception" might be related to "too many files being opened at once".
Another odd thing about this situation is that I cannot reproduce the
problem on Leopard. However, on earlier systems (Tiger, Panther, and
Jaguar), the problem exists. This is a pre-existing issue, so it is
not something that happened after building on Leopard or anything
along those lines.
In my code, I also do make one call to an NSMutableDictionary, which
does have a [NSDictionary setObject: forKey:] call, but that doesn't
seem to be the source of the problem since I eliminated that code, and
the problem persists.
Any ideas?
Regards,
Chad
More information about the MacOSX-dev
mailing list