Re: NSTask
Re: NSTask
- Subject: Re: NSTask
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 12 Jan 2005 16:13:42 -0700
On Jan 12, 2005, at 3:24 PM, Mai Bui wrote:
TestProg runs ok alone, but when I run "MyApp", I got err:
Executable “MyApp” has exited due to signal 10 (SIGBUS)
What did I do wrong?
Here's what you did wrong:
[task setArguments:[NSArray arrayWithObjects:@"5"]];
You need to nil-terminate the argument list when calling -[NSArray
arrayWithObjects:], although in this case you should probably use
-arrayWithObject: instead. If you don't add a nil-terminator to a call
to -arrayWithObjects:, then the application will crash.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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