MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030784Open CASCADE[OCCT] OCCT:Visualizationpublic2019-06-17 13:122019-09-19 09:42
Reporternds 
Assigned Tonds 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0*Fixed in Version 
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.

Example of crash, cased by it:
In AIS_ViewCube implementation (0028954) there is AIS_ViewCubeFlat not displayed in context, but there is an owner connected to it and listening selection.

The place, where the crash happens if we call it for this owner:
void AIS_InteractiveContext::AddOrRemoveSelected (const Handle(SelectMgr_EntityOwner)& theOwner, ...
{
...
  const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
...
  Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anObj);
...
}
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
(0085088)
git (administrator)
2019-06-17 13:27

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
(0085089)
kgv (developer)
2019-06-17 13:33

     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()
(0085991)
git (administrator)
2019-08-02 15:35

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)

- 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*


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker