2017-09-21 17:45 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001777openmediavaultBugpublic2017-07-17 17:55
ReporterErikM 
Assigned Tovotdev 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product VersionErasmus (3.x) 
Target VersionFixed in VersionErasmus (3.x) 
Summary0001777: Memory leak when calling
DescriptionThere is a leak of ExtJS components when OMV.MessageBox.guru is called repeatedly.
For example, when the session has expired, a new guru meditation window is created each time there is a reply to the "getInformation" request, causing a fairly nasty leak of ~1MB / minute.

Workaround patch attached (guru.diff), but not sure if it is the right approach to manually destroy the component?

There are some similar leaks:
- New progress bars are created each time the 'system information' widget is updated, but the old ones are not destroyed
- When switching views, components are not destroyed
Should I file bug reports for these leaks too?
Steps To Reproduce1. Login
2. Go to dashboard view
3. Make sure 'system information' widget is visible and refreshing
4. Wait for session to expire
5. Now, a new guru meditation window is created each time the system information widget tries to refresh, and memory is leaking by ~1MB / minute (Google Chrome)
Additional InformationWeb browser: Chrome 59.0.3071.115

TagsNo tags attached.
Product build3.0.83
Attached Files
  • diff file icon guru.diff (2,383 bytes) 2017-07-16 00:01 -
    diff --git a/deb/openmediavault/var/www/openmediavault/js/omv/Rpc.js b/deb/openmediavault/var/www/openmediavault/js/omv/Rpc.js
    index de93133..c850815 100644
    --- a/deb/openmediavault/var/www/openmediavault/js/omv/Rpc.js
    +++ b/deb/openmediavault/var/www/openmediavault/js/omv/Rpc.js
    @@ -30,6 +30,7 @@ Ext.define("OMV.Rpc", {
            requires: [ "OMV.window.MessageBox" ],
            singleton: true,
            autoAbort: false,
    +       guru: null,
            config: {
                    disabled: false
    @@ -167,7 +168,11 @@ Ext.define("OMV.Rpc", {
                                    me.setDisabled(true);
                                    // Display a dialog forcing user to click 'OK' to reload
                                    // the page.
    -                               OMV.MessageBox.guru({
    +                               if (this.guru)
    +                               {
    +                                       this.guru.destroy();
    +                               }
    +                               this.guru = OMV.MessageBox.guru({
                                            msg: rpcResponse.message,
                                            fn: function() {
                                                    OMV.confirmPageUnload = false;
    diff --git a/deb/openmediavault/var/www/openmediavault/js/omv/window/MessageBox.js b/deb/openmediavault/var/www/openmediavault/js/omv/window/MessageBox.js
    index 4fa516e..d1ddbd5 100644
    --- a/deb/openmediavault/var/www/openmediavault/js/omv/window/MessageBox.js
    +++ b/deb/openmediavault/var/www/openmediavault/js/omv/window/MessageBox.js
    @@ -346,7 +346,13 @@ Ext.define("OMV.window.MessageBox", {
                            y: 0,
                            baseCls: Ext.baseCSSPrefix + "message-box-guru",
                            html: Ext.String.format("Software Failure.   " +
    -                         "Press left mouse button to continue.<br/>{0}", config.msg)
    +                         "Press left mouse button to continue.<br/>{0}", config.msg),
    +                       onDestroy: function(){
    +                         Ext.getBody().un({
    +                               keypress: fn,
    +                               click: fn
    +                         });
    +                       }
                    });
                    // Monitor key press and mouse clicks.
                    var fn = function(e, t, eOpts) {
    diff file icon guru.diff (2,383 bytes) 2017-07-16 00:01 +

-Relationships
+Relationships

-Notes

~0004861

votdev (administrator)

Please create a bugreport for the other issues and create a pull request on github. Do not attach patches here.

~0004865

ErikM (reporter)

OK, pull request #26 created.

~0004868

votdev (administrator)

Last edited: 2017-07-17 17:55

View 2 revisions

Fixed in openmediavault 3.0.85, see https://github.com/openmediavault/openmediavault/commit/93da4bbf708a252515f9de5bf05bb4b2ffa263de.

+Notes

-Issue History
Date Modified Username Field Change
2017-07-16 00:01 ErikM New Issue
2017-07-16 00:01 ErikM Status new => assigned
2017-07-16 00:01 ErikM Assigned To => votdev
2017-07-16 00:01 ErikM File Added: guru.diff
2017-07-16 11:26 votdev Note Added: 0004861
2017-07-17 12:45 ErikM Note Added: 0004865
2017-07-17 17:32 votdev Status assigned => resolved
2017-07-17 17:32 votdev Resolution open => fixed
2017-07-17 17:32 votdev Fixed in Version => Erasmus (3.x)
2017-07-17 17:32 votdev Note Added: 0004868
2017-07-17 17:55 votdev Note Edited: 0004868 View Revisions
+Issue History