JSObject leaks on MSJVM

Discussion in 'Java' started by Pratul Chatterjee, Jun 14, 2004.

  1. Microsoft have agreed to support the MSJVM until the end of 2007.
    Some of our clients may still have the MSJVM on their machines and
    their corporate software upgrade policies may not allow them to
    replace the MSJVM with the latest one from Sun immediately. This has
    created a difficult situation for me. I have one applet which runs
    fine on Windows NT/2000/XP/2003 with IE 6/Sun JVM (1.4.2_04) and does
    not leak memory. It works fine on Windows NT with IE 5.5/MSJVM 3810.
    However, it leaks on Windows 2000/XP/2003 with IE 6/ MSJVM 3810! The
    applet calls JSObject.call() and that's where it leaks. I have
    replaced the calls with JSObject.eval() but did not improve the
    situation. The rate of leak was slow.

    I have another similar applet with a different threading model which
    does not leak on MSJVM 3810. So I cannot say that JSObject is leaking
    on IE 6 regardless.

    I know people had similar problems with the Sun JVM 1.3.1 where every
    call to JSObject was leaking around 40 bytes. I did not see anyone
    complaining about MSJVM though.

    Any ideas?

    Many thanks in advance.

    Pratul
    Pratul Chatterjee, Jun 14, 2004
    #1
    1. Advertising

  2. On 14 Jun 2004 03:37:41 -0700, Pratul Chatterjee wrote:

    > It works fine on Windows NT with IE 5.5/MSJVM 3810.
    > However, it leaks on Windows 2000/XP/2003 with IE 6/ MSJVM 3810! The
    > applet calls JSObject.call() and that's where it leaks. I have
    > replaced the calls with JSObject.eval() but did not improve the
    > situation.


    Can you make a test case with SSCCE for us?
    <http://www.physci.org/codes/sscce.jsp>
    Link to the code form the applet URL.

    ...& yes, I have a 3810 installed, so I
    can check it.

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Jun 14, 2004
    #2
    1. Advertising

  3. Many thanks for your reply. I am not sure whether I could expose a
    test page through our firewall. It involves permissions and other
    problems.

    Tell me if you are aware of any thread related issues in calling
    methods on netscape.javascript.JSObject. The applet in question
    creates internal threads and they call a synchronized method in the
    main applet class (i.e. the one derived from java.applet.Applet). The
    main applet class creates a reference to the browser window in the
    init() method:

    /* data member */ browserWindow = JSObject.getWindow(this);

    The synchronized method to call JavaScript functions does the
    following:

    browserWindow.call(methodName, methodArguments);

    I even tried this to release the reference every time:
    JSObject browserWindow = JSObject.getWindow(this);
    browserWindow.call(methodName, methodArguments);
    browserWindow = null;

    No joy with the memory leak!


    Pratul
    Pratul Chatterjee, Jun 15, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. NB
    Replies:
    3
    Views:
    512
    Tor Iver Wilhelmsen
    Jul 31, 2004
  2. NB
    Replies:
    1
    Views:
    384
    Lothar Kimmeringer
    Jul 31, 2004
  3. Minh Tran-Le
    Replies:
    0
    Views:
    429
    Minh Tran-Le
    Dec 2, 2004
  4. Replies:
    1
    Views:
    467
    Andrew Thompson
    Oct 31, 2005
  5. \/-Mode
    Replies:
    1
    Views:
    383
    Andrew Thompson
    Apr 18, 2007
Loading...

Share This Page