MantisBT - Community
View Issue Details
0025280Community[OCCT] OCCT:Data Exchangepublic2014-09-27 00:372020-10-28 09:39
nikiml 
abv 
normalcrash 
verifiedfixed 
WindowsVC++ 200864 bit
[OCCT] 6.7.1 
[OCCT] 7.5.0 
0025280: Data Exchange - Interface_BitMap::Init crashes
Interface_BitMap bm(0);
bm.Init(Standard_False);//crashes due to theflags.IsNull() being true


this code is called by:
Interface_CopyTool::Interface_CopyTool
  (const Handle(Interface_InterfaceModel)& amodel,
   const Interface_GeneralLib& lib)


when amodel is empty

called by:
StepData_StepModel::GetFromAnother
    (const Handle_Interface_InterfaceModel & other
    )


called by:
Interface_CopyTool::FillModel(const Handle_Interface_InterfaceModel & bmodel)


called by
IFSelect_ModelCopier::SendSelected
    (const char * const filename
    , const Interface_Graph & G
    , const Handle_IFSelect_WorkLibrary & WL
    , const Handle_Interface_Protocol & protocol
    , const Interface_EntityIterator & list)


called by
IFSelect_WorkSession::SendSelected
    (const char * const filename
    , const Handle_IFSelect_Selection & sel
    , const unsigned int computegraph)
Just Call IFSelect_WorkSession::SendSelected with valid model and selection, e.g

IFSelect_ReturnStatus stat = reader.ReadFile(attached_step_file_or_another_one_with_solids);
Handle_XSControl_WorkSession RWS = reader.WS();

Handle_IFSelect_SelectPointed sp = new IFSelect_SelectPointed;

Handle_Interface_InterfaceModel Model = RWS->Model();

Handle_Standard_Type tGRI = STANDARD_TYPE(StepShape_SolidModel);
Standard_Integer nb = Model->NbEntities();

for (Standard_Integer i = 1; i <= nb; i ++) {
  Handle_Standard_Transient enti = Model->Value(i);
  if ( ! enti->IsKind ( tGRI) ) continue;
  Handle_StepGeom_GeometricRepresentationItem gri = 
    Handle_StepGeom_GeometricRepresentationItem::DownCast(enti);

  sp->SetEntity(gri);
  break;
}


STEPControl_Writer writer(RWS, Standard_False);
writer.WS()->WriteFile(valid_outfile, sp);
No tags attached.
has duplicate 0030378verified bugmaster Open CASCADE Data Exchange - extract of subset of model entities fails (regression) 
7z l3.7z (9,629) 2014-09-27 00:37
https://tracker.dev.opencascade.org/
Issue History
2014-09-27 00:37nikimlNew Issue
2014-09-27 00:37nikimlAssigned To => gka
2014-09-27 00:37nikimlFile Added: l3.7z
2020-10-06 22:45abvRelationship addedhas duplicate 0030378
2020-10-06 22:46abvNote Added: 0095769
2020-10-06 22:46abvTarget Version => 7.5.0
2020-10-12 17:59kgvSummaryInterface_BitMap::Init crashes => Data Exchange - Interface_BitMap::Init crashes
2020-10-12 18:00kgvDescription Updatedbug_revision_view_page.php?rev_id=23741#r23741
2020-10-12 18:00kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23743#r23743
2020-10-13 09:35abvAssigned Togka => abv
2020-10-28 09:39abvNote Added: 0096327
2020-10-28 09:39abvStatusnew => resolved
2020-10-28 09:39abvResolutionopen => fixed
2020-10-28 09:39abvStatusresolved => reviewed
2020-10-28 09:39abvStatusreviewed => verified

Notes
(0095769)
abv   
2020-10-06 22:46   
Should be fixed with 0030378
(0096327)
abv   
2020-10-28 09:39   
Fixed on current master (tested using the code above)