java.lang.ArrayIndexOutOfBoundsException sighting

Curiousity got the best of me and I wanted to see how other Ruby impls
would behave when used to build MRI 1.9.2dev for Windows using our
latest recipes on
http://github.com/oneclick/rubyinstaller/tree/use-devkit

After successfully getting through much of the build process, I received
the above mentioned exception in what appears to be fairly fundamental
JRuby classes.

If you need to replicate, let me know and I’ll reply with the patch I’m
using to the above branch and my configuration details while attempting
to build on Win7 Ultimate 32-bit using jruby 1.5.1 (ruby 1.8.7
patchlevel 249) (2010-06-06 f3a3480) (Java HotSpot™ Client VM
1.6.0_21) [x86-java]

Jon


gcc -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses
-Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long -I.
-I.ext/include/i386-mingw32
-I…/…/…/ruby_1_9_2/include -I…/…/…/ruby_1_9_2 -DRUBY_EXPORT -o
variable.o
-c …/…/…/ruby_1_9_2/variable.c
jruby.exe -Ks …/…/…/ruby_1_9_2/tool/insns2vm.rb
–srcdir="…/…/…/ruby_1_9_2" insns.inc
BaseSJISEncoding.java:47:in codeToMbcLength': java.lang.ArrayIndexOutOfBoundsException: -1 from RubyYaccLexer.java:466:inisMultiByteChar’
from RubyYaccLexer.java:456:in isIdentifierChar' from RubyYaccLexer.java:1062:ingetIdentifier’
from RubyYaccLexer.java:1429:in identifier' from RubyYaccLexer.java:1031:inyylex’
from RubyYaccLexer.java:293:in advance' from DefaultRubyParser.java:1380:inyyparse’
from DefaultRubyParser.java:1332:in yyparse' from DefaultRubyParser.java:3986:inparse’
from Parser.java:111:in parse' from Parser.java:82:inparse’
from Parser.java:74:in parse' from Ruby.java:2290:inparseEval’
from ASTInterpreter.java:96:in evalWithBinding' from RubyKernel.java:1045:ineval’
from
org/jruby/RubyKernel$s_method_0_3$RUBYFRAMEDINVOKER$eval.gen:65535:in
call' from DynamicMethod.java:160:incall’
from CachingCallSite.java:279:in cacheAndCall' from CachingCallSite.java:68:incall’
from FCallManyArgsNode.java:60:in interpret' from NewlineNode.java:104:ininterpret’
from IfNode.java:119:in interpret' from NewlineNode.java:104:ininterpret’
from InterpretedMethod.java:180:in call' from DefaultMethod.java:172:incall’
from CachingCallSite.java:309:in cacheAndCall' from CachingCallSite.java:148:incall’
from CallOneArgNode.java:57:in interpret' from NewlineNode.java:104:ininterpret’
from BlockNode.java:71:in interpret' from InterpretedMethod.java:139:incall’
from DefaultMethod.java:156:in call' from CachingCallSite.java:289:incacheAndCall’
from CachingCallSite.java:108:in call' from CallNoArgNode.java:61:ininterpret’
from DAsgnNode.java:110:in interpret' from NewlineNode.java:104:ininterpret’
from BlockNode.java:71:in interpret' from InterpretedBlock.java:373:inevalBlockBody’
from InterpretedBlock.java:346:in yield' from InterpretedBlock.java:303:inyield’
from Block.java:194:in yield' from RubyArray.java:1630:ineachCommon’
from RubyArray.java:1637:in each' from org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:65535:incall’
from CachingCallSite.java:299:in cacheAndCall' from CachingCallSite.java:117:incallBlock’
from CachingCallSite.java:122:in call' from CallNoArgBlockNode.java:64:ininterpret’
from NewlineNode.java:104:in interpret' from BlockNode.java:71:ininterpret’
from InterpretedMethod.java:180:in call' from DefaultMethod.java:172:incall’
from CachingCallSite.java:309:in cacheAndCall' from CachingCallSite.java:148:incall’
from insns2vm.rb:14:in __file__' from insns2vm.rb:-1:inload’
from Ruby.java:685:in runScript' from Ruby.java:568:inrunNormally’
from Ruby.java:414:in runFromMain' from Main.java:286:inrun’
from Main.java:128:in run' from Main.java:97:inmain’
make: *** [insns.inc] Error 1
rake aborted!
Command failed with status (2): [make…]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Looks like this is a bug in our Shift-JIS encoding support, which
isn’t surprising at all. You should go ahead and file a bug or provide
instructions to reproduce this. I’m not sure when we’ll get to fixing
it, but we should have the bug filed.

  • Charlie

On Sat, Aug 7, 2010 at 8:40 PM, Jon [email protected] wrote:

gcc -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
    from RubyYaccLexer.java:293:in advance'     from DynamicMethod.java:160:incall’
    from CallOneArgNode.java:57:in interpret'     from InterpretedBlock.java:373:inevalBlockBody’
    from NewlineNode.java:104:in interpret'     from Main.java:286:inrun’


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Looks like this is a bug in our Shift-JIS encoding support, which
isn’t surprising at all. You should go ahead and file a bug or provide
instructions to reproduce this. I’m not sure when we’ll get to fixing
it, but we should have the bug filed.

  • Charlie

While I can’t reproduce it with ruby-1.9.2-rc2, I can with the current
ruby_1_9_2 branch (29039) using the steps below. Since I can’t
reproduce on both versions I’ll hold off filing a bug report unless you
want it filed.

Jon

put ruby src in C:\Users\Jon\Documents\ruby_1_9_2

cd C:\Users\Jon\Documents
svn co http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_2

build RubyInstaller using gcc 4.5.0 and JRuby 1.5.1

git clone git://github.com/oneclick/rubyinstaller.git
cd rubyinstaller
git checkout -b use-devkit origin/use-devkit
git apply 0001-build-with-jruby.patch # :patch =>
http://gist.github.com/535786

confirm JRuby 1.5.1 is the only Ruby on PATH

rake ruby19 local=“C:\Users\Jon\Documents\ruby_1_9_2”

wait while everything is downloaded and built

BOOM


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs