cext GC still causing issues with classes/modules defined in C
--------------------------------------------------------------

                 Key: JRUBY-5702
                 URL: http://jira.codehaus.org/browse/JRUBY-5702
             Project: JRuby
          Issue Type: Bug
          Components: C Extensions
    Affects Versions: JRuby 1.6
            Reporter: Aman Gupta
            Assignee: Thomas E Enebo


I fixed some of these issues in JRUBY-5690, but am still having problems =(

{noformat}
# wget https://rubygems.org/downloads/nokogiri-1.4.4.gem
# gem install nokogiri-1.4.4.gem

# force nokogiri 1.4.4 to load cext instead of ffi
Object.const_set(:RUBY_PLATFORM, 'ruby')

require 'rubygems'
require 'nokogiri'

raise 'not using 1.4.4' unless Nokogiri::VERSION == '1.4.4'
raise 'not using cext' unless Nokogiri::VERSION_INFO['libxml']['binding'] == 
'extension'

10_000.times do |i|
  begin
    Nokogiri::HTML::DocumentFragment.parse('<p>hello world</p>')
  rescue Object
    p i
    raise
  end
end

__END__

NoMethodError: undefined method `push' for "UTF-8":String
   parse at 
~/.rvm/gems/jruby-head/gems/nokogiri-1.4.4/lib/nokogiri/html/document_fragment.rb:14
  (root) at nktest.rb:15
   times at org/jruby/RubyFixnum.java:256
  (root) at nktest.rb:13

JRuby.java:77:in `callRubyMethod1': java.lang.IncompatibleClassChangeError
        from Native.java:-2:in `callMethod'
        from Native.java:206:in `callMethod'
        from NativeMethod.java:125:in `call'
        from DynamicMethod.java:217:in `call'
        from DynamicMethod.java:213:in `call'
        from CachingCallSite.java:171:in `call'
        from 
/Users/test/.rvm/gems/jruby-head/gems/nokogiri-1.4.4/lib/nokogiri/html/document_fragment.rb:14:in
 `__file__'
        from 
/Users/test/.rvm/gems/jruby-head/gems/nokogiri-1.4.4/lib/nokogiri/html/document_fragment.rb:-1:in
 `__file__'
        from AbstractScript.java:41:in `__file__'
        from JittedMethod.java:167:in `call'
        from CachingCallSite.java:137:in `call'
        from nktest.rb:15:in `chained_0_rescue_1$RUBY$SYNTHETIC__file__'
        from nktest.rb:14:in `block_0$RUBY$__file__'
        from nktest$block_0$RUBY$__file__:65535:in `call'
        from CompiledBlock.java:112:in `yield'
        from CompiledBlock.java:95:in `yield'
        from Block.java:130:in `yield'
        from RubyFixnum.java:256:in `times'
        from RubyFixnum$i$0$0$times.gen:65535:in `call'
        from CachingCallSite.java:272:in `cacheAndCall'
        from CachingCallSite.java:114:in `callBlock'
        from CachingCallSite.java:123:in `callIter'
        from nktest.rb:13:in `__file__'
        from nktest.rb:-1:in `load'
        from Ruby.java:671:in `runScript'
        from Ruby.java:575:in `runNormally'
        from Ruby.java:424:in `runFromMain'
        from Main.java:278:in `doRunFromMain'
        from Main.java:198:in `internalRun'
        from Main.java:164:in `run'
        from Main.java:148:in `run'
        from Main.java:128:in `main'
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to