• 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: NSTask -launch Freezes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask -launch Freezes


  • Subject: Re: NSTask -launch Freezes
  • From: Joseph Kelly <email@hidden>
  • Date: Thu, 19 Jan 2006 14:34:09 -0800

That's quite an amazing bug you've got there. I keep wondering why something in fork() would be dispatching an ObjC message. IIRC, the Darwin sources show that malloc_fork_prepare is simply locking a mutex.

Maybe somewhere fairly close to the run up of your launch call, something is just silently trouncing memory? Maybe something in this technote could help you: http://developer.apple.com/technotes/tn2004/ tn2124.html

joe

On Jan 19, 2006, at 1:37 PM, Seth Willits wrote:

On Jan 19, 2006, at 6:18 AM, Camillo Lugaresi wrote:

NSTask * task = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/wc" arguments:[NSArray arrayWithObjects:@"-l", @"/Users/seth/Desktop/ blah.txt", nil]];

Which works from the command line and from main() in a new project, but in my own app, it freezes while launching:

#0	0xffff85d8 in objc_msgSend_rtp
#1	0x900318a4 in _malloc_fork_prepare
#2	0x900315ec in fork
#3	0x928d44b4 in -[NSConcreteTask launchWithDictionary:]
#4	0x928e8ca0 in +[NSTask launchedTaskWithLaunchPath:arguments:]


I have no idea what to do here. :(

Have you tried activating the various debugging flags, such as NSZombieEnabled? That crash in obc_msgSend_rtp might be due to a message being sent to a deallocated object.

This is the first I've heard of NSZombieEnabled, but I looked it up and tried it, but nothing seems to run any differently. When the task launches the app still freezes up, when I pause it with the debugger, I still get the same backtrace above. No messages in the console. :\

_______________________________________________ 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
References: 
 >NSTask -launch Freezes (From: Seth Willits <email@hidden>)
 >Re: NSTask -launch Freezes (From: Camillo Lugaresi <email@hidden>)
 >Re: NSTask -launch Freezes (From: Seth Willits <email@hidden>)

  • Prev by Date: Various UI questions...
  • Next by Date: Re: Two questions about NSCalendar
  • Previous by thread: Re: NSTask -launch Freezes
  • Next by thread: UIElement activation
  • Index(es):
    • Date
    • Thread