java.lang.ArrayIndexOutOfBoundsException: 0 <= 2 < 1

JIRA | Kevin Normoyle | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    UPDATE; I updated the test to have fully legal ast, but this was my original mail the test still fails with the changes cd h2o-dev/py2/testdir_single_jvm python test_xl_aioobe.py the test is short it init's 3 keys, and then does this: { "ast": "(= ([ $c1 #1 #0) (+ ([ $a1 #2 #0) ([ $b1 #2 #0)))" } got exception: "java.lang.ArrayIndexOutOfBoundsException: 0 <= 2 < 1" here's the sequence of asts. Looks like I have a problem with the ## which made the keys smaller than I expected. I'll have to fix that. Seems like the problem is the last one is refering to row 2 which doesn't exist I did these in this order: ast: (= !a1 (is.na (c {#0}))) ast: (= !b1 (is.na (c {#0}))) ast: (= !c1 (is.na (c {#0}))) ast: (= !a1 {##0;#0})}; ast: (= !a1 (c {#0})) ast: (= !b1 {##0;#0})}; ast: (= !b1 (c {#0})) ast: (= !c1 {##0;#0})}; ast: (= !c1 (c {#0})) ast: (= ([ $c1 #1 #0) (+ ([ $a1 #2 #0) ([ $b1 #2 #0))) 12-06 20:03:50.226 192.168.0.34:54321 25520 # Session ERRR: java.lang.ArrayIndexOutOfBoundsException: 0 <= 2 < 1 java.lang.ArrayIndexOutOfBoundsException: 0 <= 2 < 1 at water.fvec.Vec.elem2ChunkIdx(Vec.java:584) at water.fvec.Vec.chunkForRow_impl(Vec.java:699) at water.fvec.Vec.chunkForRow(Vec.java:709) at water.fvec.Vec.at(Vec.java:721) at water.rapids.ASTSlice.exec(AST.java:1036) at water.rapids.AST.treeWalk(AST.java:99) at water.rapids.AST.treeWalk(AST.java:31) at water.rapids.AST.treeWalk(AST.java:65) at water.rapids.Exec.exec(Exec.java:74) at water.api.RapidsHandler.exec(RapidsHandler.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at water.api.Handler.handle(Handler.java:55) at water.api.RequestServer.handle(RequestServer.java:479) at water.api.RequestServer.serve(RequestServer.java:457) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:432) at java.lang.Thread.run(Thread.java:745)

    JIRA | 2 years ago | Kevin Normoyle
    java.lang.ArrayIndexOutOfBoundsException: 0 <= 2 < 1
  2. 0

    UPDATE; I updated the test to have fully legal ast, but this was my original mail the test still fails with the changes cd h2o-dev/py2/testdir_single_jvm python test_xl_aioobe.py the test is short it init's 3 keys, and then does this: { "ast": "(= ([ $c1 #1 #0) (+ ([ $a1 #2 #0) ([ $b1 #2 #0)))" } got exception: "java.lang.ArrayIndexOutOfBoundsException: 0 <= 2 < 1" here's the sequence of asts. Looks like I have a problem with the ## which made the keys smaller than I expected. I'll have to fix that. Seems like the problem is the last one is refering to row 2 which doesn't exist I did these in this order: ast: (= !a1 (is.na (c {#0}))) ast: (= !b1 (is.na (c {#0}))) ast: (= !c1 (is.na (c {#0}))) ast: (= !a1 {##0;#0})}; ast: (= !a1 (c {#0})) ast: (= !b1 {##0;#0})}; ast: (= !b1 (c {#0})) ast: (= !c1 {##0;#0})}; ast: (= !c1 (c {#0})) ast: (= ([ $c1 #1 #0) (+ ([ $a1 #2 #0) ([ $b1 #2 #0))) 12-06 20:03:50.226 192.168.0.34:54321 25520 # Session ERRR: java.lang.ArrayIndexOutOfBoundsException: 0 <= 2 < 1 java.lang.ArrayIndexOutOfBoundsException: 0 <= 2 < 1 at water.fvec.Vec.elem2ChunkIdx(Vec.java:584) at water.fvec.Vec.chunkForRow_impl(Vec.java:699) at water.fvec.Vec.chunkForRow(Vec.java:709) at water.fvec.Vec.at(Vec.java:721) at water.rapids.ASTSlice.exec(AST.java:1036) at water.rapids.AST.treeWalk(AST.java:99) at water.rapids.AST.treeWalk(AST.java:31) at water.rapids.AST.treeWalk(AST.java:65) at water.rapids.Exec.exec(Exec.java:74) at water.api.RapidsHandler.exec(RapidsHandler.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at water.api.Handler.handle(Handler.java:55) at water.api.RequestServer.handle(RequestServer.java:479) at water.api.RequestServer.serve(RequestServer.java:457) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:432) at java.lang.Thread.run(Thread.java:745)

    JIRA | 2 years ago | Kevin Normoyle
    java.lang.ArrayIndexOutOfBoundsException: 0 <= 2 < 1
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      0 <= 2 < 1

      at water.fvec.Vec.elem2ChunkIdx()
    2. water.fvec
      Vec.at
      1. water.fvec.Vec.elem2ChunkIdx(Vec.java:584)
      2. water.fvec.Vec.chunkForRow_impl(Vec.java:699)
      3. water.fvec.Vec.chunkForRow(Vec.java:709)
      4. water.fvec.Vec.at(Vec.java:721)
      4 frames
    3. water.rapids
      Exec.exec
      1. water.rapids.ASTSlice.exec(AST.java:1036)
      2. water.rapids.AST.treeWalk(AST.java:99)
      3. water.rapids.AST.treeWalk(AST.java:31)
      4. water.rapids.AST.treeWalk(AST.java:65)
      5. water.rapids.Exec.exec(Exec.java:74)
      5 frames
    4. water.api
      RapidsHandler.exec
      1. water.api.RapidsHandler.exec(RapidsHandler.java:47)
      1 frame
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    6. water.api
      RequestServer.serve
      1. water.api.Handler.handle(Handler.java:55)
      2. water.api.RequestServer.handle(RequestServer.java:479)
      3. water.api.RequestServer.serve(RequestServer.java:457)
      3 frames
    7. water
      NanoHTTPD$HTTPSession.run
      1. water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:432)
      1 frame
    8. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame