[Sparkle] Sparkle causes crash on launch with custom URL, RubyCocoa

Andy Matuschak andy at andymatuschak.org
Tue May 13 15:42:48 PDT 2008


Okay, I think this is happening because some value's being saved or  
interpreted as an NSString instead of an NSNumber, and I'm calling  
longValue expecting the latter. I've changed those calls to  
doubleValue, which is implemented by both classes. Update to bzr  
revision 124 and give it another shot.

- Andy Matuschak

On May 9, 2008, at 9:31 PM, Christopher Bailey wrote:

> First, I acknowledge this is probably a serious long shot, but...  I  
> have a small RubyCocoa app that registers as a custom URL handler.   
> It has Sparkle in it.  What I've found is that if I launch my app  
> via the URL, e.g. I do this from a terminal (or the equivalent link  
> from a browser):
>
> open "bwalinker:mycustomthingy=foo"
>
> What happens is my app appears to start up, but then crashes.  If on  
> the other hand I do that same open command from the command line,  
> but the app is already running, things are fine.  I finally tracked  
> this down to some interaction with Sparkle.  If I remove Sparkle,  
> then no more crash.
>
> I'm wondering if anyone else has seen something like this?  It's a  
> royal pain to debug (at least with my knowledge of Xcode debugging  
> and so on), because it's on launch, and so I can't start the app  
> with the debugger (or is there a way to cause the debugger to start  
> or attach to it when launched via a URL like this?), not to mention  
> that the crash occurs down in Ruby code.
>
> I don't think it has any impact, because my app can launch in the  
> case where it's not launched via the custom URL handler, but Sparkle  
> spits out two of the same unrecognized selector messages to the  
> console during launch:
>
>  NSInvalidArgumentException - *** -[NSCFString longValue]:  
> unrecognized selector sent to instance 0x22baa0 (OSX::OCException)
>
> We see this on Leopard.
>
> -- 
> Christopher Bailey
> Cobalt Edge LLC
> http://cobaltedge.com
> _______________________________________________
> Sparkle mailing list
> Sparkle at lists.andymatuschak.org
> http://lists.andymatuschak.org/listinfo.cgi/sparkle-andymatuschak.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andymatuschak.org/pipermail/sparkle-andymatuschak.org/attachments/20080513/6d1bab3a/attachment.htm>


More information about the Sparkle mailing list