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

Internet Explorer crashes when using liveconnect with Plugin 1.4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • deploy
    • x86
    • windows_nt



      Name: gm110360 Date: 04/25/2002


      FULL PRODUCT VERSION :
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      Java(TM) Plug-in: Version 1.4.0

      FULL OPERATING SYSTEM VERSION :
      Windows NT Version 4.0

      A DESCRIPTION OF THE PROBLEM :
      Internet explorer crashes when the applet does a javascript
      callback, passing a Hashtable as a parameter.

        From Javascript, the following code works fine :
      var customData = test.arguments[0];
      var val = customData.get("key1");

      if you try accessing the hashtable's enumeration interface
      methods, like the following :
      var en = customData.elements();
      The browser crashes.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Open the HTML page instanciating the applet
      2. The applet loads
      3. The browser crashes as soon as the first callback occurs

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected : The javascript callbacks to be execute without
      crashing

      Actual : The Browser crashes before the callback function
      finishes.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      An unexpected exception has been detected in native code outside the VM.
      Unexpected Signal : unknown exception code occurred at PC=0x77F1D479
      Function=RaiseException+0x6A
      Library=C:\WINNT\system32\KERNEL32.dll

      Current Java thread:
      at sun.beans.ole.OleDispatchInterface.nativeStoreParm(Native Method)
      at sun.beans.ole.JavaObjectInterface.storeParm(Unknown Source)
      at sun.beans.ole.JavaObjectInterface.invoke(Unknown Source)

      Dynamic libraries:
      0x00400000 - 0x00412000 C:\PROGRA~1\Plus!\MICROS~1\iexplore.exe
      0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll
      0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll
      0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll
      0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll
      0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll
      0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll
      0x70BD0000 - 0x70C1C000 C:\WINNT\system32\SHLWAPI.dll
      0x10000000 - 0x1000D000 C:\WINNT\EQNHOOK.DLL
      0x00760000 - 0x00767000 C:\WINNT\System32\VDDFIFO.dll
      0x779D0000 - 0x779E5000 C:\WINNT\System32\MSVCRT40.dll
      0x78000000 - 0x78043000 C:\WINNT\system32\MSVCRT.dll
      0x780A0000 - 0x780B2000 C:\WINNT\System32\MSVCIRT.dll
      0x70FE0000 - 0x710FB000 C:\WINNT\System32\shdocvw.dll
      0x71700000 - 0x7178A000 C:\WINNT\system32\COMCTL32.dll
      0x77C40000 - 0x77D7C000 C:\WINNT\system32\SHELL32.dll
      0x718A0000 - 0x71902000 C:\WINNT\System32\shdoclc.dll
      0x00910000 - 0x00919000 C:\WINNT\System32\PGPhk.dll
      0x77B20000 - 0x77BD7000 C:\WINNT\System32\ole32.dll
      0x71110000 - 0x711D9000 C:\WINNT\System32\BROWSEUI.dll
      0x71920000 - 0x7192B000 C:\WINNT\System32\browselc.dll
      0x779B0000 - 0x779B9000 C:\WINNT\System32\LinkInfo.dll
      0x77720000 - 0x77731000 C:\WINNT\system32\MPR.dll
      0x77A40000 - 0x77A4D000 C:\WINNT\System32\ntshrui.dll
      0x77800000 - 0x7783A000 C:\WINNT\system32\NETAPI32.dll
      0x77840000 - 0x77849000 C:\WINNT\system32\NETRAP.dll
      0x777E0000 - 0x777ED000 C:\WINNT\system32\SAMLIB.dll
      0x00C00000 - 0x00C08000 C:\Program Files\Adobe\Acrobat 5.0
      \Reader\ActiveX\AcroIEHelper.ocx
      0x65340000 - 0x653DB000 C:\WINNT\system32\OLEAUT32.dll
      0x71290000 - 0x71296000 C:\WINNT\system32\MSIDLE.DLL
      0x70290000 - 0x70303000 C:\WINNT\System32\urlmon.dll
      0x77A90000 - 0x77A9B000 C:\WINNT\system32\VERSION.dll
      0x779C0000 - 0x779C8000 C:\WINNT\system32\LZ32.dll
      0x77BF0000 - 0x77BF7000 C:\WINNT\System32\rpcltc1.dll
      0x70440000 - 0x704CF000 C:\WINNT\System32\mlang.dll
      0x70C30000 - 0x70ED1000 C:\WINNT\System32\mshtml.dll
      0x4A000000 - 0x4A02C000 C:\WINNT\System32\PDM.DLL
      0x4AA00000 - 0x4AA15000 C:\WINNT\System32\MSDBG.DLL
      0x70200000 - 0x70277000 C:\WINNT\System32\WININET.DLL
      0x74A10000 - 0x74A2F000 C:\WINNT\system32\TAPI32.dll
      0x76AB0000 - 0x76AB5000 C:\WINNT\System32\IMM32.DLL
      0x712B0000 - 0x71337000 C:\WINNT\System32\jscript.dll
      0x01820000 - 0x01835000 C:\Program Files\Java\j2re1.4.0\bin\npjpi140.dll
      0x01840000 - 0x0185C000 C:\Program Files\Java\j2re1.4.0\bin\beans.ocx
      0x776D0000 - 0x776D8000 C:\WINNT\System32\wsock32.dll
      0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll
      0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll
      0x74FF0000 - 0x74FFE000 C:\WINNT\System32\rnr20.dll
      0x01860000 - 0x01875000 C:\Program Files\Java\j2re1.4.0\bin\jpishare.dll
      0x6D330000 - 0x6D442000 C:\PROGRA~1\Java\J2RE14~1.0\bin\client\jvm.dll
      0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll
      0x6BD00000 - 0x6BD21000 C:\WINNT\System32\cwbaudll.dll
      0x6D1D0000 - 0x6D1D7000 C:\PROGRA~1\Java\J2RE14~1.0\bin\hpi.dll
      0x6D300000 - 0x6D30D000 C:\PROGRA~1\Java\J2RE14~1.0\bin\verify.dll
      0x6D210000 - 0x6D228000 C:\PROGRA~1\Java\J2RE14~1.0\bin\java.dll
      0x6D320000 - 0x6D32D000 C:\PROGRA~1\Java\J2RE14~1.0\bin\zip.dll
      0x0DC80000 - 0x0DC8D000 C:\Program Files\Java\j2re1.4.0\bin\zip.dll
      0x6D000000 - 0x6D0F6000 C:\Program Files\Java\j2re1.4.0\bin\awt.dll
      0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV
      0x6D180000 - 0x6D1D0000 C:\Program Files\Java\j2re1.4.0
      \bin\fontmanager.dll
      0x77130000 - 0x77156000 C:\WINNT\System32\ddraw.dll
      0x6D2D0000 - 0x6D2DD000 C:\Program Files\Java\j2re1.4.0\bin\net.dll
      0x71A20000 - 0x71A28000 C:\WINNT\System32\shfolder.dll
      0x77660000 - 0x7766F000 C:\WINNT\system32\msafd.dll
      0x77690000 - 0x77699000 C:\WINNT\System32\wshtcpip.dll
      0x48080000 - 0x480A8000 C:\WINNT\System32\MSLS31.DLL
      0x0EB10000 - 0x0EB1A000 C:\Program Files\Java\j2re1.4.0\bin\packager.dll
      0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll
      0x6D130000 - 0x6D152000 C:\Program Files\Java\j2re1.4.0\bin\dcpr.dll
      0x71DC0000 - 0x71DCA000 C:\WINNT\System32\PSAPI.DLL

      Local Time = Thu Apr 18 15:57:50 2002
      Elapsed Time = 4
      #
      # The exception above was detected in native code outside the VM
      #
      # Java VM: Java HotSpot(TM) Client VM (1.4.0-b92 mixed mode)
      #

      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.applet.Applet;
      import java.util.Hashtable;
      import java.util.Date;
      import netscape.javascript.JSObject ;

      /**
       *
       * <p>Title: Browser Overload applet</p>
       * <p>Description: </p>
       * This applet calls back a Javascript function, passing it a hashtable
       * Parameters can be used to set :
       * the interval between 2 callbacks
       * the number of callbacks to execute
       * the name of the javascript function to be called
       * <p>Copyright: Copyright (c) 2002</p>
       * <p>Company: </p>
       * @author unascribed
       * @version 1.0
       */
      public class browseroverloadapplet extends Applet {

        final static String PARAM_INTERVAL = "interval";
        final static String PARAM_TRIES = "tries";
        final static String PARAM_CALLBACK = "callback";
        final static String PARAM_SUMMARY = "summary";
        final static String PARAM_MODE = "mode";

        int javaCallCount = 0;
        Date sd, ed;

        public void init()
        {

        }

        public void start()
        {
      try
      {
      JSObject window = JSObject.getWindow(this);
      final String key = "key";
      final String push = "push";

      int interval = Integer.parseInt(getParameter(PARAM_INTERVAL));
      int tries = Integer.parseInt(getParameter(PARAM_TRIES));
      String mode = getParameter(PARAM_MODE);

      if (!push.equals(mode))
      {
      return;
      }


      //Compute the elapsed time
      sd = new Date();

      for (int i=0; i<tries; i++)
      {
      Hashtable h = new Hashtable();
      h.put("key1", "firstvalue_" + i);
      h.put("key2", "secondvalue_" + i);
      Object [] param = new Object[] {h};
      window.call(getParameter(PARAM_CALLBACK), param);
      //Call the Javascript function
      if (interval==-1)
      Thread.yield();
      if (interval > 0)
      Thread.sleep((long)interval);
      }
      ed = new Date();

      //Call the Javascript Summary function
      window.call(getParameter(PARAM_SUMMARY), new Object [] {"" +
      (ed.getTime() - sd.getTime())});

      }
      catch(Exception e)
      {
      e.printStackTrace();
      }

        }

        public int javaCall()
        {
      System.out.println(javaCallCount);
      return javaCallCount++;
        }

        public void startTiming()
        {
      System.out.println("Starting Timer");
      sd = new Date();
        }

        public long endTiming()
        {
      ed = new Date();
      System.out.println("Ending Timer - Time Elapsed : " + (ed.getTime() -
      sd.getTime()));
      return ed.getTime() - sd.getTime();
        }

      }




      /*-------------------------------------------------------------------------
      HTML Page Sample

      <html>
      <head>
      <title>Browser Overload Applet</title>
      <SCRIPT language="Javascript1.2">
      var callscount=0;

      function test()
      {
      var customData = test.arguments[0];
      var en = customData.elements();
              //Does not crash with the code below
      var val = customData.get("key1");//en.nextElement();
      var customValue = customData.get("key2");//en.nextElement();
      }

      function summary()
      {
      var elapsed = summary.arguments[0];
      }
      </SCRIPT>
      </head>
      <body>
      <APPLET name="BrowserOverload"
      code="browseroverloadapplet.browseroverloadapplet.class"
      archive="browseroverload.jar" height="0" width="0" scriptable="true"
      mayscript="true">
      <param name="interval" value="5"/>
      <param name="tries" value="1000"/>
      <param name="callback" value="test"/>
      <param name="summary" value="summary"/>
      <param name="mode" value="push"/>
      </APPLET>
      </body>
      </html>


      -------------------------------------------------------------------------*/






      ---------- END SOURCE ----------
      (Review ID: 145597)
      ======================================================================

            Unassigned Unassigned
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: