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

Java plugin can't load an applet just after leaving a page with another applet

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3
    • 7u51
    • 7u40
    • deploy
    • windows_7

    Description

      FULL PRODUCT VERSION :
      java version "1.7.0_40"
      Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
      Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 7 Professional Service Pack 1 - 32bit

      A DESCRIPTION OF THE PROBLEM :
      I visit some web pages contain applet, packed and signed with CA certificate (not self-signed) and requested "permissions: all-permissions" in the manifest.

      When I browse a page with the applet it loads successfully without security or other warnings. When I leave this page and return back to this page in short time (less then 60 seconds) the applet can't be loaded. If I leave the page, then wait until java.exe and jp2launcher.exe exit, and then return back to the page, the applet loads successfully again.

      This behaviour changed from JRE 7u25 where the applet loaded successfully in all cases.
      This issue is reproducible on Windows 7 Pro SP1 with IE 8 and on Windows 7 Pro SP1 with the latest Chrome 30.0.x.x. I can't reproduce it On Windows 8 with IE 10.

      REGRESSION. Last worked in version 7u25

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. create an applet, create manifest with
      Permissions: all-permissions
      2. compile and pack to jar
      3. sign with CA certificate (not self-signed)
      4. create HTML web page and deploy applet using the object tag, cache_archive and cache_version parameters
      5. open Internet Explorer 8 and navigate to the web page with applet
      6. wait until the applet is loaded
      7. leave the web page
      8. revisit the page in short time (less than 50 seconds)

      The issue is reproducible on:
      Windows 7 Pro SP1 with IE 8;
      Windows 7 Pro SP1 with the latest Chrome 30.0.x.x.
      I can't reproduce it on Windows 8 with IE 10.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Applet is loaded again after the page is revisited in short time.
      ACTUAL -
      Applet is not loaded.
      Debug console window associated with the browser process contains error.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      If browser-jvm debugging is on (JPI_PLUGIN2_DEBUG=1, JPI_PLUGIN2_VERBOSE=1)
      I see the following:

      Attempting to start applet
      Exception in thread "Thread-0" java.lang.InternalError: Should not find a running JVM instance but no matching JRE platform at sun.plugin2.main.server.JVMManager.getBestJVMInstance(Unknown Source) at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown Source) at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source) at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source) at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source) at sun.plugin2.main.server.IExplorerPlugin.maybeStartApplet(Unknown Source) at sun.plugin2.main.server.IExplorerPlugin.access$200(Unknown Source) at sun.plugin2.main.server.IExplorerPlugin$BackgroundStarter$1.run(Unknown Source) at sun.plugin2.main.server.IExplorerPlugin$1.run(Unknown Source)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      /* Applet source code */
      package commons.bugs.MyApplet;
      public class MyApplet extends JApplet{
      }

      /* Manifest */
      Permissions: all-permissions

      /* Web page */
      <html>
      <body>
      <h1>Applet loads here</h1>
      <object type="application/x-java-applet"
      width="50" height="20" align="baseline"
      classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
      codebase="http://java.sun.com/update/1.7.0/jinstall-7u10-windows-i586.cab#Version=1,7,0,0"
      id="myapplet">
      <param name="code" value="commons.bugs.MyApplet"/>
      <param name="codebase" value="http://host:port/AppName/"/>
      <param name="codebase_lookup" value="false"/>
      <param name="cache_option" value="Plugin"/>
      <param name="cache_archive" value="myapplet.jar"/>
      <param name="cache_version" value="1.0.0.0"/>
      <param name="type" value="application/x-java-applet;version=1.7"/>
      <param name="initial_focus" value="false"/>
      </object>
      </body>

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

      CUSTOMER SUBMITTED WORKAROUND :
      add param to the object tag
      <param name="separate_jvm" value="true"/>

      add code to the applet class
      @Override
      public void destroy(){
        super.destroy();
        // this is workaround. remove this line asap.
        System.exit(0);
      }

      Attachments

        Activity

          People

            anashaty Anton Nashatyrev (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: