View Issue Details

IDProjectCategoryView StatusLast Update
0028987Open CASCADEOCCT:Visualizationpublic2019-09-17 10:24
Reporterkgv Assigned Tokgv  
PriorityhighSeveritymajor 
Status closedResolutionfixed 
Product Version7.1.0 
Target Version7.3.0Fixed in Version7.3.0 
Summary0028987: Visualization, SelectMgr_SelectableObject - move out iterator from object
DescriptionSelectMgr_SelectableObject provides access to the list of selections implementing an iterator interface (::Init(), ::More(), ::Next()).

Apart from awkwardness of this API, using it is dangerous due to possible nested iterator initialization leading to undefined behavior.

For instance, two methods SelectMgr_SelectionManager::Update() call one each other in nested loops using the same object for iteration.

Therefore, it is proposed using external Iterator objects and deprecation of existing embedded Iterator API within SelectMgr_SelectableObject.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot required

Relationships

parent of 0029779 closedabv Open CASCADE Visualization, SelectMgr_SelectableObject - sensitivity change for object not activated in given mode leads to crash 
parent of 0030972 closedbugmaster Open CASCADE Visualization - remove deprecated iterators embedded into TKV3d containers 
related to 0029367 closedapn Community Visualization - simplify interface of V3d_View and V3d_Viewer 

Activities

git

2017-09-10 21:25

administrator   ~0070411

Branch CR28987 has been created by kgv.

SHA-1: af2f92e5ead0441812f7124e2c3d25b051202518


Detailed log of new commits:

Author: kgv
Date: Sun Sep 10 21:24:56 2017 +0300

    0028987: Visualization, SelectMgr_SelectableObject - move out iterator from object

Author: kgv
Date: Thu Sep 7 18:29:13 2017 +0300

    0022048: Visualization, AIS_InteractiveContext - single object selection should always clear multiple selection
    
    AIS_InteractiveContext::Select() now clears multiple selection when selecting a single object.

Author: kgv
Date: Wed Sep 6 22:04:25 2017 +0300

    0029086: Visualization, SelectMgr_ViewerSelector - drop Owners detected only by part of Entities within Box selection

git

2017-09-10 21:39

administrator   ~0070412

Branch CR28987 has been updated forcibly by kgv.

SHA-1: 8ecac05f65036ab90ba5b7bd8b333c40e45e9fc1

git

2017-09-10 22:24

administrator   ~0070413

Branch CR28987 has been updated forcibly by kgv.

SHA-1: cde0e5bd1445e06ac0924536d7a540f8e99f1a55

git

2017-09-10 22:30

administrator   ~0070414

Branch CR28987 has been updated forcibly by kgv.

SHA-1: 54bec191a4cd4fb9d0f9bf7c866347a1813554b9

git

2017-09-10 22:52

administrator   ~0070415

Branch CR28987 has been updated forcibly by kgv.

SHA-1: 6784fbdd253bfac004230e0416e2106500ef5ce5

kgv

2017-09-10 22:52

developer   ~0070416

Patch is ready for review.

san

2017-09-21 16:27

developer   ~0070740

Branch CR28987 reviewed without remarks, ready for testing.

git

2017-09-21 22:18

administrator   ~0070768

Branch CR28987 has been updated forcibly by inv.

SHA-1: f03e097231fb209b29958abf4b841e861afea9aa

bugmaster

2017-09-22 12:41

administrator   ~0070779

Combination -
OCCT branch :CR28987 SHA-1: f03e097231fb209b29958abf4b841e861afea9aa
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.

http://jenkins-test-10.nnov.opencascade.com/view/CR28987-master

Number of compiler warnings in Open CASCADE on Linux and Windows platforms:

A lot of new compiler warnings
http://jenkins-test-10.nnov.opencascade.com/view/CR28987-master/view/OCCT%20compile/job/CR28987-master-OCCT-Debian70-64-opt-compile/1/warnings21Result/

http://jenkins-test-10.nnov.opencascade.com/view/CR28987-master/view/OCCT%20compile/job/CR28987-master-OCCT-Windows-64-VC10-opt-compile/1/warnings40Result/



Regressions/Differences/Improvements:
Image differences :

A lot of regressions and image differences

http://occt-tests/CR28987-master-OCCT/Debian70-64/diff_summary.html
http://occt-tests/CR28987-master-OCCT/Windows-64-VC10/diff_summary.html

CPU differences:
No differences that require special attention

Memory differences :
No differences that require special attention

bugmaster

2017-09-22 13:27

administrator   ~0070785

One more:
Problems with java and csharp samples

http://jenkins-test-10.nnov.opencascade.com/view/CR28987-master/view/SAMPLES/job/CR28987-master-Products-Windows-64-VC10-sample-csharp/

http://jenkins-test-10.nnov.opencascade.com/view/CR28987-master/view/SAMPLES/job/CR28987-master-Products-Windows-64-VC10-sample-java/

git

2017-09-26 16:02

administrator   ~0070879

Branch CR28987 has been updated forcibly by kgv.

SHA-1: b37d72ea5aa0ff99840050a858c8d87676dee4d9

git

2017-09-26 16:32

administrator   ~0070881

Branch CR28987_1 has been created by kgv.

SHA-1: 27c17b7445bdbc0c0fcddf88499c156a3ce43db4


Detailed log of new commits:

Author: kgv
Date: Sun Sep 10 21:24:56 2017 +0300

    0028987: Visualization, SelectMgr_SelectableObject - move out iterator from object
    
    Added method SelectMgr_SelectableObject::Selections() and depreacted methods
    Init(), More(), Next() and CurrentSelection().
    
    Added method SelectMgr_Selection::Entities() and depreacted methods
    Init(), More(), Next() and Sensitivity().
    
    SelectMgr_SelectableObject::myAssemblyOwner has been moved to AIS_MultipleConnectedInteractive.
    SelectMgr_SelectableObject::Selection() now returns NULL handle for not found selection.
    SelectMgr_SelectableObject::HasSelection() is no more virtual and just retuns !Selection().IsNull().
    
    SelectMgr_SelectionManager::mySelectors map is now declared using proper
    key type Handle(SelectMgr_ViewerSelector) instead of Handle(Standard_Transient).

git

2017-09-26 17:09

administrator   ~0070884

Branch CR28987_1 has been updated forcibly by kgv.

SHA-1: 81ec1ce12eaf175616389c5fc62e2ebfc6c93128

kgv

2017-09-26 20:14

developer   ~0070898

Patch has been updated.

http://jenkins-test-10.nnov.opencascade.com/view/CR28987_1-CR28987_1-KGV/

bugmaster

2017-09-27 12:15

administrator   ~0070914

Last edited: 2017-09-28 10:49

Combination -
OCCT branch : CR28987_1 SHA-1: d877eebb11b8353c38ebbc83c0a7ec468500f76e
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.

http://jenkins-test-10.nnov.opencascade.com/view/CR28987_1-CR28987_1-KGV/

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
No differences that require special attention

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2017-09-29 17:11

administrator   ~0071010

Branch CR28987 has been deleted by kgv.

SHA-1: b37d72ea5aa0ff99840050a858c8d87676dee4d9

git

2017-09-29 17:11

administrator   ~0071011

Branch CR28987_1 has been deleted by kgv.

SHA-1: 81ec1ce12eaf175616389c5fc62e2ebfc6c93128

git

2018-05-16 14:21

administrator   ~0075995

Branch CR28987_2 has been created by nds.

SHA-1: bb937419523873e695e0ccba116275d887d78067


Detailed log of new commits:

Author: nds
Date: Wed May 16 14:21:06 2018 +0300

    0028987: Visualization, SelectMgr_SelectableObject - move out iterator from object
    
    # trivial misprint fix

git

2018-06-23 13:56

administrator   ~0076893

Branch CR28987_2 has been deleted by kgv.

SHA-1: bb937419523873e695e0ccba116275d887d78067

Related Changesets

occt: master b5cce1ab

2017-09-10 18:24:56

kgv

Details Diff
0028987: Visualization, SelectMgr_SelectableObject - move out iterator from object

Added method SelectMgr_SelectableObject::Selections() and depreacted methods
Init(), More(), Next() and CurrentSelection().

Added method SelectMgr_Selection::Entities() and depreacted methods
Init(), More(), Next() and Sensitivity().

SelectMgr_SelectableObject::myAssemblyOwner has been moved to AIS_MultipleConnectedInteractive.
SelectMgr_SelectableObject::Selection() now returns NULL handle for not found selection.
SelectMgr_SelectableObject::HasSelection() is no more virtual and just retuns !Selection().IsNull().

SelectMgr_SelectionManager::mySelectors map is now declared using proper
key type Handle(SelectMgr_ViewerSelector) instead of Handle(Standard_Transient).
Affected Issues
0028987
mod - src/AIS/AIS_ColoredShape.cxx Diff File
mod - src/AIS/AIS_ConnectedInteractive.cxx Diff File
mod - src/AIS/AIS_InteractiveContext.cxx Diff File
mod - src/AIS/AIS_InteractiveContext_1.cxx Diff File
mod - src/AIS/AIS_LocalContext.cxx Diff File
mod - src/AIS/AIS_LocalContext_1.cxx Diff File
mod - src/AIS/AIS_MultipleConnectedInteractive.cxx Diff File
mod - src/AIS/AIS_MultipleConnectedInteractive.hxx Diff File
mod - src/AIS/AIS_Selection.cxx Diff File
mod - src/IVtkOCC/IVtkOCC_ViewerSelector.cxx Diff File
mod - src/PrsMgr/PrsMgr_PresentableObject.hxx Diff File
mod - src/QABugs/QABugs_9.cxx Diff File
mod - src/SelectMgr/FILES Diff File
mod - src/SelectMgr/SelectMgr_SelectableObject.cxx Diff File
mod - src/SelectMgr/SelectMgr_SelectableObject.hxx Diff File
mod - src/SelectMgr/SelectMgr_Selection.cxx Diff File
mod - src/SelectMgr/SelectMgr_Selection.hxx Diff File
rm - src/SelectMgr/SelectMgr_Selection.lxx Diff File
mod - src/SelectMgr/SelectMgr_SelectionManager.cxx Diff File
mod - src/SelectMgr/SelectMgr_SelectionManager.hxx Diff File
mod - src/SelectMgr/SelectMgr_SensitiveEntitySet.cxx Diff File
mod - src/SelectMgr/SelectMgr_ViewerSelector.cxx Diff File
mod - src/StdSelect/StdSelect_BRepSelectionTool.cxx Diff File
mod - src/StdSelect/StdSelect_ViewerSelector3d.cxx Diff File
mod - tests/bugs/vis/bug24966 Diff File
mod - tests/bugs/vis/bug24996 Diff File
mod - tools/VInspector/VInspector_ItemEntityOwner.cxx Diff File
mod - tools/VInspector/VInspector_ItemPresentableObject.cxx Diff File
mod - tools/VInspector/VInspector_ItemSelection.cxx Diff File
mod - tools/VInspector/VInspector_ItemSensitiveEntity.cxx Diff File
mod - tools/VInspector/VInspector_Tools.cxx Diff File

Issue History

Date Modified Username Field Change
2017-08-10 16:03 kgv New Issue
2017-08-10 16:03 kgv Assigned To => kgv
2017-08-10 16:03 kgv Priority normal => high
2017-08-10 16:03 kgv Severity minor => major
2017-09-10 21:25 git Note Added: 0070411
2017-09-10 21:39 git Note Added: 0070412
2017-09-10 22:24 git Note Added: 0070413
2017-09-10 22:30 git Note Added: 0070414
2017-09-10 22:52 git Note Added: 0070415
2017-09-10 22:52 kgv Note Added: 0070416
2017-09-10 22:52 kgv Assigned To kgv => san
2017-09-10 22:52 kgv Status new => resolved
2017-09-21 16:27 san Note Added: 0070740
2017-09-21 16:27 san Assigned To san => bugmaster
2017-09-21 16:27 san Status resolved => reviewed
2017-09-21 22:18 git Note Added: 0070768
2017-09-22 12:41 bugmaster Note Added: 0070779
2017-09-22 12:41 bugmaster Assigned To bugmaster => kgv
2017-09-22 12:41 bugmaster Status reviewed => assigned
2017-09-22 13:27 bugmaster Note Added: 0070785
2017-09-26 16:02 git Note Added: 0070879
2017-09-26 16:32 git Note Added: 0070881
2017-09-26 17:09 git Note Added: 0070884
2017-09-26 20:14 kgv Note Added: 0070898
2017-09-26 20:14 kgv Assigned To kgv => bugmaster
2017-09-26 20:14 kgv Status assigned => resolved
2017-09-26 20:14 kgv Status resolved => reviewed
2017-09-27 12:15 bugmaster Note Added: 0070914
2017-09-27 12:15 bugmaster Status reviewed => tested
2017-09-27 12:17 bugmaster Note Edited: 0070914
2017-09-27 12:18 bugmaster Test case number => Not required
2017-09-28 10:49 bugmaster Note Edited: 0070914
2017-09-29 13:26 kgv Changeset attached => occt master b5cce1ab
2017-09-29 13:26 kgv Assigned To bugmaster => kgv
2017-09-29 13:26 kgv Status tested => verified
2017-09-29 13:26 kgv Resolution open => fixed
2017-09-29 17:11 git Note Added: 0071010
2017-09-29 17:11 git Note Added: 0071011
2017-12-05 08:33 kgv Relationship added related to 0029367
2018-02-20 12:58 aiv Target Version 7.4.0 => 7.3.0
2018-05-16 14:21 git Note Added: 0075995
2018-05-16 16:00 nds Relationship added related to 0029779
2018-05-16 18:49 kgv Relationship replaced parent of 0029779
2018-06-23 13:56 git Note Added: 0076893
2018-06-29 21:13 aiv Fixed in Version => 7.3.0
2018-06-29 21:18 aiv Status verified => closed
2019-09-17 10:24 kgv Relationship added parent of 0030972