OCCT 6.8.0: possible bug


in file AIS_LocalContext_1.cxx, at line 929

void AIS_LocalContext::ClearOutdatedSelection (const Handle(AIS_InteractiveObject)& theIO,
const Standard_Boolean toClearDeactivated)
// 1. Collect selectable entities
SelectMgr_IndexedMapOfOwner aValidOwners;

const TColStd_ListOfInteger& aModes = SelectionModes (theIO); // >

// ... more code follows


The call of SelectionModes(theIO) at the line marked above causes an exception to be thrown if
is not present in AIS_LocalContext::myActiveObjects map.

This isn't surprising since no check is performed in the calling function (AIS_LocalContext.cxx, line 894):

const TColStd_ListOfInteger& AIS_LocalContext::SelectionModes(const Handle(AIS_InteractiveObject)& anObject) const
return myActiveObjects(anObject)->SelectionModes();

I detected this behavior by calling TPrsStd_AISPresentation::Erase(Standard_True). It worked in OCCT 6.7.0.

Is this the intended behavior or is it a bug.


Valeriu Catina

Vico's picture