JDK-6644181 : Fail more gracefully if bootstrapping fails
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: beta,6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS:
    generic,windows_2000,windows_2003,windows_xp generic,windows_2000,windows_2003,windows_xp
  • CPU: generic,x86
  • Submitted: 2007-12-20
  • Updated: 2010-09-08
  • Resolved: 2008-03-25
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.
6u10 b12Fixed
Related Reports
Duplicate :  
Relates :  
6643773 highlighted the fact that if the new plug-in's low level bootstrapping code fails, the current behavior is very poor: it crashes the web browser. Asserts are in place for debug builds, but these are not present in product builds, so we will typically dereference a NULL pointer in C++ code and crash.

Error checking should be added to the product builds so that the only user-visible side effect is perhaps a dialog box and a failure to render the applet. Specifically, explicit error checking needs to be added for at least the following situations:
  - The JVM fails to initialize, and therefore JavaVM_GetJNIEnv() returns NULL early on in the new plug-in's code.
  - Initialization of the JNI method IDs for the IExplorerPlugin, MozillaPlugin and AbstractPlugin Java classes fails for any reason.
  - Instantiation of the Java-side IExplorerPlugin or MozillaPlugin objects fails.

Creation of for example our ActiveX control should simply return with an error, possibly raising a message box dialog. It should not crash.

SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u10/6644181.0

EVALUATION Added needed checks to avoid crashing product build if initialization of either the JVM or the new plug-in's Java-side classes fails, which can happen if the Java Kernel's download dialog is cancelled by the end user during startup of the plug-in. Tested with manual failure injection at a couple of different levels in both the IE and Firefox plugins. No other regression test feasible.