View Issue Details

IDProjectCategoryView StatusLast Update
0026146CommunityOCCT:Visualizationpublic2015-05-14 16:38
ReporterPawel Assigned Toabv 
PriorityhighSeveritycrash 
Status closedResolutionfixed 
Target Version6.9.0Fixed in Version6.9.0 
Summary0026146: Visualization, Select3D_ISensitivePointSet - eliminate crash when clearing selections [only with TBB]
DescriptionI experience a crash when clearing selection (upon removing it from the AIS_InteractiveContext) for models containing Select3D_InteriorSensitivePointSet.

I was able to isolate the model causing the crash (attached).

The problem occurs only if TBB is used so make sure to set the following variables:

set MMGT_OPT=2
set MMGT_REENTRANT=1
Steps To ReproduceDRAW reproducer:

pload ALL
restore crash_compound.brep
vinit
vdisplay crash_compound
vremove crash_compound
Additional information
and documentation updates
Stack trace:
     TKV3d.dll!NCollection_Handle<Select3D_ISensitivePointSet>::Ptr::~Ptr() Line 62 + 0x5a bytes C++
     TKV3d.dll!NCollection_Handle<Select3D_ISensitivePointSet>::Ptr::`scalar deleting destructor'() + 0x2c bytes C++
     TKernel.dll!Standard_Transient::Delete() Line 72 + 0x30 bytes C++
     TKernel.dll!Handle_Standard_Transient::EndScope() Line 54 C++
     TKV3d.dll!Handle_Standard_Transient::~Handle_Standard_Transient() Line 72 C++
     TKV3d.dll!NCollection_Handle<Select3D_ISensitivePointSet>::~NCollection_Handle<Select3D_ISensitivePointSet>() + 0x31 bytes C++
     TKV3d.dll!Select3D_SensitiveFace::~Select3D_SensitiveFace() + 0x38 bytes C++
     TKV3d.dll!Select3D_SensitiveFace::`scalar deleting destructor'() + 0x2c bytes C++
     TKernel.dll!MMgt_TShared::Delete() Line 23 + 0x30 bytes C++
     TKernel.dll!Handle_Standard_Transient::EndScope() Line 54 C++
     TKV3d.dll!Handle_Standard_Transient::Nullify() Line 92 C++
     TKV3d.dll!SelectMgr_SensitiveEntity::Clear() Line 37 C++
     TKV3d.dll!SelectMgr_Selection::Clear() Line 91 C++
     TKV3d.dll!SelectMgr_SelectableObject::ClearSelections(const unsigned int update) Line 149 C++
     TKV3d.dll!SelectMgr_SelectionManager::Remove(const Handle_SelectMgr_SelectableObject & theObject) Line 237 C++
     TKV3d.dll!AIS_InteractiveContext::ClearGlobal(const Handle_AIS_InteractiveObject & theIObj, const unsigned int theToUpdateviewer) Line 2421 C++
     TKV3d.dll!AIS_InteractiveContext::Remove(const Handle_AIS_InteractiveObject & theIObj, const unsigned int theToUpdateViewer) Line 837 C++ 
TagsNo tags attached.
Test case numberbugs vis(004) bug26146

Attached Files

  • crash_compound.brep (30,163 bytes)

Relationships

related to 0026121 closedbugmaster Open CASCADE Visualization - revise implementation of point sets used in Select3D_SensitiveFace 

Activities

Pawel

2015-04-24 16:35

developer  

crash_compound.brep (30,163 bytes)

vpa

2015-05-06 16:50

developer   ~0040640

It is necessary to inherit SelectMgr_FrustumBuilder from Standard_Transient to avoid usage of NCollection_Handle

git

2015-05-06 17:30

administrator   ~0040648

Branch CR26146 has been created by abv.

SHA-1: 7065d6f4f131ad20dda0f4dc42431912bd515d52


Detailed log of new commits:

Author: abv
Date: Wed May 6 16:30:27 2015 +0300

    0026146: Select3D_ISensitivePointSet: Crash when clearing selections [only with TBB]
    
    Classes Select3D_ISensitivePointSet and Select3D_BoundarySensitivePointSet removed; Select3D_SensitivePoly is used directly for boundary selection.
    Last argument in Select3D_SensitiveFace is made non-default to ensure that value is always explicitly specified by the caller.
    Class SelectMgr_FrustumBuilder is made to inherit Standard_Transient to use normal Handle instead of NCollection_Handle.
    
    Test case bugs vis bug26146 added.

Author: vpa
Date: Thu Apr 30 18:08:55 2015 +0300

    0026121: Visualization - revise implementation of point sets used in Select3D_SensitiveFace
    
    Code duplication was eliminated by removing constructors with handle input arrays

abv

2015-05-06 17:31

manager   ~0040649

Fix pushed to branch CR26146, please review. Note that this branch is based on last IR-2015-04-30 and includes fix for CR26121.

kgv

2015-05-06 18:18

developer   ~0040661

Please test the patch.

git

2015-05-06 19:45

administrator   ~0040679

Branch CR26146 has been updated by vpa.

SHA-1: b0e366ca6d678b2247557b076afe6a4e8f106e8c


Detailed log of new commits:

Author: vpa
Date: Wed May 6 19:44:56 2015 +0300

    Drop unused Select3D_ISensitivePointSet.hxx file

bugmaster

2015-05-07 07:47

administrator   ~0040692

Problem of compilation on Windows and Linux platforms:

http://jenkins-test-01.nnov.opencascade.com:8080/view/CR26146-master/job/CR26146-master_build_occt_linux/

http://jenkins-test-01.nnov.opencascade.com:8080/view/CR26146-master/job/CR26146-master_build_occt_windows_64/

git

2015-05-07 08:48

administrator   ~0040694

Branch CR26146 has been updated by kgv.

SHA-1: 56670f091b1ec304e4cc8629636bdfaf478291b2


Detailed log of new commits:

Author: kgv
Date: Thu May 7 08:48:13 2015 +0300

    do not include removed header

git

2015-05-07 08:54

administrator   ~0040695

Branch CR26146_1 has been created by kgv.

SHA-1: a801994b798179f6cdd44003176d4e25eeb16501


Detailed log of new commits:

Author: abv
Date: Thu May 7 08:53:38 2015 +0300

    0026146: Visualization, Select3D_ISensitivePointSet - eliminate crash when clearing selections [only with TBB]
    
    Remove classes Select3D_ISensitivePointSet and Select3D_BoundarySensitivePointSet; use Select3D_SensitivePoly directly for boundary selection.
    Make last argument in Select3D_SensitiveFace non-default to ensure that value is always explicitly specified by the caller.
    Inherit SelectMgr_FrustumBuilder from Standard_Transient to use normal Handle instead of NCollection_Handle.
    
    Add test case bugs/vis/bug26146.

kgv

2015-05-07 08:55

developer   ~0040696

Please use corrected patch in branch CR26146_1.

git

2015-05-07 16:57

administrator   ~0040756

Branch CR26146_1 has been updated by mkv.

SHA-1: 1a416a5a40036f7307a823685166495e383a16ee


Detailed log of new commits:

Author: mkv
Date: Thu May 7 16:56:59 2015 +0300

    Small correction of test case for issue CR25271

mkv

2015-05-07 16:58

tester   ~0040757

