Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0050762 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [POS2] POS | major | have not tried | 2022-11-03 23:41 | 2022-11-07 17:47 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | Retail | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 22Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | 22Q4.1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0050762: Memory leak in Carousel.jsx - DOM event listeners are not being removed | |||||||
Description | The Carousel.jsx component has a memory leak because it is registering DOM events on a useEffect hook but is never unregistering them. The useEffect hook should return a function that will be invoked when unmounting the component and that will unregister the DOM events | |||||||
Steps To Reproduce | See the code here [1], it is adding two event listeners but never removing them. It should removee them like it is done here [2] [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/web-jspack/org.openbravo.core2/src/components/Carousel/Carousel.jsx#L66 [^] [2] https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/web-jspack/org.openbravo.core2/src/components/DrawerMenu/DrawerMenuGroup.jsx#L250 [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0143177) hgbot (developer) 2022-11-07 17:23 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/893 [^] |
(0143179) hgbot (developer) 2022-11-07 17:47 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/893 [^] |
(0143180) hgbot (developer) 2022-11-07 17:47 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^] Changeset: c3081787f428e998727e7d6cba108e4ec586a2d3 Author: Augusto Mauch <augusto.mauch@openbravo.com> Date: 07-11-2022 17:06:15 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/c3081787f428e998727e7d6cba108e4ec586a2d3 [^] Fixes ISSUE-50762: Avoids memory leak in Carousel.jsx by unregistering event listeners --- M web-jspack/org.openbravo.core2/src/components/BaseKeymap/hooks/usePagination.js M web-jspack/org.openbravo.core2/src/components/Carousel/Carousel.jsx --- |
![]() |
|||
Date Modified | Username | Field | Change |
2022-11-07 16:00 | guilleaer | Type | defect => backport |
2022-11-07 16:00 | guilleaer | Target Version | => 22Q4.1 |
2022-11-07 17:23 | hgbot | Note Added: 0143177 | |
2022-11-07 17:47 | hgbot | Merge Request Status | open => approved |
2022-11-07 17:47 | hgbot | Resolution | open => fixed |
2022-11-07 17:47 | hgbot | Status | scheduled => closed |
2022-11-07 17:47 | hgbot | Note Added: 0143179 | |
2022-11-07 17:47 | hgbot | Fixed in Version | => 22Q4 |
2022-11-07 17:47 | hgbot | Note Added: 0143180 |
Copyright © 2000 - 2009 MantisBT Group |