View Issue Details

IDProjectCategoryView StatusLast Update
0030784Open CASCADEOCCT:Visualizationpublic2020-12-02 17:11
Reporternds Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
Summary0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
DescriptionIn some methods of interactive context global status of interactive object is obtained from myObjects without a check if the object is registered inside.
TagsNo tags attached.
Test case numberNot required

Activities

git

2019-06-17 13:27

administrator   ~0085088

Branch CR30784 has been created by nds.

SHA-1: a52908d650245f4930cf42fafe545e15c10f3aa6


Detailed log of new commits:

Author: nds
Date: Tue May 14 14:31:43 2019 +0300

    0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
    
    # todo - add similar check for other places where needed

kgv

2019-06-17 13:33

developer   ~0085089

     const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
+    if (!myObjects.IsBound(anObj))
+      return;
     const Standard_Boolean isGlobal = anObj->GlobalSelOwner() == theOwner;
     Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anObj);

NCollection_DataMap::ChangeSeek()

git

2019-08-02 15:35

administrator   ~0085991

Branch CR30784_1 has been created by nds.

SHA-1: e696956fd74e0b310ba4fa4f0e341741e43e1089


Detailed log of new commits:

Author: nds
Date: Tue May 14 14:31:43 2019 +0300

    0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
    
    # todo - add similar check for other places where needed
    
    (cherry picked from commit a52908d650245f4930cf42fafe545e15c10f3aa6)

git

2020-09-04 19:06

administrator   ~0094022

Branch CR30784_2 has been created by nds.

SHA-1: 696a9488960cc4ce4892a45190cf179f04829ac9


Detailed log of new commits:

Author: nds
Date: Fri Sep 4 19:08:29 2020 +0300

    0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using

git

2020-09-06 06:48

administrator   ~0094155

Branch CR30784_2 has been updated forcibly by nds.

SHA-1: b4d5089479411661857948ce30b7ff16ce4f4bea

nds

2020-09-06 11:29

developer   ~0094163

Dear Kirill,

could you please review patch.

Thank you a lot, Natalia

kgv

2020-09-06 11:40

developer   ~0094164

Last edited: 2020-09-06 11:41

+      if (aStatusPtr)
+        (*aStatusPtr)->SetHilightStatus (Standard_False);
...
+    if (!aStatusPtr)
+      return;

Please add brackets.

@@ -172,20 +172,16 @@ void AIS_InteractiveContext::unhighlightOwners (const AIS_NListOfEntityOwner& th
   {
-    Handle(AIS_GlobalStatus) aStatus;
-    if (!myObjects.Find (anInteractive, aStatus))
-    {
-      continue;
-    }
+    Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (anInteractive);

This change contradicts to bug description - it allows handling objects not registered in Interactive Context.
Is there real necessity / valid use cases for this behavior?

+      Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (aSelectable);
+      if (aStatusPtr)
+        (*aStatusPtr)->SetHilightStatus (Standard_False);

Tip:
> if (Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (aSelectable))
> {
> (*aStatusPtr)->SetHilightStatus (false);
> }

git

2020-09-07 22:58

administrator   ~0094219

Branch CR30784_2 has been updated by nds.

SHA-1: 6bdb7496a7e5d588396d30fab54d49c1d0589f7b


Detailed log of new commits:

Author: nds
Date: Fri Sep 4 19:08:29 2020 +0300

    remarks correction

git

2020-09-07 22:58

administrator   ~0094220

Branch CR30784_3 has been created by nds.

SHA-1: c15f4cb8a0457a01df0877a303ec31f3eb4edba0


Detailed log of new commits:

Author: nds
Date: Mon Sep 7 23:00:50 2020 +0300

    0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using

git

2020-09-07 23:35

administrator   ~0094226

Branch CR30784_3 has been updated forcibly by nds.

SHA-1: 271b13db601ae47018958775f8204fa843fb2b03

nds

2020-09-08 08:21

developer   ~0094229

Dear Kirill,

corrected, could you please review again.
Jenkins job is: http://jenkins-test-12.nnov.opencascade.com/view/CR30784-master-nds/

Thank you a lot, Natalia

kgv

2020-09-08 10:41

developer   ~0094233

+    if (!aStatusPtr)
+      continue;

Please add brackets.

git

2020-09-08 10:51

administrator   ~0094235

Branch CR30784_3 has been updated forcibly by nds.

SHA-1: 020ddd43bbaecffb3ac8a675787844108e2b90d4

nds

2020-09-08 10:52

developer   ~0094236

corrected, thank you.

nds

2020-09-09 19:38

developer   ~0094317

OCCT: CR30784_3,
PRODUCTS: NOT

bugmaster

2020-09-13 11:04

administrator   ~0094535

Combination -
OCCT branch : IR-2020-09-11
master SHA - d1b25684e9402d995dafec22fb98f83957d5fb76
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-09-11 SHA - a7e55a291cf6642cb4af945a999deeeb5f91272a
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17333.360000000142 / 17325.800000000123 [+0.04%]
Products
Total CPU difference: 12056.720000000096 / 12079.64000000011 [-0.19%]
Windows-64-VC14:
OCCT
Total CPU difference: 18817.921875 / 18792.46875 [+0.14%]
Products
Total CPU difference: 13294.09375 / 13274.75 [+0.15%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-09-13 11:46

administrator   ~0094590

Branch CR30784_3 has been deleted by inv.

SHA-1: 020ddd43bbaecffb3ac8a675787844108e2b90d4

git

2020-09-13 11:46

administrator   ~0094594

Branch CR30784_2 has been deleted by inv.

SHA-1: 6bdb7496a7e5d588396d30fab54d49c1d0589f7b

git

2020-09-13 11:48

administrator   ~0094627

Branch CR30784_1 has been deleted by inv.

SHA-1: e696956fd74e0b310ba4fa4f0e341741e43e1089

git

2020-09-13 11:48

administrator   ~0094633

Branch CR30784 has been deleted by inv.

SHA-1: a52908d650245f4930cf42fafe545e15c10f3aa6

Related Changesets

occt: master b19cde43

2020-09-07 20:00:50

nds


Committer: bugmaster Details Diff
0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using Affected Issues
0030784
mod - src/AIS/AIS_InteractiveContext_1.cxx Diff File

Issue History

Date Modified Username Field Change
2019-06-17 13:12 nds New Issue
2019-06-17 13:12 nds Assigned To => kgv
2019-06-17 13:27 git Note Added: 0085088
2019-06-17 13:28 nds Assigned To kgv => nds
2019-06-17 13:33 kgv Note Added: 0085089
2019-08-02 15:35 git Note Added: 0085991
2019-09-19 09:42 nds Target Version 7.4.0 => 7.5.0
2020-09-04 19:06 git Note Added: 0094022
2020-09-05 09:19 nds Description Updated
2020-09-06 06:48 git Note Added: 0094155
2020-09-06 11:29 nds Note Added: 0094163
2020-09-06 11:29 nds Assigned To nds => kgv
2020-09-06 11:29 nds Status new => resolved
2020-09-06 11:40 kgv Note Added: 0094164
2020-09-06 11:40 kgv Assigned To kgv => nds
2020-09-06 11:40 kgv Status resolved => assigned
2020-09-06 11:41 kgv Note Edited: 0094164
2020-09-07 22:58 git Note Added: 0094219
2020-09-07 22:58 git Note Added: 0094220
2020-09-07 23:35 git Note Added: 0094226
2020-09-08 08:21 nds Note Added: 0094229
2020-09-08 08:21 nds Assigned To nds => kgv
2020-09-08 08:21 nds Status assigned => resolved
2020-09-08 10:41 kgv Note Added: 0094233
2020-09-08 10:42 kgv Assigned To kgv => bugmaster
2020-09-08 10:42 kgv Status resolved => reviewed
2020-09-08 10:51 git Note Added: 0094235
2020-09-08 10:52 nds Note Added: 0094236
2020-09-09 19:38 nds Note Added: 0094317
2020-09-13 11:04 bugmaster Note Added: 0094535
2020-09-13 11:04 bugmaster Status reviewed => tested
2020-09-13 11:12 bugmaster Test case number => Not required
2020-09-13 11:24 bugmaster Changeset attached => occt master b19cde43
2020-09-13 11:24 bugmaster Status tested => verified
2020-09-13 11:24 bugmaster Resolution open => fixed
2020-09-13 11:46 git Note Added: 0094590
2020-09-13 11:46 git Note Added: 0094594
2020-09-13 11:48 git Note Added: 0094627
2020-09-13 11:48 git Note Added: 0094633
2020-12-02 16:40 emo Fixed in Version => 7.5.0
2020-12-02 17:11 emo Status verified => closed