Harmony
  1. Harmony
  2. HARMONY-6317

[drlvm][verifier] Verify error running SwingSet2 demo code

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0M1, 5.0M12
    • Component/s: DRLVM
    • Labels:
      None
    • Environment:

      Description

      Running SwingSet2 demo JAR produces a VerifyError on the console

      C:\>c:\hy\target\hdk\jdk\jre\bin\java.exe -jar "C:\java\Sun JDK 6.0\jdk6_14\demo\jfc\SwingSet2\SwingSet2.jar"
      Uncaught exception in Thread-338:
      java.lang.VerifyError: BezierAnimationPanel.paint(Ljava/awt/Graphics;)V, pass: 2089881640, instr: 67, reason: incorrect constantpool entr
      at java.lang.ClassLoader.defineClass0(ClassLoader.java)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:367)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:110)
      at java.net.URLClassLoader.access$3(URLClassLoader.java:1)
      at java.net.URLClassLoader$URLJarHandler.createClass(URLClassLoader.java:440)
      at java.net.URLClassLoader$URLJarHandler.findClass(URLClassLoader.java:371)
      at java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1212)
      at java.net.URLClassLoader$4.run(URLClassLoader.java:901)
      at java.net.URLClassLoader$4.run(URLClassLoader.java:1)
      at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)
      at java.security.AccessController.doPrivileged(AccessController.java:64)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:903)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:489)
      at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:871)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
      at java.lang.VMClassRegistry.initializeClass(VMClassRegistry.java)
      at java.lang.Class.forName(Class.java:147)
      at java.lang.Class.forName(Class.java:90)
      at SwingSet2.loadDemo(SwingSet2.java:765)
      at SwingSet2.loadDemos(SwingSet2.java:95)
      at SwingSet2$DemoLoadThread.run(SwingSet2.java:1359)

        Activity

        Hide
        Tim Ellison added a comment -

        Removing the fix version tag for 5.0M11 as it fails the same way on 5.0M10.

        Show
        Tim Ellison added a comment - Removing the fix version tag for 5.0M11 as it fails the same way on 5.0M10.
        Hide
        Tim Ellison added a comment -

        My bad, I was trying to run the Java 6 version.

        The IBM JRE reports the error as:

        C:\java\IBM JDK 5.0\SR9\jre\bin>.\java.exe -showversion -jar "C:\java\Sun JDK 6.0\jdk6_14\demo\jfc\SwingSet2\SwingSet2.jar"
        java version "1.5.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build pwi32devifx-20090327 (SR9-SSU ))
        IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20081129 (JIT enabled)
        J9VM - 20081126_26240_lHdSMr
        JIT - 20081112_1511ifx1_r8
        GC - 200811_07)
        JCL - 20090327

        The java class could not be loaded. java.lang.UnsupportedClassVersionError: (SwingSet2) bad major version at offset=6

        and the Sun impl reports:

        C:\java\Sun JDK 5.0\jdk1.5.0_19\jre\bin>.\java.exe -showversion -jar "C:\java\Sun JDK 6.0\jdk6_14\demo\jfc\SwingSet2\SwingSet2.jar"
        java version "1.5.0_19"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02)
        Java HotSpot(TM) Client VM (build 1.5.0_19-b02, mixed mode)

        Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

        So I'll raise a new issue to complain that harmony throws a verify error, whereas others report it as an UnsupportedClassVersionError

        Show
        Tim Ellison added a comment - My bad, I was trying to run the Java 6 version. The IBM JRE reports the error as: C:\java\IBM JDK 5.0\SR9\jre\bin>.\java.exe -showversion -jar "C:\java\Sun JDK 6.0\jdk6_14\demo\jfc\SwingSet2\SwingSet2.jar" java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pwi32devifx-20090327 (SR9-SSU )) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20081129 (JIT enabled) J9VM - 20081126_26240_lHdSMr JIT - 20081112_1511ifx1_r8 GC - 200811_07) JCL - 20090327 The java class could not be loaded. java.lang.UnsupportedClassVersionError: (SwingSet2) bad major version at offset=6 and the Sun impl reports: C:\java\Sun JDK 5.0\jdk1.5.0_19\jre\bin>.\java.exe -showversion -jar "C:\java\Sun JDK 6.0\jdk6_14\demo\jfc\SwingSet2\SwingSet2.jar" java version "1.5.0_19" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02) Java HotSpot(TM) Client VM (build 1.5.0_19-b02, mixed mode) Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) So I'll raise a new issue to complain that harmony throws a verify error, whereas others report it as an UnsupportedClassVersionError
        Hide
        Oliver Deakin added a comment -

        After the response from Mikhail [1] on the dev list, Im going to remove this debug code completely.

        [1] http://mail-archives.apache.org/mod_mbox/harmony-dev/200909.mbox/%3c906dd82e0909040432h1ee30a8sf5962f183b73c3b8@mail.gmail.com%3e

        Show
        Oliver Deakin added a comment - After the response from Mikhail [1] on the dev list, Im going to remove this debug code completely. [1] http://mail-archives.apache.org/mod_mbox/harmony-dev/200909.mbox/%3c906dd82e0909040432h1ee30a8sf5962f183b73c3b8@mail.gmail.com%3e
        Hide
        Oliver Deakin added a comment -

        Reopening because this verify failure occurs with our Java 6 builds as well as Java 5.

        Fix applied at repo revision r811411 - Tim, please verify that this fixes the problem for you.

        Show
        Oliver Deakin added a comment - Reopening because this verify failure occurs with our Java 6 builds as well as Java 5. Fix applied at repo revision r811411 - Tim, please verify that this fixes the problem for you.
        Hide
        Alexei Fedotov added a comment -

        So did the fix help? Oliver, your last entry is a bit confusing.

        Show
        Alexei Fedotov added a comment - So did the fix help? Oliver, your last entry is a bit confusing.
        Hide
        Oliver Deakin added a comment -

        Yep, the fix worked for me - I reopened the JIRA and marked it resolved after I had applied the patch so Tim (the JIRA reporter) could verify that it's fixed for him too.

        Show
        Oliver Deakin added a comment - Yep, the fix worked for me - I reopened the JIRA and marked it resolved after I had applied the patch so Tim (the JIRA reporter) could verify that it's fixed for him too.
        Hide
        Alexei Fedotov added a comment -

        Ok then. Thanks for resolving the problem.

        Show
        Alexei Fedotov added a comment - Ok then. Thanks for resolving the problem.
        Hide
        Tim Ellison added a comment -

        Thanks Oli.

        Show
        Tim Ellison added a comment - Thanks Oli.

          People

          • Assignee:
            Oliver Deakin
            Reporter:
            Tim Ellison
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development