Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
I have an application called iFolder (http://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

macrumors 6502
Jul 25, 2006
294
0
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)
 

kpua

macrumors 6502
Jul 25, 2006
294
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.