JDK-8221503 : vmTestbase/nsk/jdb/eval/eval001/eval001.java fails with: com.sun.jdi.InvalidTypeException: Can't assign double[][][] to double[][][]
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 13,15,16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-03-26
  • Updated: 2021-05-10
  • Resolved: 2021-05-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b21Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8221513 :  
Description
Log message is below. Probably due to JDK-8146986.

Sending command: eval nsk.jdb.eval.eval001.eval001a._eval001a.testPrimitiveArray(test)
reply[0]: com.sun.jdi.InvalidTypeException: Can't assign double[][][] to double[][][]
reply[1]:  nsk.jdb.eval.eval001.eval001a._eval001a.testPrimitiveArray(test) = null
reply[2]: main[1] 
# ERROR: jdb failed to report value of expression: nsk.jdb.eval.eval001.eval001a._eval001a.testPrimitiveArray(test)
The following stacktrace is for failure analysis.
nsk.share.TestFailure: jdb failed to report value of expression: nsk.jdb.eval.eval001.eval001a._eval001a.testPrimitiveArray(test)
	at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:428)
	at nsk.share.Log.complain(Log.java:399)
	at nsk.jdb.eval.eval001.eval001.checkValue(eval001.java:138)
	at nsk.jdb.eval.eval001.eval001.runCases(eval001.java:119)
	at nsk.share.jdb.JdbTest.runTest(JdbTest.java:149)
	at nsk.jdb.eval.eval001.eval001.run(eval001.java:85)
	at nsk.jdb.eval.eval001.eval001.main(eval001.java:78)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at PropertyResolvingWrapper.main(PropertyResolvingWrapper.java:104)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:835)
# ERROR: expected : 1.0 ;
# ERROR: reported: com.sun.jdi.InvalidTypeException: Can't assign double[][][] to double[][][]
Comments
Changeset: 82768d9a Author: Fairoz Matte <fmatte@openjdk.org> Committer: Serguei Spitsyn <sspitsyn@openjdk.org> Date: 2021-05-05 07:11:14 +0000 URL: https://git.openjdk.java.net/jdk/commit/82768d9a31edcfe5b27e75d681d3592c8f4a2ece
05-05-2021

PR - https://github.com/openjdk/jdk/pull/3658
27-04-2021

In findComponentType() method, We always get vm.classesByName() retruns empty list list = vm.classesByName(parser.typeName()); We have "parser.typeName()" retruns " double[][]" vm.classesByName("") is expecting the fully qualified name example "java.lang.Double" This always returns empty list, resulting into ClassNotLoadedException as it assumes the Component class has not yet been loaded, hence the test case fails. I didn't find any logic that can expect "double[][]" and returns me as "java.lang.Double". I tried to pass manually "java.lang.Double" to vm.classesByName() it makes testcase pass. I verified with one more thing as the suggestion in above comment, as replacing entire findComponentType() method with "return findType(signature);" fixes the problem.
21-04-2021

I've also verified this issue was not fixed by JDK-8212117. Moving it to tbd.
17-10-2019

This has not been fixed by JDK-8212117. Re-opening.
12-09-2019

should be fixed with JDK-8212117
15-04-2019

Assigned to Egor Ushakov from JetBrains. I've already tested a fix for this issue suggested by Egor: Index: src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayTypeImpl.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayTypeImpl.java (revision 54272:85657f4753e49a9341a8a6d2c2e4b6d7feabdd1b) +++ src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayTypeImpl.java (revision 54272+:85657f4753e4+) @@ -90,27 +90,7 @@ * this method is sometimes needed for proper type checking. */ Type findComponentType(String signature) throws ClassNotLoadedException { - byte tag = (byte)signature.charAt(0); - if (PacketStream.isObjectTag(tag)) { - // It's a reference type - JNITypeParser parser = new JNITypeParser(componentSignature()); - List<ReferenceType> list = vm.classesByName(parser.typeName()); - Iterator<ReferenceType> iter = list.iterator(); - while (iter.hasNext()) { - ReferenceType type = iter.next(); - ClassLoaderReference cl = type.classLoader(); - if ((cl == null)? - (classLoader() == null) : - (cl.equals(classLoader()))) { - return type; - } - } - // Component class has not yet been loaded - throw new ClassNotLoadedException(componentTypeName()); - } else { - // It's a primitive type - return vm.primitiveTypeMirror(tag); - } + return findType(signature); } public Type componentType() throws ClassNotLoadedException {
01-04-2019