Skip to content

ArrayIndexOutOfBoundsException ManyVarsDynamicScope #3057

Closed
@dekz

Description

@dekz
1] pry(main)> ls
ManyVarsDynamicScope.java:145:in `setValueDepthZero': java.lang.ArrayIndexOutOfBoundsException: 0
    from ManyVarsDynamicScope.java:138:in `setValue'
    from RubyBinding.java:169:in `local_variable_set'
    from RubyBinding$INVOKER$i$2$0$local_variable_set.gen:-1:in `call'
    from JavaMethod.java:1055:in `call'
    from JavaMethod.java:693:in `call'
    from CachingCallSite.java:273:in `cacheAndCall'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:83:in `call'
    from CallBase.java:419:in `interpret'
    from InterpreterEngine.java:324:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from MixedModeIRMethod.java:129:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:115:in `call'
    from CachingCallSite.java:273:in `cacheAndCall'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:83:in `call'
    from CallBase.java:419:in `interpret'
    from InterpreterEngine.java:324:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from Interpreter.java:137:in `INTERPRET_BLOCK'
    from InterpretedIRBlockBody.java:116:in `commonYieldPath'
    from IRBlockBody.java:139:in `doYield'
    from BlockBody.java:77:in `yield'
    from Block.java:147:in `yield'
    from RubyHash.java:1356:in `visit'
    from RubyHash.java:656:in `visitLimited'
    from RubyHash.java:642:in `visitAll'
    from RubyHash.java:1305:in `iteratorVisitAll'
    from RubyHash.java:1351:in `each_pairCommon'
    from RubyHash.java:1342:in `each19'
    from RubyHash$INVOKER$i$0$0$each19.gen:-1:in `call'
    from JavaMethod.java:472:in `call'
    from CachingCallSite.java:273:in `cacheAndCall'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:83:in `call'
    from CallBase.java:419:in `interpret'
    from InterpreterEngine.java:324:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from InterpreterEngine.java:78:in `interpret'
    from MixedModeIRMethod.java:164:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:150:in `call'
    from DynamicMethod.java:197:in `call'
    from CachingCallSite.java:293:in `cacheAndCall'
    from CachingCallSite.java:131:in `call'
    from InterpreterEngine.java:308:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from MixedModeIRMethod.java:129:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:115:in `call'
    from CachingCallSite.java:273:in `cacheAndCall'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:83:in `call'
    from CallBase.java:419:in `interpret'
    from InterpreterEngine.java:324:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from Interpreter.java:137:in `INTERPRET_BLOCK'
    from InterpretedIRBlockBody.java:116:in `commonYieldPath'
    from IRBlockBody.java:139:in `doYield'
    from BlockBody.java:77:in `yield'
    from Block.java:147:in `yield'
    from RubyContinuation.java:107:in `enter'
    from RubyKernel.java:1106:in `rbCatch19Common'
    from RubyKernel.java:1099:in `rbCatch19'
    from RubyKernel$INVOKER$s$rbCatch19.gen:-1:in `call'
    from CachingCallSite.java:323:in `cacheAndCall'
    from CachingCallSite.java:173:in `callBlock'
    from CachingCallSite.java:177:in `call'
    from InterpreterEngine.java:301:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from Interpreter.java:137:in `INTERPRET_BLOCK'
    from InterpretedIRBlockBody.java:116:in `commonYieldPath'
    from IRBlockBody.java:139:in `doYield'
    from BlockBody.java:77:in `yield'
    from Block.java:147:in `yield'
    from RubyContinuation.java:107:in `enter'
    from RubyKernel.java:1106:in `rbCatch19Common'
    from RubyKernel.java:1099:in `rbCatch19'
    from RubyKernel$INVOKER$s$rbCatch19.gen:-1:in `call'
    from CachingCallSite.java:323:in `cacheAndCall'
    from CachingCallSite.java:173:in `callBlock'
    from CachingCallSite.java:177:in `call'
    from InterpreterEngine.java:301:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from InterpreterEngine.java:84:in `interpret'
    from MixedModeIRMethod.java:199:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:185:in `call'
    from DynamicMethod.java:205:in `call'
    from CachingCallSite.java:313:in `cacheAndCall'
    from CachingCallSite.java:163:in `call'
    from InterpreterEngine.java:292:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from Interpreter.java:137:in `INTERPRET_BLOCK'
    from InterpretedIRBlockBody.java:116:in `commonYieldPath'
    from IRBlockBody.java:66:in `yieldSpecific'
    from Block.java:116:in `yieldSpecific'
    from RubyKernel.java:1292:in `loop'
    from RubyKernel$INVOKER$s$0$0$loop.gen:-1:in `call'
    from JavaMethod.java:472:in `call'
    from CachingCallSite.java:273:in `cacheAndCall'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:83:in `call'
    from CallBase.java:419:in `interpret'
    from InterpreterEngine.java:324:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from InterpreterEngine.java:78:in `interpret'
    from MixedModeIRMethod.java:164:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:150:in `call'
    from DynamicMethod.java:197:in `call'
    from CachingCallSite.java:293:in `cacheAndCall'
    from CachingCallSite.java:131:in `call'
    from InterpreterEngine.java:308:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from Interpreter.java:137:in `INTERPRET_BLOCK'
    from InterpretedIRBlockBody.java:116:in `commonYieldPath'
    from IRBlockBody.java:58:in `call'
    from Block.java:106:in `call'
    from RubyProc.java:317:in `call'
    from RubyProc.java:301:in `call19'
    from RubyProc$INVOKER$i$0$0$call19.gen:-1:in `call'
    from DynamicMethod.java:201:in `call'
    from DynamicMethod.java:197:in `call'
    from CachingCallSite.java:293:in `cacheAndCall'
    from CachingCallSite.java:131:in `call'
    from InterpreterEngine.java:308:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from MixedModeIRMethod.java:129:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:115:in `call'
    from CachingCallSite.java:273:in `cacheAndCall'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:83:in `call'
    from CallBase.java:419:in `interpret'
    from InterpreterEngine.java:324:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from MixedModeIRMethod.java:129:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:115:in `call'
    from CachingCallSite.java:273:in `cacheAndCall'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:83:in `call'
    from CallBase.java:419:in `interpret'
    from InterpreterEngine.java:324:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from InterpreterEngine.java:78:in `interpret'
    from MixedModeIRMethod.java:164:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:150:in `call'
    from DynamicMethod.java:197:in `call'
    from CachingCallSite.java:293:in `cacheAndCall'
    from CachingCallSite.java:131:in `call'
    from InterpreterEngine.java:308:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from InterpreterEngine.java:84:in `interpret'
    from MixedModeIRMethod.java:199:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:185:in `call'
    from DynamicMethod.java:205:in `call'
    from CachingCallSite.java:313:in `cacheAndCall'
    from CachingCallSite.java:163:in `call'
    from InterpreterEngine.java:292:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from MixedModeIRMethod.java:129:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:115:in `call'
    from CachingCallSite.java:273:in `cacheAndCall'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:83:in `call'
    from CallBase.java:419:in `interpret'
    from InterpreterEngine.java:324:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from Interpreter.java:137:in `INTERPRET_BLOCK'
    from InterpretedIRBlockBody.java:116:in `commonYieldPath'
    from IRBlockBody.java:58:in `call'
    from Block.java:106:in `call'
    from RubyProc.java:317:in `call'
    from RubyProc.java:301:in `call19'
    from RubyProc$INVOKER$i$0$0$call19.gen:-1:in `call'
    from DynamicMethod.java:209:in `call'
    from DynamicMethod.java:205:in `call'
    from CachingCallSite.java:313:in `cacheAndCall'
    from CachingCallSite.java:163:in `call'
    from InterpreterEngine.java:292:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from Interpreter.java:137:in `INTERPRET_BLOCK'
    from InterpretedIRBlockBody.java:116:in `commonYieldPath'
    from IRBlockBody.java:139:in `doYield'
    from BlockBody.java:77:in `yield'
    from Block.java:147:in `yield'
    from RubyArray.java:1571:in `each'
    from RubyArray$INVOKER$i$0$0$each.gen:-1:in `call'
    from JavaMethod.java:472:in `call'
    from CachingCallSite.java:273:in `cacheAndCall'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:83:in `call'
    from CallBase.java:419:in `interpret'
    from InterpreterEngine.java:324:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from InterpreterEngine.java:78:in `interpret'
    from MixedModeIRMethod.java:164:in `INTERPRET_METHOD'
    from MixedModeIRMethod.java:150:in `call'
    from DynamicMethod.java:197:in `call'
    from CachingCallSite.java:293:in `cacheAndCall'
    from CachingCallSite.java:131:in `call'
    from InterpreterEngine.java:308:in `processCall'
    from StartupInterpreterEngine.java:78:in `interpret'
    from Interpreter.java:117:in `INTERPRET_ROOT'
    from Interpreter.java:104:in `execute'
    from Interpreter.java:33:in `execute'
    from IRTranslator.java:42:in `execute'
    from Ruby.java:861:in `runInterpreter'
    from Ruby.java:2934:in `loadFile'
    from LibrarySearcher.java:244:in `load'
    from LibrarySearcher.java:34:in `load'
    from LoadService.java:329:in `load'
    from RubyKernel.java:966:in `loadCommon'
    from RubyKernel.java:958:in `load19'
    from RubyKernel$INVOKER$s$0$1$load19.gen:-1:in `call'
    from DynamicMethod.java:209:in `call'
    from DynamicMethod.java:205:in `call'
    from CachingCallSite.java:313:in `cacheAndCall'
    from CachingCallSite.java:163:in `call'
    from /Users/jacob/.rbenv/versions/jruby-9.0.0.0-dev/bin/pry:-1:in `invokeOther19:load'
    from /Users/jacob/.rbenv/versions/jruby-9.0.0.0-dev/bin/pry:23:in `RUBY$script'
    from MethodHandle.java:625:in `invokeWithArguments'
    from Compiler.java:111:in `load'
    from Ruby.java:835:in `runScript'
    from Ruby.java:824:in `runScript'
    from Ruby.java:754:in `runNormally'
    from Ruby.java:575:in `runFromMain'
    from Main.java:401:in `doRunFromMain'
    from Main.java:296:in `internalRun'
    from Main.java:225:in `run'
    from Main.java:197:in `main'

Steps to reproduce:

  • Install Pry
  • pry
  • Do anything in a pry session

Affected versions: 9000 rc1 9000 HEAD@d2979e3
Working versions: 9000 pre2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions