• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange problem


  • Subject: Re: Strange problem
  • From: Michael James <email@hidden>
  • Date: Thu, 29 Aug 2002 02:30:06 -0400

First off, if you are using a class method to get your NSTask, then that means that it will be returning an autoreleased object. Therefore, you shouldn't use [NSTask alloc]. Second, the [NSArray arrayWithObjects:] method takes a nil-terminated list of objects, so your code should look like this:

NSTask* uzduotiss = [NSTask launchedTaskWithLaunchPath: @"/Library/photopc/photopc" arguments: [NSArray arrayWithObjects: @"-h", nil]];

Try that. It should work now.

- Michael James
email@hidden
AIM/iChat: mj1531

Message: 14
Date: Thu, 29 Aug 2002 04:40:53 +0200
Subject: Strange problem
From: Aidas <email@hidden>
To: <email@hidden>

Hi all,

I use external application from my cocoa program but it always crashed when
I'm doing so.

Here is my code:
NSTask *uzduotiss=[[NSTask alloc]
launchedTaskWithLaunchPath:@"/Library/photopc/photopc" arguments:[NSArray
arrayWithObjects:@"-h"]];

It returns"Trying5.app has exited due to signal 10 (SIGBUS)."

Why it is happening?

Thank you
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSURL access?
  • Next by Date: gcc 2.95/3.1 switch for C++ tools not working?
  • Previous by thread: Re: Strange problem
  • Next by thread: [ANN] Cocoa Browser ver 0.4
  • Index(es):
    • Date
    • Thread