Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038159Openbravo ERPI. Performancepublic2018-03-16 12:232018-09-25 14:16
jarmendariz 
jarmendariz 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q4 
AugustoMauch
No
Core
No
0038159: Possible memory leak in Referenced Inventory Unbox process
After some time using the Unbox Window in Referenced Inventory, both the CPU and the memory usage increases until it fills all memory available leaving the system unusable.
As F&B Admin:
- In Referenced Inventory Type create a new record for F&B US
- In Referenced Inventory create a new record for organization F&B US West. Link to previously created type. Press OK.
- Press the Box button and select any line with any quantity, press OK
- Press the Unbox button
Select the line and use the Storage Bin selector. After a time the CPU and memory usage starts to increase.
Performance
related to defect 00380393.0PR18Q2 closed jarmendariz Organization filtering issues in Process Definition selectors 
png heap.png (55,988) 2018-03-16 12:52
https://issues.openbravo.com/file_download.php?file_id=11656&type=bug
png
Issue History
2018-03-16 12:23jarmendarizNew Issue
2018-03-16 12:23jarmendarizAssigned To => platform
2018-03-16 12:23jarmendarizOBNetwork customer => No
2018-03-16 12:23jarmendarizModules => Core
2018-03-16 12:23jarmendarizTriggers an Emergency Pack => No
2018-03-16 12:51jarmendarizRelationship addedrelated to 0038039
2018-03-16 12:52jarmendarizFile Added: heap.png
2018-03-16 12:53jarmendarizSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16868#r16868
2018-03-16 13:00jarmendarizNote Added: 0103316
2018-03-16 13:00jarmendarizSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16869#r16869
2018-03-20 09:23jarmendarizAssigned Toplatform => jarmendariz
2018-03-20 16:37alostaleTag Attached: Performance
2018-03-23 12:25alostaleStatusnew => acknowledged
2018-03-23 12:25alostalePrioritynormal => urgent
2018-09-24 12:18jarmendarizStatusacknowledged => scheduled
2018-09-24 12:26hgbotCheckin
2018-09-24 12:26hgbotNote Added: 0106957
2018-09-24 12:26hgbotStatusscheduled => resolved
2018-09-24 12:26hgbotResolutionopen => fixed
2018-09-24 12:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a7149d379ac19c9857de5adc89c9a69dfa1b4548 [^]
2018-09-24 12:27jarmendarizReview Assigned To => AugustoMauch
2018-09-25 10:41AugustoMauchNote Added: 0106994
2018-09-25 10:41AugustoMauchStatusresolved => closed
2018-09-25 10:41AugustoMauchFixed in Version => 3.0PR18Q4
2018-09-25 14:16hudsonbotCheckin
2018-09-25 14:16hudsonbotNote Added: 0107016

Notes
(0103316)
jarmendariz   
2018-03-16 13:00   
Attached dev tool's performance monitor shows js heap memory during ~1 minute of Unbox button usage.

In the following link, there are js head dumps before, during, and after the memory leak:

https://drive.google.com/open?id=1mYBmtD9GmCv1ESO2pWLf6BMQTkAWR6_5 [^]
(0106957)
hgbot   
2018-09-24 12:26   
Repository: erp/devel/pi
Changeset: a7149d379ac19c9857de5adc89c9a69dfa1b4548
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Mon Sep 24 10:25:19 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a7149d379ac19c9857de5adc89c9a69dfa1b4548 [^]

Fixed issue 38159: Memory leak in referenced inventory unbox process

The leak is caused by an invalid call of fireOnPause method on selector
with a targetRecordId (when clicking from the looking glass icon of a field).
This call gives an invalid delay value that causes the timeout to be called
indefinitely.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0106994)
AugustoMauch   
2018-09-25 10:41   
Code reviewed and verified
(0107016)
hudsonbot   
2018-09-25 14:16   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c4e1d4ba022d [^]
Maturity status: Test