Odd notification / NSCFDictionary error

Chad Armstrong edenwaith at mac.com
Thu Dec 6 20:02:47 PST 2007


Thanks for the tip.

I ran a check, but no zombie processes were sticking around.  I do not  
call -waitUntilExit for any of the tasks.  The NSTask is launched  
( [myTask launch] ) and it does its stuff.  Once completed, it throws  
the NSTaskDidTerminateNotification, which then moves onto the next step.

I ran my application again, and once again it stopped right around the  
250 mark.

2007-12-06 12:20:30.943 MyApp[21317] Exception raised during posting  
of notification.  Ignored.  exception: *** -[NSCFDictionary  
setObject:forKey:]: attempt to insert nil value
2007-12-06 12:21:45.765 MyApp[21317] Failed to load  
NSSystemInfoPanel.nib

The last line (Failed to load NSSystemInfoPanel.nib) occurs when I try  
and open the About MyApp menu, after the program has stalled.  Once  
again, this error seems to point that "too many files are open".  When  
my program calls a new task, it gets assigned a new PID, so the PID  
number keeps incrementing (which should be correct), but it does not  
appear that the old task ever stays around, and I am calling the  
following once each iteration is complete.

[myTask release];
myTask = nil;


Regards,

Chad

On Dec 6, 2007, at 2:00 PM, macosx-dev-request at omnigroup.com wrote:

> Does your code call -waitUntilExit on the NSTasks?  At the underlying
> UNIX layer, if you don't check the exit status, you will end up with
> zombie processes that still take up process table entries.
>
> If you want to check for this problem, you can do so by looking at the
> output of the "ps x" command in Terminal.  The STAT column will show
> "Z" for zombie processes.



More information about the MacOSX-dev mailing list