Re: App works when launched from Xcode, not from Finder
Re: App works when launched from Xcode, not from Finder
- Subject: Re: App works when launched from Xcode, not from Finder
- From: PCWiz <email@hidden>
- Date: Wed, 16 Dec 2009 22:04:44 -0800
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.
That said, I only ever got those errors once but in any case I've set
a breakpoint for _NSLockError to trap it next time. But I wonder, how
would using @synchronized create these issues? The use of
@synchronized seems relatively simple, but maybe I'm missing something
here.
On 2009-12-16, at 9:07 PM, Jens Alfke <email@hidden> wrote:
On Dec 15, 2009, at 8:05 PM, PCWiz wrote:
*** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x16c2340>
'(null)') unlocked from thread which did not lock it
*** Break on _NSLockError() to debug.
*** -[NSRecursiveLock finalize]: lock (<NSRecursiveLock: 0x16ca9c0>
'(null)') finalized while still in use
*** Break on _NSLockError() to debug.
I've gotten these before, and they don't seem to affect the
operation of the app so I doubt this is what's causing my problem
They're almost certain to cause other problems though, probably in
an intermittent and difficult-to-reproduce way. This is a sign that
something is seriously wrong with the way you're using locks. See my
previous post ... locks are like guns, you definitely don't want to
mess around with them without having been trained in how to use them
safely.
—Jens
_______________________________________________
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