Odd notification / NSCFDictionary error

Scott Stevenson sstevenson at mac.com
Tue Dec 4 23:04:12 PST 2007


On Dec 4, 2007, at 8:21 PM, Chad Armstrong wrote:

> 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".

I don't know the exact answer to your question, but there are two  
kernel settings which are relevant:

$ sysctl kern.maxproc
532

$ sysctl kern.maxprocperuid
266

If you're launching all of these NSTasks simultaneously, it might be a  
problem. It's possible NSTask is somehow smarter about how it spawns  
processes on Leopard. You can manually override these values if you're  
working in a controlled setting.

> 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.

That could be some code getting called in the frameworks. You can  
trying breaking on the -[NSException raise] to see what's up.

    - Scott


More information about the MacOSX-dev mailing list