Projects

Ticket #458 (closed defect: fixed)

Opened 2 years ago

Last modified 22 months ago

odd debug messages during NSPredicate.prediateWithFormat:argumentArray:

Reported by: jordan.breeding@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.6
Component: MacRuby Keywords:
Cc:

Description

419 jordan@thetourist ~ > macirb
irb(main):001:0> NSPredicate.predicateWithFormat("NOT (SELF in %@)", argumentArray: [[1,2,3,4]])
2009-11-25 10:20:35.508 macruby[56390:903] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x200254a40> '(null)') unlocked when not locked
2009-11-25 10:20:35.512 macruby[56390:903] *** Break on _NSLockError() to debug.
=> #<NSCompoundPredicate:0x200255980>
irb(main):002:0>

Happens with a stored array as well:

420 jordan@thetourist ~ > macirb
irb(main):001:0> sampleArray = [1,2,3,4]
=> [1, 2, 3, 4]
irb(main):002:0> NSPredicate.predicateWithFormat("NOT (SELF in %@)", argumentArray: [sampleArray])
2009-11-25 10:22:29.606 macruby[56408:903] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x2000247e0> '(null)') unlocked when not locked
2009-11-25 10:22:29.610 macruby[56408:903] *** Break on _NSLockError() to debug.
=> #<NSCompoundPredicate:0x200256120>
irb(main):003:0>

Change History

Changed 2 years ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to invalid

This isn't a MacRuby bug, the log happens in Cocoa. You probably need to initialize something before using NSPredicate.

Changed 2 years ago by jordan.breeding@…

Can this one get reopened? I don't see the error in Objective-C and Cocoa. Only in MacRuby thus far, I haven't tried Nu or F-Script yet with this example.

All of these work without the error though:

 http://gist.github.com/242969  http://gist.github.com/242971  http://gist.github.com/242976

Changed 2 years ago by lsansonetti@…

  • status changed from closed to reopened
  • resolution invalid deleted

Sorry about that, it looks like a bug of MacRuby since the ObjC/GC version works. Re-opening.

Changed 22 months ago by lsansonetti@…

Workaround: add the following line before using NSPredicate:

NSPredicate.initialize

Changed 22 months ago by lsansonetti@…

  • status changed from reopened to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.6

Should be fixed in r3937.

Note: See TracTickets for help on using tickets.