JDK-6603064 : Legacy_lifecycle:Exception getting thrown on while making LiveConnect calls once applet is refreshed
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 5.0u14,5.0u16,6u5
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows,windows_xp
  • CPU: generic,x86
  • Submitted: 2007-09-11
  • Updated: 2011-02-16
  • Resolved: 2009-02-23
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.
Other Other JDK 6 JDK 7
5.0u17-rev b11Fixed 5.0u19Fixed 6-poolResolved 7-poolResolved
Related Reports
Duplicate :  
Relates :  
Description
Tested JREs : 1.4.2_X, 1.5.0_XX, 1.6.0_XX

Problem description:
--------------------
With legacy_lifecycle PARAM, set to true liveconnect calls fails to work once browser is refreshed. Following exception is getting thrown when applets makes a Liveconnect call after refresh operation.
netscape.javascript.JSException: Native DOM object has been released
	at sun.plugin.javascript.ocx.JSObject.checkValidity(Unknown Source)
	at sun.plugin.javascript.ocx.JSObject.invoke(Unknown Source)
	at sun.plugin.javascript.ocx.JSObject.getMember(Unknown Source)
	at JSBlinkText.setString(JSBlinkText.java:93)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
	at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
	at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
	at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
java.lang.Exception: netscape.javascript.JSException: Native DOM object has been released
	at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
	at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.plugin.com.DispatchImpl.invoke(Unknown Source)


Steps to reproduce:
-----------------
1) Try to load the following applet inside IE and firefox browser
http://sqeweb/deployment2/jitu/plug-bug/ojiliveconnect/src/JSBlinkText_legacy.html
2) Type some text inside the displayed textField
3) Click "Change Text", blinking text should get changed
4) Repeat #2 and #3 as many times as you like and each time one can notice blinking text is getting changed
5) Refresh the applet, and try to repeat steps #2 and #3. If above mentioned exception is getting thrown then bug is reproduced


http://sqeweb/deployment2/jitu/plug-bug/ojiliveconnect/src/JSBlinkText_legacy.html

Comments
EVALUATION The webrev for the fix: http://jpsesvr.sfbay.sun.com:8080/ctetools/html/ViewDetail.jsp?index=2817
05-02-2009

EVALUATION This is a regression caused by the fix for: CR 6576321: Browser hang by a deadlock with open and close applet repeatedly It was integrated into 5.0u14 b02. I couldn't reproduce the issue with any JDK 1.4.2 or JDK 6 release. (I tried 1.4.2_18, 5.0u7, 5.0u10, 5.0u12, 5.0u13, 6, 6u2, 6u7, 6u10 - all of them passed the test.) The webrev of the fix for CR 6576321 is available here: http://sa.sfbay.sun.com/projects/deployment_data/5.0u13/6576321.1 Experiments with an instrumented version confirmed the following behaviour. The applet's AppletContext onClose() method is called on the page reloading event with the following stack trace: sun.plugin.viewer.context.DefaultPluginAppletContext.onClose sun.plugin.viewer.context.IExplorerAppletContext.onClose sun.plugin.viewer.IExplorerPluginObject.destroyPlugin It sets the DefaultPluginAppletContext's closed field to true. In the legacy lifecycle, the applet panel is stored in the cache. When the page is reloaded, the panel is retrieved from the cache, and the AppletContext associated with the panel is set as the current AppletContext. But its closed field is still set to true. This AppletContext is reused by a new IExplorerPluginObject, causing the exception. The fix is to reset the closed field to false in the IExplorerPluginObject's (and other Mozilla's PluginObject's) constructor if the AppletContext is got from the cached panel. Also, it was noticed that a part of the fix for CR 6576321 was missed during integration into 5.0u14 b02: src/plugin/share/classes/sun/plugin/javascript/navig5/JSObject.java doesn't contain any actual changes. It also should be fixed. *** (#1 of 1): [ UNSAVED ] ###@###.###
19-11-2008