Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3795

ErrorPageWriter cause memory leak in visitedFacetCount map

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.11
    • 2.0.19, 2.1.13
    • None
    • None
    • Linux

    Description

      We have noticed that there is a memory leak in class org.apache.myfaces.renderkit.ErrorPageWriter, map: visitedFacetCount.
      This memory leak occurs when <ui:debug/> is used.

      Description of problem:
      Ui debug component tree page use visitedFacetCount as a temporary source of UI components in order to generate html page based on such components.
      This generator use visitor : ExtendedComponentTreeVisitCallback class.
      Inside method visit we have following lines :
      972: _incrementVisitedFacetCount(parent); //put compnent into visitedFacetCount map
      ...
      1131: _removeVisitedFacetCount(parent); // remove visited component from visitedFacetCount map.
      Unfortunatelly visited component is removed from visitedFacetCount map only if there are no children for component.
      Thus it looks like components are never removed properly from visitedFacetCount.

      Possible solution:
      Parrent componet should be removed from visitedFacetCount when it back from recursion.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            tomasz.szlek Tomasz Szlek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: