[MacRuby] #452: Segmentation Fault tracing back to openssl.bundle when authenticating with gcal4ruby
#452: Segmentation Fault tracing back to openssl.bundle when authenticating with gcal4ruby --------------------------------+------------------------------------------- Reporter: dweinric@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Some caveats: * due to a different issue I had to comment the {{{require "nkf"}}} line out of gcal4ruby * I haven't yet tried a generic attempt to connect using https without the gcal4ruby library {{{ irb(main):002:0> require "rubygems" => true irb(main):003:0> require "gcal4ruby" => true irb(main):004:0> service = GCal4Ruby::Service.new => <GCal4Ruby::Service:0x20046bd60 @check_public=true> irb(main):005:0> service.authenticate("<user>@gmail.com","<password>") dyld: lazy symbol binding failed: Symbol not found: _rb_call_super Referenced from: /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/site_ruby/1.9.0 /universal-darwin10.0/openssl.bundle Expected in: flat namespace dyld: Symbol not found: _rb_call_super Referenced from: /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/site_ruby/1.9.0 /universal-darwin10.0/openssl.bundle Expected in: flat namespace Segmentation fault }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/452> MacRuby <http://macruby.org/>
#452: Segmentation Fault tracing back to openssl.bundle when authenticating with gcal4ruby --------------------------------+------------------------------------------- Reporter: dweinric@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.5 Comment: The crash should be fixed by r3050. Your snippet now fails elsewhere: {{{ $ DYLD_LIBRARY_PATH=. ./macruby -I./ext/openssl -r rubygems -e "require 'gcal4ruby'; service=GCal4Ruby::Service.new; service.authenticate('<user>@gmail.com','<password>')" core:in `connect': undefined method `set_params' for #<OpenSSL::SSL::SSLContext:0x200546640> (NoMethodError) from core:in `do_start' from core:in `start' from /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/base.rb:111:in `send_post:' from /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:43:in `authenticate:' }}} I believe it is because OpenSSL::SSL::SSLContext#set_params is defined as internal API and net/http hasn't been updated yet. This is anyway a different bug, so I'm closing this one. -- Ticket URL: <http://www.macruby.org/trac/ticket/452#comment:1> MacRuby <http://macruby.org/>
#452: Segmentation Fault tracing back to openssl.bundle when authenticating with gcal4ruby --------------------------------+------------------------------------------- Reporter: dweinric@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Comment(by lsansonetti@…): I actually have a different error now. {{{ $ macruby -r rubygems -e "require 'gcal4ruby'; service=GCal4Ruby::Service.new; service.authenticate('<user>@gmail.com','<password>')" core:in `sysclose': wrong argument type OpenSSL::SSL::SSLSocket (expected Data) (TypeError) from /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/site_ruby/1.9.0/openssl/buffering.rb:336:in `close' from core:in `close' from core:in `do_finish' from core:in `start' from /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/base.rb:111:in `send_post:' from /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:43:in `authenticate:' }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/452#comment:2> MacRuby <http://macruby.org/>
#452: Segmentation Fault tracing back to openssl.bundle when authenticating with gcal4ruby --------------------------------+------------------------------------------- Reporter: dweinric@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Comment(by lsansonetti@…): With r3051, this now fails as expected. {{{ $ macruby -r rubygems -e "require 'gcal4ruby'; service=GCal4Ruby::Service.new; service.authenticate('<user>@gmail.com','<password>')" core:in `raise:': Error=BadAuthentication (GCal4Ruby::HTTPPostFailed) from /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/base.rb:113:in `send_post:' from /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:43:in `authenticate:' }}} When I do pass my gmail account information, it fails differently: {{{ /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:42:in `authenticate:': undefined method `to_a' for #<NSMutableString:0x2005a5020> (NoMethodError) }}} Looking at line 43 of gcal4ruby/service.rb: {{{ @auth_token = ret.read_body.to_a[2].gsub("Auth=", "").strip }}} #read_body (defined in net/http) is supposed to return a String, I believe. String#to_a is not defined anymore in 1.9. I believe this is a 1.8 vs 1.9 issue (but I'm not sure). Let me know if you find anything. -- Ticket URL: <http://www.macruby.org/trac/ticket/452#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby