ICEfaces
  1. ICEfaces
  2. ICE-5942

Memory Leak with EE 1.8.2 P01, IE6, and window.open()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2-EE-GA_P01
    • Fix Version/s: 1.8.3, 1.8.2-EE-GA_P02
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      IE 6

      Description

      Here are the steps required to reproduce the issue and subsequent increases in memory:
       
      1. open http://localhost:8080/auctionMonitor/
      Task Manager (IExplore.exe): Memory Usage ~ 43000 k

      2. Click on "Application Link"
      Task Manager (IExplore.exe): Memory Usage ~ 52500 k

      3. Close Popup Window
      Task Manager (IExplore.exe): Memory Usage ~ 47300 k

      4. Click on "Application Link"
      Task Manager (IExplore.exe): Memory Usage ~ 54000 k

      5. Close Popup Window
      Task Manager (IExplore.exe): Memory Usage ~ 49200 k

      Repeating the last two steps over and over again leads to a steady increase in memory with all browsers. When the browser window is closed, all process memory is released.

      Attached is a modified AuctionMonitor.jspx containing the following code to open the new window popup:

      <ice:commandLink window.open('index.jsp','secondAppWindow','status=no,resizable=no,scrollbars=no,toolbar=no,menubar=no,top=0,left=0,width=1024,height=738');">


      1. auctionMonitor.jspx
        21 kB
        Tyler Johnson
      2. ICE-5942_take2.patch
        5 kB
        Mircea Toma
      1. ie_citrix.PNG
        211 kB
      2. JS_memory_error.png
        9 kB
      3. task_manager.png
        19 kB

        Activity

        Hide
        Harm Gnoyke added a comment -

        Which version of FF are you using, which OS?
        I am using FF 3.6.9. on Windows XP Professional Service Pack 3.

        Show
        Harm Gnoyke added a comment - Which version of FF are you using, which OS? I am using FF 3.6.9. on Windows XP Professional Service Pack 3.
        Hide
        Mircea Toma added a comment -

        I managed squeeze another improvement in IE's memory consumption. This time I changed the anonymous functions that are passed into setInterval() native function to named functions. Apparently the anonymous functions capture the window environment when created thus automatically creating a reference to the 'window' object, references that prevent IE from collecting the registered closures.
        The results are as follow:

        • start - 29Mb
        • after 8 hours running: 111Mb
        • minimizing main window: 35Mb
        • after 1 hour: 45Mb
        • minimizing main window: 35Mb

        So, it seems that IE is behaving reasonably well. I'm not sure I can improve the memory usage anymore.

        Show
        Mircea Toma added a comment - I managed squeeze another improvement in IE's memory consumption. This time I changed the anonymous functions that are passed into setInterval() native function to named functions. Apparently the anonymous functions capture the window environment when created thus automatically creating a reference to the 'window' object, references that prevent IE from collecting the registered closures. The results are as follow: start - 29Mb after 8 hours running: 111Mb minimizing main window: 35Mb after 1 hour: 45Mb minimizing main window: 35Mb So, it seems that IE is behaving reasonably well. I'm not sure I can improve the memory usage anymore.
        Hide
        Mircea Toma added a comment -

        Additional tests confirm the latest memory usage pattern.
        This issue is considered fixed now.

        Show
        Mircea Toma added a comment - Additional tests confirm the latest memory usage pattern. This issue is considered fixed now.
        Hide
        Harm Gnoyke added a comment -

        I have now tested the new patch with the auction monitor sample application.
        There are no recognizable differences compared to the previous version.
        I also tested the scenario you mentioned with minimizing the IE window in between.

        • start - 33 MB
        • 4,5 hrs: 137MB
        • minimizing main window: 102 MB
        • 7 hrs: 170MB
        • minimizing main window: 150 MB

        So the memory consumption is still growing.
        When opening links manually the memory consumption on my machine is reasonable. I'll wait for the results from our Citrix environment and then feedback to you.

        Show
        Harm Gnoyke added a comment - I have now tested the new patch with the auction monitor sample application. There are no recognizable differences compared to the previous version. I also tested the scenario you mentioned with minimizing the IE window in between. start - 33 MB 4,5 hrs: 137MB minimizing main window: 102 MB 7 hrs: 170MB minimizing main window: 150 MB So the memory consumption is still growing. When opening links manually the memory consumption on my machine is reasonable. I'll wait for the results from our Citrix environment and then feedback to you.
        Hide
        Harm Gnoyke added a comment -

        Automated tests on Citrix environment showed no improvement, but manual tests showed that the leak is fixed. I am now doubting the test setup.

        The automated opening and closing of windows via JS functions also seems to stil produce a leak, but the manual test in the ICEfaces examples show that the memory consumption is reasonable now. Therefore I also consider this issue fixed.

        Thank you again!

        Show
        Harm Gnoyke added a comment - Automated tests on Citrix environment showed no improvement, but manual tests showed that the leak is fixed. I am now doubting the test setup. The automated opening and closing of windows via JS functions also seems to stil produce a leak, but the manual test in the ICEfaces examples show that the memory consumption is reasonable now. Therefore I also consider this issue fixed. Thank you again!

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Tyler Johnson
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: