Community
Participate
Working Groups
Accessing arrays directly after reading them out of a collection like a Vector leads to a VerifyError using Integration Build I20040907. The problem can be reproduced using the following code: import java.util.Vector; public class VMTest{ public static void main(String[] args){ Vector<Integer[]> v = new Vector<Integer[]>(); Integer[] array1 = new Integer[5]; array1[0] = new Integer(17); array1[1] = new Integer(42); v.add(array1); Integer twentyfour = v.get(0)[1]; // responsible for the crash System.out.println(twentyfour); } } Replacing the line Integer twentyfour = v.get(0)[1]; by the two lines Integer[] array2 = v.get(0); Integer twentyfour = array2[1]; will fix the problem, but i think the original code should work as well... The error message is: java.lang.VerifyError: (class: VMTest, method: main signature: ([Ljava/lang/String;)V) Expecting to find array of objects or arrays on stack Exception in thread "main"
*** Bug 73531 has been marked as a duplicate of this bug. ***
I will investigate.
There is a missing checkcast in the code generated by Eclipse. This is leading to this VerifyError.
ArrayReference was missing a call to computeConversion for the receiver. Fixed and released in HEAD. Regression test added.
Olivier - where is the fix?
Found fix on ArrayReference, looks good.
Verified in I200409230100.