JDK-8051030 : Web Start applet process fails to exit
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 7u65,7u151,8u40,9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2014-07-17
  • Updated: 2017-08-09
  • Resolved: 2015-05-28
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 8 JDK 9
8u60 b19Fixed 9Fixed
Description
FULL PRODUCT VERSION :
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Windows 7 Professional Service Pack 1

A DESCRIPTION OF THE PROBLEM :
For <applet-desc> type JNLP files, Web Start process (jp2launcher) does not terminate after the main window is closed.

REGRESSION.  Last worked in version 7u60

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Launch the Java 2D demo as a Web Start application by running

javaws http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/examples/dist/depltoolkit_Java2Demo/java2d.jnlp

Close the Java 2D demo window using the X button.

Check that the jp2launcher.exe process is still running.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The process terminates
ACTUAL -
The process doesn't terminate

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Java console shows

Plugin2Manager calling stopFailed() because of exception during AppContext.dispose()
Plugin2Manager calling stopFailed() because of displayable window javax.swing.JFrame[frame0,0,0,726x578,hidden,layout=java.awt.BorderLayout,title=Java2D Demo,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,3,25,720x550,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
Exception in thread "Thread-15" java.lang.NullPointerException
	at sun.plugin2.applet.Plugin2Manager.destroyAppContext(Unknown Source)
	at sun.plugin2.applet.JNLP2Manager.destroyAppContext(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.cleanupAppContext(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.shutdownAppContext(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.stop(Unknown Source)
	at sun.plugin2.applet.viewer.JNLP2Viewer$2$1.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Not needed, can be reproduced using sample applet JNLP as above
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
None known


Comments
This bug was filed for JDK 7. Do we need to plan backport of JDK-8051030 to JDK 7 or is it ok to ignore it for now?
09-08-2017

Affected Test: RULE "associationScenarios/testDesktopShortcutMultiExtensionJNLP" any any
20-04-2017

Affected Test: RULE "associationScenarios/testDesktopShortcutMultiExtensionJNLP.html" any any
20-04-2017

crucible review: https://java.se.oracle.com/code/cru/CR-JDK9CLIENT-1085
28-05-2015

fix is quite simple - when running javaws with applet - we use plugin and failure is in Plugin2Manager.destroyAppContext when stopListener is null. just check for null before calling stopFailed: if (stopListener != null) { stopListener.stopFailed(); }
28-05-2015