View Issue Details

IDProjectCategoryView StatusLast Update
0027318Open CASCADEOCCT:Visualizationpublic2016-04-20 15:50
ReporteraplAssigned Toabv 
PriorityimmediateSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version6.9.1 
Target Version7.0.0Fixed in Version7.0.0 
Summary0027318: Memory is not released in Select3D_SensitiveSet when destroying AIS_InteractiveContext without removing objects
DescriptionSelect3D_SensitiveSet has member field myContent which is handle type NCollection_Handle<Select3D_BVHPrimitiveContent>. In its turn, Select3D_BVHPrimitiveContent has member field mySensitiveSet which is handle type Handle(Select3D_SensitiveSet) and points to owner instances. This class design creates cross-link between smart-pointer managed class instances that leads to memory leak if not properly resolved. For this purpose, virtual method Clear has been provided in Select3D_SensitiveSet. It is called when removing object from interactive context. However, if context is simply destroyed, the virtual method is not called and cross-link is never resolved.
Steps To ReproduceSimple test is opening/closing document (load some model into it) in MFC sample.

After each iteration memory grows.
TagsNo tags attached.
Test case numberbugs vis bug27318

Activities

git

2016-03-30 17:43

administrator   ~0052199

Branch CR27318 has been created by vpa.

SHA-1: d5ef4553440bf364ba4139de7c95759333bf7cdf


Detailed log of new commits:

Author: vpa
Date: Wed Mar 30 17:42:18 2016 +0300

    0027318: Memory is not released in Select3D_SensitiveSet when destroying AIS_InteractiveContext without removing objects
    
    - destructor was added to SelectMgr_SelectableObject to clean up selections;
    - test case for issue 0027318

vpa

2016-03-30 17:43

developer   ~0052200

Dear Anton,

please review patch in branch CR27318.

git

2016-03-30 18:04

administrator   ~0052203

Branch CR27318 has been updated forcibly by vpa.

SHA-1: df0038db40721eea3c879a4bf76febc8ab0f12e9

git

2016-03-30 18:07

administrator   ~0052204

Branch CR27318 has been updated forcibly by vpa.

SHA-1: f03f00e7fdb4e906d8a1719329320bfed74893f8

apl

2016-03-30 18:09

developer   ~0052205

Dear bugmaster,

Please test the branch.

git

2016-03-31 12:42

administrator   ~0052230

Branch CR27318 has been updated by apv.

SHA-1: 3e15392ce0d4c4886dd6e74ebaec785d4a8aafc8


Detailed log of new commits:

Author: apv
Date: Thu Mar 31 12:41:56 2016 +0300

    Warnings elimination

apv

2016-03-31 12:45

tester   ~0052231

Dear BugMaster,

Branch CR27318 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 3e15392ce0d4c4886dd6e74ebaec785d4a8aafc8

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MacOS: 0 (0 on master)
products component:
   Linux: 68
   Windows: 0
   MacOS: 1113

Regressions/Differences:
Not detected

Testing cases:
bugs vis bug27318 - OK
http://occt-tests/CR27318-master-OCCT/Debian70-64/bugs/vis/bug27318.html
http://occt-tests/CR27318-master-OCCT/Windows-64-VC10/bugs/vis/bug27318.html

Testing on Linux:
Total MEMORY difference: 89882206 / 90135629 [-0.28%]
Total CPU difference: 19236.250000000055 / 19404.330000000107 [-0.87%]

Testing on Windows:
Total MEMORY difference: 57511420 / 57537718 [-0.05%]
Total CPU difference: 17978.772047798924 / 18043.418862198814 [-0.36%]

git

2016-04-17 13:18

administrator   ~0052854

Branch CR27318 has been deleted by kgv.

SHA-1: 3e15392ce0d4c4886dd6e74ebaec785d4a8aafc8

Related Changesets

occt: master 4c0d97ac

2016-03-30 15:06:52

abv


Committer: abv Details Diff
0027318: Memory is not released in Select3D_SensitiveSet when destroying AIS_InteractiveContext without removing objects

- destructor was added to SelectMgr_SelectableObject to clean up selections;
- test case for issue 0027318

Warnings elimination
Affected Issues
0027318
mod - src/QABugs/QABugs_19.cxx Diff File
mod - src/SelectMgr/SelectMgr_SelectableObject.cxx Diff File
mod - src/SelectMgr/SelectMgr_SelectableObject.hxx Diff File
add - tests/bugs/vis/bug27318 Diff File

Issue History

Date Modified Username Field Change
2016-03-30 11:43 apl New Issue
2016-03-30 11:43 apl Assigned To => vpa
2016-03-30 11:44 apl Description Updated
2016-03-30 17:43 git Note Added: 0052199
2016-03-30 17:43 vpa Note Added: 0052200
2016-03-30 17:43 vpa Assigned To vpa => apl
2016-03-30 17:43 vpa Status new => resolved
2016-03-30 18:04 git Note Added: 0052203
2016-03-30 18:07 git Note Added: 0052204
2016-03-30 18:09 apl Note Added: 0052205
2016-03-30 18:09 apl Assigned To apl => bugmaster
2016-03-30 18:09 apl Status resolved => reviewed
2016-03-30 18:16 kgv Priority normal => immediate
2016-03-30 18:21 apv Assigned To bugmaster => apv
2016-03-31 12:42 git Note Added: 0052230
2016-03-31 12:43 apv Test case number => bugs vis bug27318
2016-03-31 12:45 apv Note Added: 0052231
2016-03-31 12:45 apv Assigned To apv => bugmaster
2016-03-31 12:45 apv Status reviewed => tested
2016-04-06 10:33 abv Changeset attached => occt master 4c0d97ac
2016-04-06 10:33 abv Assigned To bugmaster => abv
2016-04-06 10:33 abv Status tested => verified
2016-04-06 10:33 abv Resolution open => fixed
2016-04-17 13:18 git Note Added: 0052854
2016-04-20 15:43 aiv Fixed in Version => 7.0.0
2016-04-20 15:50 aiv Status verified => closed