Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8139659

NullPointerException at com.sun.deploy.cache.CleanupThread$2.compare

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      Java version: 1.8.0_60, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

      VM arguments: [-Djava.security.manager, -Djava.security.policy=file:C:\Program Files\Java\jre1.8.0_60\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Users\<XXX>\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\56\1ee8cfb8-44547ac1, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.splashport=59276, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp, -Djnlpx.jvm=<java.home>\bin\javaw.exe, -Djnlpx.vmargs=LURqYXZhLnV0aWwuQXJyYXlzLnVzZUxlZ2FjeU1lcmdlU29ydD10cnVlAC1Eam5scC5hcHBsaWNhdGlvbi5ocmVmPWh0dHBzOi8vam9zbS5vcGVuc3RyZWV0bWFwLmRlL2Rvd25sb2FkL2pvc20uam5scAA=]


      ADDITIONAL OS VERSION INFORMATION :
      Windows 7 32-Bit
      Windows 7 64-Bit

      A DESCRIPTION OF THE PROBLEM :
      This is an upstream bug report for this issue reported two times for JOSM:
      https://josm.openstreetmap.de/ticket/11743
      https://josm.openstreetmap.de/ticket/11946

      Users face an NPE when Java Web Start seems to try to clear the cache, as the stacktrace makes us think.

      It may be linked to the usage of -Djava.util.Arrays.useLegacyMergeSort=true

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Launch JOSM in JNLP: https://josm.openstreetmap.de/download/josm.jnlp

      The JNLP defines the property -Djava.util.Arrays.useLegacyMergeSort=true

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      JOSM starts without error.
      ACTUAL -
      Java Web Start crashes.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      two different stacktraces.

      this one for 8u51:
      java.lang.NullPointerException
      at com.sun.deploy.cache.CacheEntry.removeBefore(Unknown Source)
      at com.sun.deploy.cache.CleanupThread$2.compare(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.legacyMergeSort(Unknown Source)
      at java.util.Arrays.sort(Unknown Source)
      at com.sun.deploy.cache.CleanupThread.prepareRemovalList(Unknown Source)
      at com.sun.deploy.cache.CleanupThread.run(Unknown Source)

      This one for 8u60:
      java.lang.NullPointerException
      at com.sun.deploy.cache.CleanupThread$2.compare(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.mergeSort(Unknown Source)
      at java.util.Arrays.legacyMergeSort(Unknown Source)
      at java.util.Arrays.sort(Unknown Source)
      at com.sun.deploy.cache.CleanupThread.prepareRemovalList(Unknown Source)
      at com.sun.deploy.cache.CleanupThread.run(Unknown Source)

      REPRODUCIBILITY :
      This bug can be reproduced rarely.

      ---------- BEGIN SOURCE ----------
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
      <jnlp spec="6.0+" codebase="https://josm.openstreetmap.de/download/" href="josm.jnlp">
          <information>
              <title>JOSM</title>
              <vendor>OpenStreetMap</vendor>
              <homepage href="https://josm.openstreetmap.de"/>
              <description>Java OpenStreetMap editor</description>
              <description kind="one-line">JOSM</description>
              <description kind="tooltip">JOSM</description>
              <icon href="https://josm.openstreetmap.de/svn/trunk/images/logo.png"/>
              <offline-allowed/>
              <shortcut>
                  <desktop/>
                  <menu/>
              </shortcut>
          </information>
          <security>
              <all-permissions/>
          </security>
          <resources>
              <j2se version="1.7+"/>
              <jar href="josm-tested.jar"/>
              <property name="java.util.Arrays.useLegacyMergeSort" value="true"/>
          </resources>
          <application-desc main-class="JOSM"/>
      </jnlp>

      ---------- END SOURCE ----------

        Attachments

          Activity

            People

            • Assignee:
              dmarkov Dmitry Markov
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: