Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.7, JRuby 1.7.0.pre1
    • Fix Version/s: JRuby 1.7.0.pre2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OS X 10.7.4, Java 64-bit server VM 1.7.0_04. Reproduced under versions above as well as commit 903a934 from July 6.
    • Testcase included:
      yes
    • Source ID:
      31
    • Number of attachments :
      0

      Description

      As indicated in https://github.com/csw/bioruby-maf/issues/31, a particular subset of unit tests involving the @sequence_filter instance variable of Bio::MAF::Parser (see lib/bio/maf/parser.rb) will pass when run by themselves, but fail when certain other unit tests (tagged with :bug in spec/bio/maf/parser_spec.rb) are also executed. If the instance variable is explicitly set to nil in the constructor, or any of the three #fetch_blocks unit tests tagged with :bug are not executed, or the variable is read with @sequence_filter rather than calling the Parser#sequence_filter accessor method, the bug disappears. I have not been able to narrow down the bug any further or come up with a good explanation of this; I suspect some sort of compiler bug.

      I have come up with a workaround, but this is clearly a bug of some sort; MRI works fine with the same code.

      To reproduce:

      git clone https://github.com/csw/bioruby-maf.git
      cd bioruby-maf
      git checkout jruby-sequence-filter-bug
      rvm use jruby-head [or equivalent]
      bundle install
      rspec -e sequence_filter
      [passes]
      rspec -t bug
      [fails]

      Let me know if I can help refine this any further.

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        I believe there's a bug fixed on master relating to how attr_accessors are handled by the Java 7 compiler backend. They were caching a bad variable offset and as a result failing to find variables in a similar way to what you describe. Can you try testing this against JRuby master?

        Show
        Charles Oliver Nutter added a comment - I believe there's a bug fixed on master relating to how attr_accessors are handled by the Java 7 compiler backend. They were caching a bad variable offset and as a result failing to find variables in a similar way to what you describe. Can you try testing this against JRuby master?
        Hide
        Clayton Wheeler added a comment -

        This is fixed on master with a build from 7/18/2012.

        Show
        Clayton Wheeler added a comment - This is fixed on master with a build from 7/18/2012.

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Clayton Wheeler
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: