PDA

View Full Version : Error in OSX 10.5 and not in OSX 10.4




satyam90
Sep 3, 2008, 01:04 AM
I have an application called iFolder (www.ifolder.com), an open source project.
I am running it from console.
It's working fine in 10.4(Tiger) and 10.5(Leapord).
But while running it in 10.5(Leapord), I am seeing the following message on console:
*** -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x349220> '(null)' unlocked when not locked

What's different in 10.5 Mac. Will I have to change my code such that it works on both 10.4 and 10.5 without any error? I want to know why it is not coming in 10.4 or why it is coming on 10.5?



kpua
Sep 3, 2008, 01:10 AM
It's always a good idea to check release notes for something like this that changes from release to release:

NSLock logging

NSLock and subclasses will now indicate erroneous lock and unlock attempts with logs such as:
2006-07-14 09:17:00.729 MyTestApp *** -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x183b3800>)
unlocked when not locked
2006-07-14 09:17:00.729 MyTestApp *** Break on _NSLockError() to debug.
These almost always indicate problems that should be fixed. In many cases the problems were there in 10.4 as well, but not being reported.


It's a problem with the app itself. (-unlock is being called before -lock is called... obviously doesn't make sense.) You should inform the maintainer of the open source app, or try to fix it yourself.

Edit: Also, very strange, I just noticed the lock is somehow nil? Don't quite understand that, but I still think it's the app's fault. (If you want to fix it yourself, try breaking on _NSLockError to find the problematic lock)

satyam90
Sep 3, 2008, 01:48 AM
I can't use Debugger available with XCode.
I have to debug from console only. Any suggestions how to do it?

kpua
Sep 3, 2008, 09:33 AM
Why can't you use the Xcode debugger? You can attach to any executable with it.

If you really can't use it, just type gdb /path/to/<app name>.app/Contents/MacOS/<app name>

Make sure the app is built with symbols to aid debugging.