Menu

#411 Plots with animations produce memory leaks

v1.1.x
fixed
critical (96)
v1.1.1
Bug Fix
2019-01-26
2018-11-27
Erik Hänel
No

Plots containing an animation produce a memory leak, if they are closed while the animation is running.

Analysis:

This is due to the fact that the wxCloseEvent is not catched by the wxMGL class but by the window one hierarchy up. The close event is executed by the wxWindow base class, but the destructor is not called due to some weird fact. The issue can be solved by creating a explicit destructor in the GraphViewer class and by catching the close event in wxMGL.

Implementation:

  • Implementation: The fix was processed as proposed by the analysis.
  • Revision: [r433]
  • Implementation test: The closing of the window was observed using the debugger. The handler was executed as desired.

Documentation:

  • ChangesLog: updated
  • Comments: Not needed
  • Documentation articles: Not needed
  • Language files: Not needed

Tests:

This fix was tested manually using the Windows performance monitor. No deviations occured. Bug fix implemented successfully.

Related

Commit: [r433]

Discussion

  • Erik Hänel

    Erik Hänel - 2018-11-27
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-11-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,18 @@
     Plots containing an animation produce a memory leak, if they are closed while the animation is running.
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* ChangesLog: (*Have you updated the changes log?*)
    +* Comments: (*Have you written comments in the code, which describe your change?*)
    +* Documentation articles: (*Have you updated the documentation articles?*)
    +* Language files: (*Have you updated the language files?*)
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-11-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,7 @@
     Plots containing an animation produce a memory leak, if they are closed while the animation is running.
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +This is due to the fact that the `wxCloseEvent` is not catched by the `wxMGL` class but by the window one hierarchy up. The close event is executed by the `wxWindow` base class, but the destructor is not called due to some weird fact. The issue can be solved by creating a explicit destructor in the `GraphViewer` class and by catching the close event in `wxMGL`. 
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-11-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,15 +4,15 @@
     This is due to the fact that the `wxCloseEvent` is not catched by the `wxMGL` class but by the window one hierarchy up. The close event is executed by the `wxWindow` base class, but the destructor is not called due to some weird fact. The issue can be solved by creating a explicit destructor in the `GraphViewer` class and by catching the close event in `wxMGL`. 
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: The fix was processed as proposed by the analysis.
    +* Revision: [r433]
    +* Implementation test: The closing of the window was observed using the debugger. The handler was executed as desired.
    
     ###Documentation:
    -* ChangesLog: (*Have you updated the changes log?*)
    -* Comments: (*Have you written comments in the code, which describe your change?*)
    -* Documentation articles: (*Have you updated the documentation articles?*)
    -* Language files: (*Have you updated the language files?*)
    +* ChangesLog: updated
    +* Comments: Not needed
    +* Documentation articles: Not needed
    +* Language files: Not needed
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r433]

  • Erik Hänel

    Erik Hänel - 2019-01-26
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -15,4 +15,4 @@
    
     * Language files: Not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +This fix was tested manually using the Windows performance monitor. No deviations occured. Bug fix implemented successfully.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB