Pivot
  1. Pivot
  2. PIVOT-752

Possible memory leak in Pivot Decorators, for example in ScaleDecorator

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: wtk-effects
    • Labels:
      None

      Description

      I provide a simple test case that should demonstrate this leak, it requires the fix for issue 749 (https://issues.apache.org/jira/browse/PIVOT-749). By profiling this test, you can see that resources allocated for AffineTransforms, Rectangle and Bounds are not being released by the vm. Perhaps this is not related to ScaleDecorators directly, but using them makes this bug appear.

      The test case is attached.

        Activity

        Hide
        Sandro Martini added a comment -

        This depends on another ticket already scheduled for the 2.1, so move even this to the same release.

        Show
        Sandro Martini added a comment - This depends on another ticket already scheduled for the 2.1, so move even this to the same release.
        Hide
        Edgar Merino added a comment - - edited

        I don't think this is related to issue 748, it seems like the leak might be ocurring in a core component of pivot, the transition that uses the ScaleDecorator uses one decorator for all it's work, it appears to me that the resources used by the ScaleDecorator are not being released by the vm, as I explained in the description of the bug. It'll be great if someone else can test this to see if this bug doesn't affect other parts of pivot.

        Show
        Edgar Merino added a comment - - edited I don't think this is related to issue 748, it seems like the leak might be ocurring in a core component of pivot, the transition that uses the ScaleDecorator uses one decorator for all it's work, it appears to me that the resources used by the ScaleDecorator are not being released by the vm, as I explained in the description of the bug. It'll be great if someone else can test this to see if this bug doesn't affect other parts of pivot.
        Hide
        Sandro Martini added a comment -

        Edgar say that could be something more related to a Pivot decorator and not specific of ScaleDecorator, so it would be better to take a look in 2.0.1 .

        Show
        Sandro Martini added a comment - Edgar say that could be something more related to a Pivot decorator and not specific of ScaleDecorator, so it would be better to take a look in 2.0.1 .
        Hide
        Chris Bartlett added a comment -

        Edgar,

        How do I see the memory leak you mention?
        Do I have to
        1) profile your attached app
        2) or can I just leave the attached app running long enough?
        So for example, could I set up the JVM with limited resources and let it run until some kind of out-of-memory error occurs?

        If 1) Where exactly were you looking/profiling? I can see Bounds & AffineTransform objects created in ScaleDecorator, but no Rectangles. Did you mean the paint/repaint code within Component or another class?
        If 2) Could you please describe the JVM arguments you use to replicate the problem?

        Show
        Chris Bartlett added a comment - Edgar, How do I see the memory leak you mention? Do I have to 1) profile your attached app 2) or can I just leave the attached app running long enough? So for example, could I set up the JVM with limited resources and let it run until some kind of out-of-memory error occurs? If 1) Where exactly were you looking/profiling? I can see Bounds & AffineTransform objects created in ScaleDecorator, but no Rectangles. Did you mean the paint/repaint code within Component or another class? If 2) Could you please describe the JVM arguments you use to replicate the problem?
        Hide
        Edgar Merino added a comment -

        Hello Chris, I did some more tests on this and seems like I was wrong, the first tests I made were done in a computer with limited ram, I was ignoring the garbage collection algorithm being used too so I guess this was a false alarm. Regarding your comments, if you still want to check if this was a false alarm or not, I profiled the application using netbeans and the main objects that were being created and apparently not released by the vm were Bounds and AffineTransform, I never got to the point were the vm throws an out of memory exception though.

        Show
        Edgar Merino added a comment - Hello Chris, I did some more tests on this and seems like I was wrong, the first tests I made were done in a computer with limited ram, I was ignoring the garbage collection algorithm being used too so I guess this was a false alarm. Regarding your comments, if you still want to check if this was a false alarm or not, I profiled the application using netbeans and the main objects that were being created and apparently not released by the vm were Bounds and AffineTransform, I never got to the point were the vm throws an out of memory exception though.
        Hide
        Chris Bartlett added a comment -

        OK, thanks for the update.
        Please let us know if you see the issue again, and perhaps we can help to come up with a reliable way to reproduce it for further investigation.

        Show
        Chris Bartlett added a comment - OK, thanks for the update. Please let us know if you see the issue again, and perhaps we can help to come up with a reliable way to reproduce it for further investigation.
        Hide
        Sandro Martini added a comment -

        This requires more tests, so move to 2.0.2

        Show
        Sandro Martini added a comment - This requires more tests, so move to 2.0.2
        Hide
        Chris Bartlett added a comment -

        Sandro, I think this can probably be closed and marked as 'cannot reproduce'.
        If Edgar, or anyone else, can provide some code to reliably reproduce the issue we can reopen the ticket.

        Show
        Chris Bartlett added a comment - Sandro, I think this can probably be closed and marked as 'cannot reproduce'. If Edgar, or anyone else, can provide some code to reliably reproduce the issue we can reopen the ticket.
        Hide
        Sandro Martini added a comment -

        If this problem will re-happen, be free to reopen.

        Show
        Sandro Martini added a comment - If this problem will re-happen, be free to reopen.

          People

          • Assignee:
            Unassigned
            Reporter:
            Edgar Merino
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development