Dear BugMaster,
Branch CR26146_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: a801994b798179f6cdd44003176d4e25eeb16501

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 4 (4 on master)
Windows: 0 (0 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR26146-1-master-occt-64/Debian60-64/bugs/vis/bug26146.html
http://occt-tests/CR26146-1-master-occt-64/Windows-64-VC10/bugs/vis/bug26146.html
bugs vis(004) bug26146: OK

Testing on Linux:
occt component :
Total MEMORY difference: 95504816 / 94854828 [+0.69%]
Total CPU difference: 54988.829999999456 / 52846.499999999505 [+4.05%]

products component :
Total MEMORY difference: 23812689 / 23786438 [+0.11%]
Total CPU difference: 19635.06000000002 / 17912.09 [+9.62%]

Testing on Windows:
occt component :

Checking v3d
CPU v3d edge_solid: 27.59657689999999 / 25.69336469999999 [+7.41%]
CPU v3d vertex: 8.954457399999997 / 7.566048500000002 [+18.35%]
CPU v3d edge: 9.4536606 / 8.814056499999998 [+7.26%]
CPU v3d vertex_wire: 18.096116 / 17.113309700000002 [+5.74%]

Total MEMORY difference: 58427319 / 58718297 [-0.50%]
Total CPU difference: 16641.00107239901 / 16857.405659598804 [-1.28%]

products component :
Total MEMORY difference: 15619318 / 15615211 [+0.03%]
Total CPU difference: 6677.295202900006 / 6509.51612739998 [+2.58%]

There are no differences in images found by testdiff.

git

2015-05-14 16:38

administrator   ~0041114

Branch CR26146 has been deleted by inv.

SHA-1: 56670f091b1ec304e4cc8629636bdfaf478291b2

git

2015-05-14 16:38

administrator   ~0041115

Branch CR26146_1 has been deleted by inv.

SHA-1: 1a416a5a40036f7307a823685166495e383a16ee

Related Changesets

occt: master bf3977c9

2015-05-07 05:53:38

abv


Committer: abv Details Diff
0026146: Visualization, Select3D_ISensitivePointSet - eliminate crash when clearing selections [only with TBB]

Remove classes Select3D_ISensitivePointSet and Select3D_BoundarySensitivePointSet; use Select3D_SensitivePoly directly for boundary selection.
Make last argument in Select3D_SensitiveFace non-default to ensure that value is always explicitly specified by the caller.
Inherit SelectMgr_FrustumBuilder from Standard_Transient to use normal Handle instead of NCollection_Handle.

Add test case bugs/vis/bug26146.
Affected Issues
0026146
mod - src/AIS/AIS_PlaneTrihedron.cxx Diff File
mod - src/AIS/AIS_Trihedron.cxx Diff File
mod - src/MeshVS/MeshVS_Mesh.cxx Diff File
mod - src/Select3D/FILES Diff File
mod - src/Select3D/Select3D.cdl Diff File
rm - src/Select3D/Select3D_BoundarySensitivePointSet.cxx Diff File
rm - src/Select3D/Select3D_BoundarySensitivePointSet.hxx Diff File
mod - src/Select3D/Select3D_InteriorSensitivePointSet.cxx Diff File
mod - src/Select3D/Select3D_InteriorSensitivePointSet.hxx Diff File
rm - src/Select3D/Select3D_ISensitivePointSet.hxx Diff File
mod - src/Select3D/Select3D_SensitiveFace.cxx Diff File
mod - src/Select3D/Select3D_SensitiveFace.hxx Diff File
mod - src/SelectMgr/SelectMgr_BaseFrustum.cxx Diff File
mod - src/SelectMgr/SelectMgr_BaseFrustum.hxx Diff File
mod - src/SelectMgr/SelectMgr_Frustum.hxx Diff File
mod - src/SelectMgr/SelectMgr_FrustumBuilder.cxx Diff File
mod - src/SelectMgr/SelectMgr_FrustumBuilder.hxx Diff File
add - tests/bugs/vis/bug26146 Diff File

Issue History

Date Modified Username Field Change
2015-04-24 16:35 Pawel New Issue
2015-04-24 16:35 Pawel Assigned To => kgv
2015-04-24 16:35 Pawel File Added: crash_compound.brep
2015-04-24 16:37 Pawel Relationship added related to 0026121
2015-04-24 17:05 Pawel Summary Select3D_ISensitivePointSet: Crash when clearing selections => Select3D_ISensitivePointSet: Crash when clearing selections [only with TBB]
2015-04-24 17:05 Pawel Description Updated
2015-04-24 17:05 Pawel Steps to Reproduce Updated
2015-04-24 17:08 Pawel Priority normal => high
2015-04-24 18:05 kgv Assigned To kgv => vpa
2015-04-24 18:05 kgv Status new => assigned
2015-05-06 16:50 vpa Note Added: 0040640
2015-05-06 17:30 git Note Added: 0040648
2015-05-06 17:31 abv Note Added: 0040649
2015-05-06 17:31 abv Assigned To vpa => kgv
2015-05-06 17:31 abv Status assigned => resolved
2015-05-06 17:31 abv Assigned To kgv => vpa
2015-05-06 18:18 kgv Note Added: 0040661
2015-05-06 18:18 kgv Assigned To vpa => bugmaster
2015-05-06 18:18 kgv Status resolved => reviewed
2015-05-06 18:18 kgv Product Version 6.9.0 =>
2015-05-06 18:18 kgv Summary Select3D_ISensitivePointSet: Crash when clearing selections [only with TBB] => Visualization, Select3D_ISensitivePointSet - eliminate crash when clearing selections [only with TBB]
2015-05-06 18:18 kgv Steps to Reproduce Updated
2015-05-06 18:18 kgv Additional Information Updated
2015-05-06 18:20 mkv Assigned To bugmaster => mkv
2015-05-06 19:45 git Note Added: 0040679
2015-05-07 07:47 bugmaster Note Added: 0040692
2015-05-07 07:47 bugmaster Assigned To mkv => kgv
2015-05-07 07:47 bugmaster Status reviewed => assigned
2015-05-07 07:47 bugmaster Assigned To kgv => vpa
2015-05-07 08:48 git Note Added: 0040694
2015-05-07 08:54 git Note Added: 0040695
2015-05-07 08:55 kgv Note Added: 0040696
2015-05-07 08:55 kgv Assigned To vpa => bugmaster
2015-05-07 08:55 kgv Status assigned => resolved
2015-05-07 08:55 kgv Status resolved => reviewed
2015-05-07 11:10 mkv Assigned To bugmaster => mkv
2015-05-07 16:57 git Note Added: 0040756
2015-05-07 16:58 mkv Note Added: 0040757
2015-05-07 16:58 mkv Assigned To mkv => bugmaster
2015-05-07 16:58 mkv Status reviewed => tested
2015-05-07 16:59 mkv Test case number => bugs vis(004) bug26146
2015-05-08 15:49 abv Changeset attached => occt master bf3977c9
2015-05-08 15:49 abv Assigned To bugmaster => abv
2015-05-08 15:49 abv Status tested => verified
2015-05-08 15:49 abv Resolution open => fixed
2015-05-14 15:28 aiv Status verified => closed
2015-05-14 15:30 aiv Fixed in Version => 6.9.0
2015-05-14 16:38 git Note Added: 0041114
2015-05-14 16:38 git Note Added: 0041115