MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023392Community[OCCT] OCCT:Application Frameworkpublic2012-08-19 09:352012-11-16 13:17
ReporterRoman Lygin 
Assigned ToRoman Lygin 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.5.3 
Target Version[OCCT] 6.5.4Fixed in Version[OCCT] 6.5.4 
Summary0023392: Memory leak in OCAF in debug mode
DescriptionTDF_LabelNode::Destroy() do not free memory for entry strings TCollection_AsciiString myDebugEntry;

Reproducer and memory allocation logs before and after the fix are attached.
Steps To ReproduceSee Reproducer() in ocaf-leak.zip.
TagsNo tags attached.
Test case number
Attached Fileszip file icon ocaf-leak.zip (1,044 bytes) 2012-08-19 09:35

- Relationships
related to 0023393closedRoman Lygin Improve usability of OSD_MAllocHook::CollectBySize 

-  Notes
(0021280)
Roman Lygin (developer)
2012-08-19 09:51

Fix pushed into the repository
(0021281)
Roman Lygin (developer)
2012-08-19 09:56

Extra note: apparently this issue is a regression of 6.5.3 vs 6.5.2 as in 6.5.2 the destructor TDF_LabelNode::~TDF_LabelNode() was explicit and hence destroyed myDebugEntry.
(0021282)
abv (manager)
2012-08-19 10:21

No remarks, please test
(0021284)
Roman Lygin (developer)
2012-08-19 11:04

Upon integration of 0023393 the regression test can be reworked to programmatically check for a leak as follows:

if (OSD_MAllocHook::GetCollectBySize()->myTotalLeftSize == 0) {
  //OK
} else {
  //FAIL
}
(0021303)
apn (administrator)
2012-08-21 16:05
edited on: 2012-08-23 13:27

Dear BugMaster,
Branch CR23392 (and products from GIT master) was compiled on Linux and Windows platforms and tested.

Regression:
Not detected

Improvements:
Not detected

Testing case:
Test case will be added after testing in debug mode.
In optimize mode we get empty report file 'cause function OSD_MAllocHook::CollectBySize::MakeReport does not go into the condition
"if (myArray[i].nbAlloc > 0 || myArray[i].nbFree > 0) "

I modified following test cases and pushed it to branch:
offset wire_unclosed_outside_0_005 C3 C4
offset wire_unclosed_outside_0_025 C3
offset wire_unclosed_outside_0_075 C3


- Related Changesets
occt: master 536416f3
Timestamp: 2012-08-24 11:08:50
Author: Roman Lygin
Details ] Diff ]
0023392: Memory leak in OCAF in debug mode

TDF_LabelNode::Destroy() does not free memory for entry strings TCollection_AsciiString myDebugEntry problem was corrected.
mod - src/TDF/TDF_LabelNode.cxx Diff ] File ]
mod - tests/offset/wire_unclosed_outside_0_005/C4 Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-08-19 09:35 Roman Lygin New Issue
2012-08-19 09:35 Roman Lygin Assigned To => szy
2012-08-19 09:35 Roman Lygin File Added: ocaf-leak.zip
2012-08-19 09:51 Roman Lygin Note Added: 0021280
2012-08-19 09:51 Roman Lygin Status new => resolved
2012-08-19 09:56 Roman Lygin Note Added: 0021281
2012-08-19 10:21 abv Note Added: 0021282
2012-08-19 10:21 abv Assigned To szy => bugmaster
2012-08-19 10:21 abv Status resolved => reviewed
2012-08-19 11:04 Roman Lygin Note Added: 0021284
2012-08-21 16:05 apn Note Added: 0021303
2012-08-21 16:11 apn Test case number => Not needed
2012-08-21 16:11 apn Status reviewed => tested
2012-08-21 16:46 apn Note Edited: 0021303 View Revisions
2012-08-21 16:46 apn Note Edited: 0021303 View Revisions
2012-08-21 18:15 apn Status tested => assigned
2012-08-21 18:16 apn Status assigned => resolved
2012-08-21 18:16 apn Status resolved => reviewed
2012-08-21 18:16 apn Assigned To bugmaster => apn
2012-08-23 13:06 abv Relationship added related to 0023393
2012-08-23 13:12 apn Note Edited: 0021303 View Revisions
2012-08-23 13:13 apn Test case number Not needed =>
2012-08-23 13:13 apn Assigned To apn => bugmaster
2012-08-23 13:13 apn Status reviewed => tested
2012-08-23 13:26 apn Note Edited: 0021303 View Revisions
2012-08-23 13:27 apn Note Edited: 0021303 View Revisions
2012-08-27 16:17 rln Changeset attached => occt master 536416f3
2012-08-27 16:17 rln Assigned To bugmaster => rln
2012-08-27 16:17 rln Status tested => verified
2012-08-27 16:17 rln Resolution open => fixed
2012-08-31 11:58 user533 Assigned To rln => Roman Lygin
2012-09-03 17:52 bugmaster Target Version => 6.5.4
2012-11-16 13:14 bugmaster Fixed in Version => 6.5.4
2012-11-16 13:17 bugmaster Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker