[MacRuby-devel] [MacRuby] #604: EXC_BAD_ACCESS while opening stream

MacRuby ruby-noreply at macosforge.org
Sun Feb 21 02:12:12 PST 2010


#604: EXC_BAD_ACCESS while opening stream
-----------------------------------+----------------------------------------
 Reporter:  jakub.suder@…          |       Owner:  lsansonetti@…        
     Type:  defect                 |      Status:  new                  
 Priority:  critical               |   Milestone:                       
Component:  MacRuby                |    Keywords:                       
-----------------------------------+----------------------------------------

Comment(by jakub.suder@…):

 I've tried the "if NULL" fix, but all it does is makes my request fail
 instead of crashing the program, so it's not really a solution...

 I think you're right that Ruby must be overriding something that it
 shouldn't override. The previous function on the stack is CFReadStreamOpen
 and I found some sources here
 http://www.opensource.apple.com/source/CF/CF-550/CFStream.c from which it
 looks like the CFReadStreamOpen function should just call "open" method on
 the provided stream object, but instead it magically appears in the Ruby's
 Kernel::open method (if I understand correctly what rb_f_open means)... I
 tried to figure out if I can reroute the call to the proper place from
 rb_f_open, but I just don't know the code well enough. Looks like the argc
 is 4, argv is NULL, SEL is a "open" string, but I have no idea what I can
 do with that.

 For now I'll try to work around this by using pure NSURLConnection or even
 some non-Cocoa Ruby code, but please take a look at this.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/604#comment:6>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list