Page 1 of 1

Strange problem: "unrecognized selector sent to instance"

PostPosted: Sat May 19, 2012 7:52 pm
by Pe8er
Hey!

I have a simple rule set up — it moves screenshots from desktop to Public/temp folder in my Dropbox and generates a short URL. The problem is, it works well when used on Public folder, but breaks when used on Public/temp. Here's the log message:

Code: Select all
2012-05-20 01:45:06.055 hazelworker[6561] Error while matching rule Copy Short Dropbox URL against file /Users/Piotr/Dropbox/Public/temp/Screen Shot 2012-05-20 at 1.44.40 AM.PNG: -[__NSCFString timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x10181afb0
2012-05-20 01:45:06.055 hazelworker[6561] (
   0   CoreFoundation                      0x00007fff91b27f56 __exceptionPreprocess + 198
   1   libobjc.A.dylib                     0x00007fff8df14d5e objc_exception_throw + 43
   2   CoreFoundation                      0x00007fff91bb41be -[NSObject doesNotRecognizeSelector:] + 190
   3   CoreFoundation                      0x00007fff91b14e23 ___forwarding___ + 371
   4   CoreFoundation                      0x00007fff91b14c38 _CF_forwarding_prep_0 + 232
   5   CoreFoundation                      0x00007fff91af50eb -[NSDate compare:] + 59
   6   hazelworker                         0x0000000100022db2 start + 137178
   7   Foundation                          0x00007fff8bd0de05 -[NSComparisonPredicateOperator performPrimitiveOperationUsingObject:andObject:] + 400
   8   Foundation                          0x00007fff8bd0d701 -[NSPredicateOperator performOperationUsingObject:andObject:] + 109
   9   Foundation                          0x00007fff8bd0cfe8 -[NSComparisonPredicate evaluateWithObject:substitutionVariables:] + 290
   10  Foundation                          0x00007fff8bd0ca9a -[NSPredicate evaluateWithObject:] + 18
   11  hazelworker                         0x0000000100036f41 start + 219497
   12  hazelworker                         0x0000000100036c46 start + 218734
   13  hazelworker                         0x000000010003bf04 start + 239916
   14  hazelworker                         0x00000001000363dd start + 216581
   15  hazelworker                         0x00000001000027a0 start + 4552
   16  hazelworker                         0x00000001000036d3 start + 8443
   17  hazelworker                         0x0000000100006562 start + 20362
   18  hazelworker                         0x000000010000160c start + 52
)


Needless to say, I'm unable to decipher this. It's weird, because usual log messages, particularly for rules which contain Applescripts (see below) are much more informative and I can debug myself. Help please? :)

This is how the rule looks like.

Dropbox upload script

Universal Growl Notification script

Re: Strange problem: "unrecognized selector sent to instance

PostPosted: Mon May 21, 2012 11:20 am
by Mr_Noodle
I just uploaded a patch (3.0.7) that will fix it. After updating, open the rule again and save it. That should fix the rule so that it doesn't throw that error again.

Re: Strange problem: "unrecognized selector sent to instance

PostPosted: Thu May 24, 2012 3:43 pm
by Pe8er
Thanks for the info but 3.0.7 doesn't seem to be available. Did you mean 3.0.6 perhaps?

Re: Strange problem: "unrecognized selector sent to instance

PostPosted: Thu May 24, 2012 4:58 pm
by Mr_Noodle
Sorry. Yes, meant 3.0.6.

Re: Strange problem: "unrecognized selector sent to instance

PostPosted: Sat May 26, 2012 1:06 pm
by Pe8er
Okay :) Your fix worked, by the way. Thank you!