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

IE/Java Plugin freezes by dynamically creating an applet since Java 7 update 4

XMLWordPrintable

    • 7u4
    • b48
    • generic, x86
    • windows_7
    • Verified

        FULL PRODUCT VERSION :
        java version "1.7.0_04"
        Java(TM) SE Runtime Environment (build 1.7.0_04-b22)
        Java HotSpot(TM) Client VM (build 23.0-b21, mixed mode, sharing)

        java version "1.7.0_05"
        Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
        Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows XP [Version 5.1.2600]
        Microsoft Windows [Version 6.1.7601]

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        Internet Explorer 7, 8, 9.

        A DESCRIPTION OF THE PROBLEM :
        When creating an applet dynamically in Internet Explorer (e.g. by Javascript in an html page) by using the <applet> tag the 1st time the applet is loaded the applet and browser are working fine. If one reloads this page and loads the applet a 2nd time the browser or Java Plugin freezes. The only solution in this case is to kill the browser process.

        This behavior only depends on the usage of the applet html tag. If you use e.g <object> the browser / plugin will not freeze.

        REGRESSION. Last worked in version 7

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1. ) Load html page wich dynamically creates an applet
        2.) 1st time the applet is loaded successfully
        3.) Press F5 in Internet Explorer to reload the page
        4.) Load the applet a 2nd time


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Java Applet is loaded correctly and is ready to work with.
        ACTUAL -
        Browser / Java Plugin freezes.

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        basic: Applet initialized
        basic: Starting applet
        basic: completed perf rollup
        basic: Applet made visible
        basic: Applet started
        basic: Told clients applet is started
        basic: Starting applet teardown
        basic: Finished applet teardown
        basic: Fortschritts-Listener entfernt: sun.plugin.util.ProgressMonitorAdapter@1bdbf51
        plugin2manager.parentwindowDispose

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        Compile this small class

        import java.applet.Applet;
        import java.awt.Graphics;
         
        public class HelloWorldApplet extends Applet
        {
          public void paint( Graphics graphic )
          {
            graphic.drawString( "Hello World!", 50, 25 );
          }
        }

        Then use this html page in IE. To load the applet press the button "Create Applet".
        <!DOCTYPE html>
        <html>
        <head>
        <script src="http://code.jquery.com/jquery-latest.js"></script>
        <script type="text/javascript">

        $(document).ready(function () {
        $('#button').click(function () {
        $.ajax({
        url: './applet.html',
        success: function(data) {
        $('#cave').html(data);
        }
        });
        });
        });
        </script>
        </head>
        <body>
        <button id="button" type="button">Create Applet</button>
        <div id="cave" width="220" height="120">
        </div>
        </body>
        </html>



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

        CUSTOMER SUBMITTED WORKAROUND :
        1.) Do not install Java 7 update 4+
        2.) Do use <object> Tag instead of <applet>

              ccheung Calvin Cheung
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: