• 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: App works when launched from Xcode, not from Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App works when launched from Xcode, not from Finder


  • Subject: Re: App works when launched from Xcode, not from Finder
  • From: Greg Parker <email@hidden>
  • Date: Thu, 17 Dec 2009 15:38:43 -0800

On Dec 17, 2009, at 8:55 AM, Jens Alfke wrote:
> On Dec 16, 2009, at 10:04 PM, PCWiz wrote:
>> I'm not using NSLock or NSRecursiveLock directly. I'm using @synchronized on an object that multiple threads acess, to allow only one thread to access the object at a time.
>
> The fact that the description of the lock is "<NSRecursiveLock: 0x16c2340> '(null)'" makes me suspect that you're synchronizing on a nil pointer, i.e. that when you call
> 	@synchronized(foo) { ... }
> the value of foo is nil. I'm pretty sure that's illegal, and I would have thought it would throw an exception, but maybe not. Try putting a check above the block, something like
> 	NSAssert(foo!=nil, @"no foo");

@synchronized does not use NSRecursiveLock. Any NSRecursiveLock problems you have are unrelated to @synchronized.

@synchronized(nil) silently locks nothing. You can set environment variable OBJC_DEBUG_NIL_SYNC=YES to turn on logging for @synchronized(nil).


--
Greg Parker     email@hidden     Runtime Wrangler


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >App works when launched from Xcode, not from Finder (From: PCWiz <email@hidden>)
 >Re: App works when launched from Xcode, not from Finder (From: Kyle Sluder <email@hidden>)
 >Re: App works when launched from Xcode, not from Finder (From: PCWiz <email@hidden>)
 >Re: App works when launched from Xcode, not from Finder (From: Jens Alfke <email@hidden>)
 >Re: App works when launched from Xcode, not from Finder (From: PCWiz <email@hidden>)
 >Re: App works when launched from Xcode, not from Finder (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Call Cocoa from C++
  • Next by Date: Re: NSImage support for Windows ico files in 10.4.x?
  • Previous by thread: Re: App works when launched from Xcode, not from Finder
  • Next by thread: Re: App works when launched from Xcode, not from Finder
  • Index(es):
    • Date
    • Thread