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

Liveconnect: can not access objects that were passed to the JS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • deploy
    • x86
    • windows_2000



      Name: gm110360 Date: 04/26/2002


      FULL PRODUCT VERSION :
      JDK 1.4 latest plugin with IE 5.*, 6.0

      FULL OPERATING SYSTEM VERSION :NT 2000


      ADDITIONAL OPERATING SYSTEMS :ALL



      A DESCRIPTION OF THE PROBLEM :
      Hi,
      Our product uses Liveconnect to interface with Javascript.
      The job of the Java side is to distribute the data to the
      Javascript clients. We are passing in a vector object to
      the JS, in which JScript tries to enumerat thru the
      vector. This all works fine without plugin, but when using
      1.4 plugin, we run into a crash when enumerating.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1.Enclosed Java code: compile it and drop it in the
      webserver
      2.Enclosed HTML code


      EXPECTED VERSUS ACTUAL BEHAVIOR :
        To be able to iterate thru the vector using enumerator.
        From analysis we have done it seems like any object that is
      not primitive type; there is a problem.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      After the crash:


      An unexpected exception has been detected in native code outside the VM.
      Unexpected Signal : unknown exception code occurred at PC=0x77E87E08
      Function=RaiseException+0x55
      Library=C:\WINNT\system32\KERNEL32.dll

      Current Java thread:
      at sun.beans.ole.OleDispatchInterface.nativeStoreParm(Native Method)
      at sun.beans.ole.JavaObjectInterface.storeParm
      (JavaObjectInterface.java:359)
      at sun.beans.ole.JavaObjectInterface.invoke
      (JavaObjectInterface.java:342)

      Dynamic libraries:
      0x00400000 - 0x00412000 C:\Program Files\Internet Explorer\iexplore.exe
      0x77F80000 - 0x77FFA000 C:\WINNT\System32\ntdll.dll
      0x77E80000 - 0x77F35000 C:\WINNT\system32\KERNEL32.dll
      0x77E10000 - 0x77E74000 C:\WINNT\system32\USER32.dll
      0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
      0x70BD0000 - 0x70C1C000 C:\WINNT\system32\SHLWAPI.dll
      0x77DB0000 - 0x77E0A000 C:\WINNT\system32\ADVAPI32.dll
      0x77D40000 - 0x77DB0000 C:\WINNT\system32\RPCRT4.DLL
      0x70FE0000 - 0x710FB000 C:\WINNT\System32\shdocvw.dll
      0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
      0x71700000 - 0x7178A000 C:\WINNT\system32\COMCTL32.dll
      0x69800000 - 0x69A42000 C:\WINNT\system32\SHELL32.dll
      0x77A50000 - 0x77B45000 C:\WINNT\system32\ole32.dll
      0x10000000 - 0x10009000 C:\WINNT\System32\PGPhk.dll
      0x00870000 - 0x00882000 C:\WINNT\System32\PDSHELL.DLL
      0x009A0000 - 0x009C1000 C:\WINNT\System32\PDTOOLS.DLL
      0x00AE0000 - 0x00B05000 C:\WINNT\System32\PDESKRES.DLL
      0x71110000 - 0x711D9000 C:\WINNT\System32\BROWSEUI.dll
      0x691D0000 - 0x69255000 C:\WINNT\System32\CLBCATQ.DLL
      0x779B0000 - 0x77A45000 C:\WINNT\system32\OLEAUT32.dll
      0x71920000 - 0x7192B000 C:\WINNT\System32\browselc.dll
      0x70200000 - 0x70278000 C:\WINNT\system32\WININET.DLL
      0x77530000 - 0x77552000 C:\WINNT\system32\TAPI32.dll
      0x77840000 - 0x7787C000 C:\WINNT\System32\cscui.dll
      0x770C0000 - 0x770E3000 C:\WINNT\System32\CSCDLL.DLL
      0x01710000 - 0x01773000 c:\winnt\downloaded program
      files\GoogleToolbar_en_1.1.54-deleon.dll
      0x77880000 - 0x7790D000 C:\WINNT\System32\SETUPAPI.dll
      0x77C10000 - 0x77C6D000 C:\WINNT\System32\USERENV.DLL
      0x70290000 - 0x70303000 C:\WINNT\system32\urlmon.dll
      0x77820000 - 0x77827000 C:\WINNT\system32\VERSION.dll
      0x759B0000 - 0x759B6000 C:\WINNT\system32\LZ32.DLL
      0x75050000 - 0x75058000 C:\WINNT\System32\WSOCK32.dll
      0x75030000 - 0x75044000 C:\WINNT\System32\WS2_32.DLL
      0x75020000 - 0x75028000 C:\WINNT\System32\WS2HELP.DLL
      0x774E0000 - 0x77512000 C:\WINNT\System32\RASAPI32.DLL
      0x774C0000 - 0x774D1000 C:\WINNT\System32\RASMAN.DLL
      0x77830000 - 0x7783E000 C:\WINNT\System32\RTUTILS.DLL
      0x75AB0000 - 0x75AB5000 C:\WINNT\System32\sensapi.dll
      0x75170000 - 0x751BF000 C:\WINNT\System32\netapi32.dll
      0x77BE0000 - 0x77BEF000 C:\WINNT\System32\SECUR32.DLL
      0x751C0000 - 0x751C6000 C:\WINNT\System32\NETRAP.DLL
      0x75150000 - 0x7515F000 C:\WINNT\System32\SAMLIB.DLL
      0x77950000 - 0x77979000 C:\WINNT\system32\WLDAP32.DLL
      0x77980000 - 0x779A4000 C:\WINNT\System32\DNSAPI.DLL
      0x01810000 - 0x01818000 C:\Program Files\Adobe\Acrobat 5.0
      \Reader\ActiveX\AcroIEHelper.ocx
      0x70C30000 - 0x70ED1000 C:\WINNT\System32\mshtml.dll
      0x718A0000 - 0x71902000 C:\WINNT\system32\shdoclc.dll
      0x70420000 - 0x704A8000 C:\WINNT\System32\mlang.dll
      0x75AC0000 - 0x75AE8000 C:\WINNT\System32\MSLS31.DLL
      0x75E60000 - 0x75E7A000 C:\WINNT\System32\IMM32.DLL
      0x01DA0000 - 0x01DA8000 C:\PROGRA~1\MOUSEW~1\SYSTEM\LgMousHk.dll
      0x77570000 - 0x775A0000 C:\WINNT\System32\WINMM.DLL
      0x77560000 - 0x77569000 C:\WINNT\System32\wdmaud.drv
      0x77400000 - 0x77408000 C:\WINNT\System32\msacm32.drv
      0x77410000 - 0x77423000 C:\WINNT\System32\MSACM32.dll
      0x01EC0000 - 0x01ECB000 C:\WINNT\System32\sdph20.dll
      0x75D40000 - 0x75D46000 C:\WINNT\System32\msadp32.acm
      0x74FD0000 - 0x74FED000 C:\WINNT\system32\msafd.dll
      0x77340000 - 0x77353000 C:\WINNT\System32\IPHLPAPI.DLL
      0x77520000 - 0x77525000 C:\WINNT\System32\ICMP.DLL
      0x77320000 - 0x77337000 C:\WINNT\System32\MPRAPI.DLL
      0x773B0000 - 0x773DE000 C:\WINNT\System32\ACTIVEDS.DLL
      0x77380000 - 0x773A2000 C:\WINNT\System32\ADSLDPC.DLL
      0x77360000 - 0x77379000 C:\WINNT\System32\DHCPCSVC.DLL
      0x75010000 - 0x75017000 C:\WINNT\System32\wshtcpip.dll
      0x78280000 - 0x7828C000 C:\WINNT\System32\rnr20.dll
      0x777E0000 - 0x777E8000 C:\WINNT\System32\winrnr.dll
      0x777F0000 - 0x777F5000 C:\WINNT\System32\rasadhlp.dll
      0x6D300000 - 0x6D307000 C:\WINNT\system32\jsproxy.dll
      0x6B700000 - 0x6B787000 C:\WINNT\System32\jscript.dll
      0x02060000 - 0x02075000 C:\Program Files\Java\j2re1.4.0\bin\npjpi140.dll
      0x02080000 - 0x0209C000 C:\Program Files\Java\j2re1.4.0\bin\beans.ocx
      0x020A0000 - 0x020B5000 C:\Program Files\Java\j2re1.4.0\bin\jpishare.dll
      0x6D330000 - 0x6D442000 C:\PROGRA~1\Java\J2RE14~1.0\bin\client\jvm.dll
      0x6D1D0000 - 0x6D1D7000 C:\PROGRA~1\Java\J2RE14~1.0\bin\hpi.dll
      0x021C0000 - 0x021CD000 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
      0x6D000000 - 0x6D0F6000 C:\Program Files\Java\j2re1.4.0\bin\awt.dll
      0x77800000 - 0x7781D000 C:\WINNT\System32\WINSPOOL.DRV
      0x6D180000 - 0x6D1D0000 C:\Program Files\Java\j2re1.4.0
      \bin\fontmanager.dll
      0x51000000 - 0x51044000 C:\WINNT\System32\ddraw.dll
      0x728A0000 - 0x728A6000 C:\WINNT\System32\DCIMAN32.dll
      0x6D2D0000 - 0x6D2DD000 C:\Program Files\Java\j2re1.4.0\bin\net.dll
      0x6D130000 - 0x6D152000 C:\Program Files\Java\j2re1.4.0\bin\dcpr.dll
      0x127C0000 - 0x127CA000 C:\Program Files\Java\j2re1.4.0\bin\packager.dll
      0x77920000 - 0x77942000 C:\WINNT\system32\imagehlp.dll
      0x72A00000 - 0x72A2D000 C:\WINNT\system32\DBGHELP.dll
      0x690A0000 - 0x690AB000 C:\WINNT\System32\PSAPI.DLL

      Local Time = Wed Apr 17 12:54:02 2002
      Elapsed Time = 11
      #
      # 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 ----------
      JAVA CODE APPLET:

      import java.io.*;

      import java.applet.*;

      import java.awt.*;
      import netscape.javascript.JSObject;
      import java.util.*;

      public class TestPluginApplet extends Applet{
          protected JSObject win;

          public void init(){
              win = JSObject.getWindow(this);
          }
          
          public void start(){
              Object ob[]=new Object[2];
              Vector v = new Vector();
              //v.addElement(new data());
              ob[0]=new data();
              
              ob[1]="NRP";
              
              win.call("callback",ob);
          }
          
          public void stop(){
          }
      }

      JAVA CODE:


      import java.util.*;

      public class data implements Enumeration{
          public String f="FIELD";
       
          Hashtable h;
          Enumeration e=null;
          //nnerdata in;
          
          public data(){
              h= new Hashtable();
              DataM m= new DataM();
              h.put(new DataM(),"me");
              h.put("you1","you");
              
              //in=new innerdata();
          }
          
          public void elements(){
              e=h.keys();
              //return this;
          }
          
          public Object getme(){
              return "";
          }
          
          public boolean hasMoreElements(){
              return e.hasMoreElements();
          }
          
          public Object nextElement(){
              return e.nextElement();
          }
          
      }

      JAVA CODE:
      public class DataM {
          public String field ="ss";
          public Object value =null;
          DataM(){}
          DataM(String n, Object o){
              field=n;
              value=o;
          }
          public void get(){
          }
      }


      HTML CODE:
      <HTML>

      <HEAD>
      <TITLE>Sample Applet</TITLE>

      </HEAD>

      <center> <b> Plugin Test</b></center>
      <HR>
      <BODY BGColor="80FFFF">



      <script language=JavaScript1.1>

      function callback(str){
      alert("call");
      var vec1 = callback.arguments[0];

      vec1.elements();

      alert("fu2");

      var vec2=vec1.nextElement();
      alert("fu3 next elem "+vec2);

      vec2=vec1.nextElement();
      alert("fu3 next elem "+vec2);


      var vec2has = vec1.hasMoreElements();
      //alert("fu4 hasmore "+vec2has);


      var data2= callback.arguments[1];
      alert(data2);


      }

      </script>



      <applet code="TestPluginApplet.class" align="baseline" width="0" height="0"
      name="demo" mayscript>

      </applet>


      </BODY>
      </HTML>









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

      CUSTOMER WORKAROUND :
      NONE. EMERGENCY
      (Review ID: 145595)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: