#540: segfault with NSURLDownload with GC on -------------------------------------+-------------------------------------- Reporter: mattaimone...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: NSURLDownload, Cocoa -------------------------------------+--------------------------------------
Comment(by cha...@…): One potential issue with the macruby example code is passing 'self' as the delegate to the NSURLDownload instance. Maybe it's supposed to work, but since the delegate methods are defined in the top level namespace, I wasn't sure what the self instance actually refers to (?): {{{ $ macruby -e 'p self' # => main $ macruby -e 'p self.class' #=> TopLevel }}} I modified the gist example code to move the delegate methods inside of a Test class and then passed an instance of that class as the delegate to NSURLDownload. The new version no longer crashes during download: https://gist.github.com/d5d8f8a5208fa4a4d94c -- Ticket URL: <http://www.macruby.org/trac/ticket/540#comment:2> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel