View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027567 | Open CASCADE | OCCT:VIS | public | 2016-06-02 22:12 | 2016-12-09 16:38 |
Reporter | Assigned To | bugmaster | |||
Priority | high | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.1.0 | Fixed in Version | 7.1.0 | ||
Summary | 0027567: VIS - possible memory leaks due to use of plain pointers | ||||
Description | As suggested by fix for memory leak made in OCE, the fix for 0026625 is incomplete, and memory leaks still remain in IVtkVTK_ShapeData.cxx. The reffered OCE commit is: https://github.com/tpaviot/oce/commit/e6847828a024f5dfeb13ca72a13838e959790626 The problem is on line 41 in current OCCT master (c5c7af4b7): > myPolyData->SetPoints (vtkPoints::New()); Here method New() returns object with reference counter = 1, which will never be destroyed. Apparently the same problem exists in - method IVtkTools_SubPolyDataFilter::RequestData(), variable anIdList - IVtkTools_ShapeObject.cxx, lines 91 and 111 In some places pointer obtained by call to unguarded New() is returned from a function, e.g. IVtkTools::InitLookupTable(). When this function is used (e.g. in InitShapeMapper()), there is nothing that implies that the memory will be returned, thus I suspect that this also will lead to memory leaks. The safe approach should be to always use smart pointers and never call unguarded New(). | ||||
Steps To Reproduce | Fixed. The new test has been added: v3d/ivtk/bug27567 | ||||
Tags | No tags attached. | ||||
Test case number | bugs vis bug27567 | ||||
|
Branch CR27567 has been created by rkv. SHA-1: 46f2d2914c3a85fea25e8a8b140fadfd5f1715cc Detailed log of new commits: Author: rkv Date: Tue Aug 23 15:52:11 2016 +0300 0027567: VIS - possible memory leaks due to use of plain pointers: Fixed according to http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers |
|
Please note that it is necessary to fix guide also at https://www.opencascade.com/doc/occt-6.9.0/overview/html/occt_user_guides__vis.html The line vtkLookupTable* Table = IVtkTools::InitLookupTable(); should be replaced by the following: vtkSmartPointer<vtkLookupTable> Table = IVtkTools::InitLookupTable(); |
|
Branch CR27567 has been updated by rkv. SHA-1: 76eaf7557fb339fba7d797f10c81ff8a20850780 Detailed log of new commits: Author: rkv Date: Tue Aug 23 16:55:05 2016 +0300 0027567: VIS - possible memory leaks due to use of plain pointers: Fix the VIS guide. |
|
Please prepare a Git branch with a single combined commit. |
|
Branch CR27567 has been updated by rkv. SHA-1: afb707a1350362c5781a7f287214a4900186546c Detailed log of new commits: Author: rkv Date: Wed Aug 24 08:38:56 2016 +0300 Merge branch 'CR27567' of git.dev.opencascade.org:occt into CR27567 Author: rkv Date: Tue Aug 23 15:52:11 2016 +0300 0027567: VIS - possible memory leaks due to use of plain pointers: Fix the VIS guide. http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 3b2f972d65100cb3efd352f877ffc0f7a443fe01 |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 8059b0eeb79607c1e4e275ce1088a4d87b5190a6 |
|
Can you please create a test case that detects memory leaks after multiple more or less complete IVtk usage cycles (display a shape in VTK view, activate selection modes, select some entities, delete a shape and all its data from VTK)? See test case bugs vis bug26538 as an example of memory leak detection. |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 32a76b05e1bd595e9ddd6b7c0159765c1fc59e6a |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 6de99bc31cd60a60b51435622a18497c62428859 |
|
- Please correct commit so that author and committer will be the same. - Please remove external URLs from the commit description. |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: fd4e3decabe7c3716031380cf4fd4fe0a02722aa |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 646b7d83f7648ae5ec144c796149204c21adfae4 |
|
Branch CR27567 reviewed without remarks, ready for testing. |
|
Branch CR27567 has been updated forcibly by mkv. SHA-1: 4db99844eb5c6ed9b3ef6c60b99e6e92ab8681f0 |
|
Dear BugMaster, Branch CR27567 was rebased on IR-2016-09-01 of occt git-repository. |
|
Dear BugMaster, Branch CR27567 from occt git-repository (and IR-2016-09-01 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: 4db99844eb5c6ed9b3ef6c60b99e6e92ab8681f0 Number of compiler warnings: occt component : Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS : 0 (0 on master) products component : Linux: 64 (64 on master) Windows: 0 (0 on master) MacOS : 1150 Regressions/Differences/Improvements: No regressions/differences Testing cases: http://occt-tests/CR27567-master-OCCT/Debian70-64/bugs/vis/bug27567.html http://occt-tests/CR27567-master-OCCT/Windows-64-VC10/bugs/vis/bug27567.html bugs vis bug27567: FAILED (exception) Testing on Linux: occt component : Total MEMORY difference: 89312840 / 89476228 [-0.18%] Total CPU difference: 19317.560000000005 / 19241.180000000015 [+0.40%] products component : Total MEMORY difference: 30011013 / 29985574 [+0.08%] Total CPU difference: 5109.999999999963 / 5115.309999999973 [-0.10%] Testing on Windows: occt component : Total MEMORY difference: 57147679 / 57155154 [-0.01%] Total CPU difference: 18213.8031543988 / 18057.115749998855 [+0.87%] products component : Total MEMORY difference: 21260683 / 21225231 [+0.17%] Total CPU difference: 4898.322199299956 / 4849.119483899957 [+1.01%] There are no differences in images found by testdiff. |
|
Dear rkv, Branch CR27567 has been rejected due to: - failed test-case for issue There are 2 variants of correction for test case bugs vis bug27567: 1 - add drow-command "pload VIS" 2 - move test case to v3d/ivtk test group |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 21424f60e5b1e1d3e05839ea33888f4d64601db7 |
|
Branch CR27567 without remarks, ready for testing. |
|
Branch CR27567 has been updated forcibly by mkv. SHA-1: e6539de314bf67d52646e73a61a5a65bc25c470a |
|
Dear BugMaster, test case was retested. Testing cases: http://occt-tests/CR27567-master-OCCT/Debian70-64/v3d/ivtk/bug27567.html v3d ivtk bug27567: FAILED Tcl Exception: Memory leak detected http://occt-tests/CR27567-master-OCCT/Windows-64-VC10/v3d/ivtk/bug27567.html v3d ivtk bug27567: OK |
|
Dear rkv, Branch CR27567 has been rejected due to: - failed test-case for issue |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 8307146a1b813f300b6037caa3b21c3076d420d6 |
|
Branch CR27567 reviewed without remarks. Please, check the results of the corrected test case v3d ivtk bug27567 under Linux only, complete re-testing not needed. |
|
Dear BugMaster, test case was retested. Testing cases: http://occt-tests/CR27567-master-OCCT/Debian70-64/v3d/ivtk/bug27567.html [^] v3d ivtk bug27567: FAILED Tcl Exception: Memory leak detected |
|
Memory leak of 118 kbyte per iteration is beyond the negligible limit. Thus the following steps are proposed: - Try to understand why other test cases involving "checktrend" do not fail under Linux - or better to say, what makes bug27567 test case fail while the other similar ones do not, of course if there is some "suspicious" difference in the test scripts. - If the problem cannot be solved at the level of the test script, analyze the reasons for such noticeable memory leaks under Linux (similarly to the analysis completed for Windows). |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: b48f0508f8c2ea82e777e41b35f0d516504ad631 |
|
Can you please finalize correction of this issue? |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 2470ca028ae7d1bf59ac6d5a649dbaac84977f22 |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 84e111623151b1afc0ab1f7e3231d720785fb1c3 |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: c9dc99aa1d22a6b401d1d5f429856fafa3f61df9 |
|
The reason of memory increase on Linux is virtual windows mode used by testgrid and offscreen rendering in this mode. The related bug #0027871 is created. |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: 6ff26ef91dd74634a0ecb0ee4f4d617d27ca4b2f |
|
Branch CR27567 reviewed without remarks, ready for testing. It includes also the patch for 0027734 - thus please test branch compilation with TBB enabled under Windows! |
|
Dear rkv, could you please rebase branch CR27567 on IR-2016-09-15. |
|
Branch CR27567 has been updated forcibly by rkv. SHA-1: ea91fbb950851e4a7f190eb22067d4e936831d41 |
|
Dear BugMaster, Branch CR27567 from occt git-repository (and IR-2016-09-15 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: ea91fbb950851e4a7f190eb22067d4e936831d41 Number of compiler warnings: occt component : Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS : 0 (0 on master) products component : Linux: 64 (64 on master) Windows: 0 (0 on master) MacOS : 1166 Regressions/Differences/Improvements: No regressions/differences Testing cases: http://occt-tests/CR27567-master-OCCT/Debian70-64/v3d/ivtk/bug27567.html http://occt-tests/CR27567-master-OCCT/Windows-64-VC10/v3d/ivtk/bug27567.html v3d ivtk bug27567: OK Testing on Linux: occt component : Total MEMORY difference: 90268969 / 89797117 [+0.53%] Total CPU difference: 19278.499999999996 / 19211.76999999994 [+0.35%] products component : Total MEMORY difference: 29989654 / 29998572 [-0.03%] Total CPU difference: 5070.319999999974 / 5119.779999999977 [-0.97%] Testing on Windows: occt component : Total MEMORY difference: 57204088 / 57211877 [-0.01%] Total CPU difference: 18218.997987698815 / 18509.12864749872 [-1.57%] products component : Total MEMORY difference: 21267626 / 21232183 [+0.17%] Total CPU difference: 4830.399363899943 / 4959.0221883999575 [-2.59%] There are no differences in images found by testdiff. |
|
Branch CR27567 has been updated by mkv. SHA-1: 4d141a23091fc5c848ff78dd58aaf1c309dab5aa Detailed log of new commits: Author: mkv Date: Mon Sep 19 13:55:17 2016 +0300 Small correction of test case for issue CR27567 |
|
Dear BugMaster, Branch CR27567 is TESTED. |
|
Branch CR27567 has been deleted by kgv. SHA-1: 4d141a23091fc5c848ff78dd58aaf1c309dab5aa |
occt: master a2f76b15 2016-08-23 12:52:11
Committer: bugmaster Details Diff |
0027567: VIS - possible memory leaks due to use of plain pointers: Fix also the VIS guide. Add the test v3d/ivtk/bug27567. Add a draw command "ivtkremove". 0027734: Configuration - TKIVtkDraw build fails with TBB: Remove unnecessary define statement (windows specific). Small correction of test case for issue CR27567 |
Affected Issues 0027567 |
|
mod - dox/user_guides/vis/vis.md | Diff File | ||
mod - src/Draw/Draw_Interpretor.cxx | Diff File | ||
mod - src/DrawResources/TestCommands.tcl | Diff File | ||
mod - src/IVtkDraw/IVtkDraw.cxx | Diff File | ||
mod - src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.cxx | Diff File | ||
mod - src/IVtkDraw/IVtkDraw_Interactor.cxx | Diff File | ||
mod - src/IVtkOCC/IVtkOCC_SelectableObject.cxx | Diff File | ||
mod - src/IVtkOCC/IVtkOCC_SelectableObject.hxx | Diff File | ||
mod - src/IVtkOCC/IVtkOCC_ShapeMesher.cxx | Diff File | ||
mod - src/IVtkOCC/IVtkOCC_ShapePickerAlgo.cxx | Diff File | ||
mod - src/IVtkOCC/IVtkOCC_ShapePickerAlgo.hxx | Diff File | ||
mod - src/IVtkOCC/IVtkOCC_ViewerSelector.cxx | Diff File | ||
mod - src/IVtkOCC/IVtkOCC_ViewerSelector.hxx | Diff File | ||
mod - src/IVtkTools/IVtkTools.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools.hxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_DisplayModeFilter.hxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapeDataSource.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapeDataSource.hxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapeObject.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapeObject.hxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapePicker.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapePicker.hxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_SubPolyDataFilter.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_SubPolyDataFilter.hxx | Diff File | ||
mod - src/IVtkVTK/IVtkVTK_ShapeData.cxx | Diff File | ||
mod - src/IVtkVTK/IVtkVTK_ShapeData.hxx | Diff File | ||
mod - src/IVtkVTK/IVtkVTK_View.cxx | Diff File | ||
mod - src/IVtkVTK/IVtkVTK_View.hxx | Diff File | ||
mod - tests/bugs/begin | Diff File | ||
add - tests/v3d/ivtk/bug27567 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-06-02 22:12 |
|
New Issue | |
2016-06-02 22:12 |
|
Assigned To | => san |
2016-06-02 22:12 |
|
Relationship added | child of 0026625 |
2016-06-03 10:40 |
|
Assigned To | san => aba |
2016-06-07 06:47 |
|
Status | new => assigned |
2016-06-07 06:47 |
|
Priority | normal => high |
2016-07-01 16:30 |
|
Assigned To | aba => san |
2016-08-01 19:40 |
|
Assigned To | san => aba |
2016-08-18 20:19 |
|
Assigned To | aba => rkv |
2016-08-23 15:50 | git | Note Added: 0056974 | |
2016-08-23 15:58 |
|
Assigned To | rkv => san |
2016-08-23 15:58 |
|
Status | assigned => resolved |
2016-08-23 15:58 |
|
Steps to Reproduce Updated | |
2016-08-23 16:14 |
|
Note Added: 0056979 | |
2016-08-23 16:53 | git | Note Added: 0056985 | |
2016-08-23 21:54 |
|
Note Added: 0057009 | |
2016-08-23 21:54 |
|
Assigned To | san => rkv |
2016-08-23 21:54 |
|
Status | resolved => assigned |
2016-08-24 08:37 | git | Note Added: 0057011 | |
2016-08-24 08:48 | git | Note Added: 0057012 | |
2016-08-24 08:57 |
|
Assigned To | rkv => san |
2016-08-24 08:57 |
|
Status | assigned => resolved |
2016-08-24 08:57 |
|
Steps to Reproduce Updated | |
2016-08-24 10:57 |
|
Assigned To | san => rkv |
2016-08-24 10:57 |
|
Status | resolved => assigned |
2016-08-24 16:09 | git | Note Added: 0057034 | |
2016-08-24 16:10 |
|
Assigned To | rkv => san |
2016-08-24 16:10 |
|
Status | assigned => resolved |
2016-08-24 16:10 |
|
Steps to Reproduce Updated | |
2016-08-24 16:32 |
|
Note Added: 0057036 | |
2016-08-24 16:32 |
|
Assigned To | san => rkv |
2016-08-24 16:32 |
|
Status | resolved => assigned |
2016-08-30 20:54 | git | Note Added: 0057311 | |
2016-08-30 20:58 |
|
Assigned To | rkv => san |
2016-08-30 20:58 |
|
Status | assigned => resolved |
2016-08-30 20:58 |
|
Steps to Reproduce Updated | |
2016-08-31 09:20 | git | Note Added: 0057313 | |
2016-08-31 11:13 | kgv | Note Added: 0057317 | |
2016-08-31 13:12 | git | Note Added: 0057328 | |
2016-09-01 11:09 | git | Note Added: 0057377 | |
2016-09-01 15:38 |
|
Note Added: 0057391 | |
2016-09-01 15:38 |
|
Assigned To | san => bugmaster |
2016-09-01 15:38 |
|
Status | resolved => reviewed |
2016-09-01 16:44 |
|
Assigned To | bugmaster => mkv |
2016-09-01 17:26 | git | Note Added: 0057396 | |
2016-09-02 13:21 |
|
Note Added: 0057410 | |
2016-09-02 13:22 |
|
Note Added: 0057411 | |
2016-09-02 13:22 |
|
Note Added: 0057412 | |
2016-09-02 13:22 |
|
Assigned To | mkv => rkv |
2016-09-02 13:22 |
|
Status | reviewed => feedback |
2016-09-02 13:22 |
|
Test case number | => bugs vis bug27567 |
2016-09-02 14:29 | git | Note Added: 0057417 | |
2016-09-02 14:30 |
|
Assigned To | rkv => san |
2016-09-02 14:30 |
|
Status | feedback => resolved |
2016-09-02 14:30 |
|
Steps to Reproduce Updated | |
2016-09-02 14:38 |
|
Note Added: 0057423 | |
2016-09-02 14:38 |
|
Assigned To | san => bugmaster |
2016-09-02 14:38 |
|
Status | resolved => reviewed |
2016-09-02 14:51 |
|
Assigned To | bugmaster => mkv |
2016-09-02 15:36 | git | Note Added: 0057429 | |
2016-09-05 19:32 |
|
Note Added: 0057486 | |
2016-09-05 19:33 |
|
Note Added: 0057487 | |
2016-09-05 19:33 |
|
Assigned To | mkv => rkv |
2016-09-05 19:33 |
|
Status | reviewed => assigned |
2016-09-06 15:41 | git | Note Added: 0057521 | |
2016-09-06 15:42 |
|
Assigned To | rkv => san |
2016-09-06 15:42 |
|
Status | assigned => resolved |
2016-09-06 15:52 |
|
Note Added: 0057522 | |
2016-09-06 15:52 |
|
Assigned To | san => bugmaster |
2016-09-06 15:52 |
|
Status | resolved => reviewed |
2016-09-06 15:53 |
|
Note Edited: 0057522 | |
2016-09-06 15:58 |
|
Assigned To | bugmaster => mkv |
2016-09-06 17:11 |
|
Note Added: 0057527 | |
2016-09-06 17:11 |
|
Assigned To | mkv => rkv |
2016-09-06 17:11 |
|
Status | reviewed => assigned |
2016-09-06 17:27 |
|
Note Added: 0057529 | |
2016-09-09 16:45 | git | Note Added: 0057648 | |
2016-09-12 19:30 |
|
Note Added: 0057707 | |
2016-09-12 19:30 |
|
Status | assigned => feedback |
2016-09-14 13:56 | git | Note Added: 0057778 | |
2016-09-14 14:34 | git | Note Added: 0057783 | |
2016-09-14 16:55 | git | Note Added: 0057792 | |
2016-09-14 16:59 |
|
Note Added: 0057793 | |
2016-09-14 16:59 |
|
Assigned To | rkv => san |
2016-09-14 16:59 |
|
Status | feedback => resolved |
2016-09-14 19:13 |
|
Assigned To | san => rkv |
2016-09-14 19:13 |
|
Status | resolved => assigned |
2016-09-14 19:15 |
|
Relationship added | related to 0027734 |
2016-09-14 19:32 | git | Note Added: 0057804 | |
2016-09-14 19:33 |
|
Assigned To | rkv => san |
2016-09-14 19:33 |
|
Status | assigned => resolved |
2016-09-14 19:38 |
|
Note Added: 0057806 | |
2016-09-14 19:38 |
|
Assigned To | san => bugmaster |
2016-09-14 19:38 |
|
Status | resolved => reviewed |
2016-09-15 10:50 |
|
Assigned To | bugmaster => mkv |
2016-09-15 15:20 |
|
Note Added: 0057823 | |
2016-09-15 15:20 |
|
Assigned To | mkv => rkv |
2016-09-15 15:20 |
|
Status | reviewed => feedback |
2016-09-15 17:24 | git | Note Added: 0057830 | |
2016-09-15 17:26 |
|
Assigned To | rkv => mkv |
2016-09-15 17:50 |
|
Status | feedback => reviewed |
2016-09-19 13:55 |
|
Note Added: 0057920 | |
2016-09-19 13:55 | git | Note Added: 0057921 | |
2016-09-19 13:56 |
|
Note Added: 0057922 | |
2016-09-19 13:56 |
|
Assigned To | mkv => bugmaster |
2016-09-19 13:56 |
|
Status | reviewed => tested |
2016-09-23 10:21 | bugmaster | Changeset attached | => occt master a2f76b15 |
2016-09-23 10:21 | bugmaster | Status | tested => verified |
2016-09-23 10:21 | bugmaster | Resolution | open => fixed |
2016-10-28 21:45 | git | Note Added: 0059495 | |
2016-12-09 16:30 |
|
Status | verified => closed |
2016-12-09 16:38 |
|
Fixed in Version | => 7.1.0 |