MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029979Community[OCCT] OCCT:Data Exchangepublic2018-07-23 18:112019-03-20 08:31
Reporterborm 
Assigned Togka 
PrioritynormalSeveritycrash 
StatusassignedResolutionopen 
PlatformWindowsOSVC++ 2015OS Version10
Product Version[OCCT] 7.2.0 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0029979: Data Exchange - Crash by reading STEP file
DescriptionHi, the OCCT crashes by reading the STEP file:

The crash callstack is:
>	TKSTEPBase.dll!StepShape_EdgeCurve::EdgeGeometry() Line 47	C++
     TKSTEP.dll!StepToTopoDS_TranslateEdgeLoop::Init(const opencascade::handle<StepShape_FaceBound> 
& FaceBound, const TopoDS_Face & Face, const opencascade::handle<Geom_Surface> & GeomSurf, 
const opencascade::handle<StepGeom_Surface> & StepSurf, const bool sameSense, StepToTopoDS_Tool 
& aTool, StepToTopoDS_NMTool & NMTool) Line 296	C++
     TKSTEP.dll!StepToTopoDS_TranslateFace::Init(const opencascade::handle<StepShape_FaceSurface> 
& FS, StepToTopoDS_Tool & aTool, StepToTopoDS_NMTool & NMTool) Line 330	C++
     TKSTEP.dll!StepToTopoDS_TranslateShell::Init(const opencascade::handle<StepShape_ConnectedFaceSet> 
& CFS, StepToTopoDS_Tool & aTool, StepToTopoDS_NMTool & NMTool) Line 93	C++
     TKSTEP.dll!StepToTopoDS_Builder::Init(const opencascade::handle<StepShape_ManifoldSolidBrep> 
& aManifoldSolid, const opencascade::handle<Transfer_TransientProcess> & TP) Line 210	C++
     
TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepGeom_GeometricRepresentationItem> 
& start, const opencascade::handle<Transfer_TransientProcess> & TP, const bool isManifold) 
Line 1229	C++
     TKSTEP.dll!STEPControl_ActorRead::TransferShape(const opencascade::handle<Standard_Transient> 
& start, const opencascade::handle<Transfer_TransientProcess> & TP, const bool isManifold) 
Line 1499	C++
     TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepShape_ShapeRepresentation> 
& sr, const opencascade::handle<Transfer_TransientProcess> & TP, bool & isBound) Line 
817	C++
     TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepRepr_ShapeRepresentationRelationship> 
& und, const opencascade::handle<Transfer_TransientProcess> & TP, const int nbrep) Line 
1020	C++
     TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepBasic_ProductDefinition> 
& PD, const opencascade::handle<Transfer_TransientProcess> & TP) Line 628	C++
     TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepRepr_NextAssemblyUsageOccurrence> 
& NAUO, const opencascade::handle<Transfer_TransientProcess> & TP) Line 717	C++
     TKSTEP.dll!STEPControl_ActorRead::TransferEntity(const opencascade::handle<StepBasic_ProductDefinition> 
& PD, const opencascade::handle<Transfer_TransientProcess> & TP) Line 549	C++
     TKSTEP.dll!STEPControl_ActorRead::TransferShape(const opencascade::handle<Standard_Transient> 
& start, const opencascade::handle<Transfer_TransientProcess> & TP, const bool isManifold) 
Line 1460	C++
     TKSTEP.dll!STEPControl_ActorRead::Transfer(const opencascade::handle<Standard_Transient> & 
start, const opencascade::handle<Transfer_TransientProcess> & TP) Line 300	C++
     TKXSBase.dll!Transfer_ActorOfTransientProcess::Transferring(const opencascade::handle<Standard_Transient> 
& ent, const opencascade::handle<Transfer_ProcessForTransient> & TP) Line 40	C++
     TKXSBase.dll!Transfer_ProcessForTransient::TransferProduct(const opencascade::handle<Standard_Transient> 
& start) Line 1160	C++
     TKXSBase.dll!Transfer_ProcessForTransient::Transferring(const opencascade::handle<Standard_Transient> 
& start) Line 1067	C++
     TKXSBase.dll!Transfer_ProcessForTransient::Transfer(const opencascade::handle<Standard_Transient> 
& start) Line 1189	C++
     TKXSBase.dll!Transfer_TransferOutput::Transfer(const opencascade::handle<Standard_Transient> 
& obj) Line 79	C++
     TKXSBase.dll!XSControl_TransferReader::TransferOne(const opencascade::handle<Standard_Transient> 
& ent, const bool rec) Line 816	C++
     TKXSBase.dll!XSControl_Reader::TransferEntity(const opencascade::handle<Standard_Transient> 
& start) Line 242	C++
     TKXSBase.dll!XSControl_Reader::TransferOneRoot(const int num) Line 216	C++
     TKXDESTEP.dll!STEPCAFControl_Reader::Transfer(STEPControl_Reader & reader, const int nroot, 
opencascade::handle<TDocStd_Document> & doc, NCollection_Sequence<TDF_Label> & Lseq, 
const bool asOne) Line 522	C++
     TKXDESTEP.dll!STEPCAFControl_Reader::Transfer(opencascade::handle<TDocStd_Document> & 
doc) Line 404	C++
     TKXDESTEP.dll!STEPCAFControl_Reader::Perform(const char * const filename, opencascade::handle<TDocStd_Document> 
& doc) Line 418	C++
Steps To ReproduceTest case bugs/step/bug26451.

The following code produces a crash:

Handle(TDocStd_Document) pOcctDoc;
Handle(XCAFApp_Application) pOcctApp = XCAFApp_Application::GetApplication();
pOcctApp->NewDocument("MDTV-XCAF", pOcctDoc);

STEPCAFControl_Reader stepReader;
stepReader.SetColorMode(Standard_True);
stepReader.SetNameMode(Standard_True);
const auto result = stepReader.Perform(fileName, pOcctDoc);
TagsNo tags attached.
Test case number
Attached Files7z file icon Firetherm_12.7z (9,659,229 bytes) 2019-03-06 11:55

- Relationships
related to 0030541newabv Open CASCADE Draw Harness - impossible disabling signals 

-  Notes
(0082542)
kgv (developer)
2019-03-03 00:04

Referred file is inaccessible.
(0082701)
borm (reporter)
2019-03-05 18:59

Hi, the link works again. Please download the file as the link expires on 31.3.2019 again. Thanks.
(0082706)
kgv (developer)
2019-03-05 23:05
edited on: 2019-03-05 23:06

I'm unable reproducing the crash with the following script:
pload ALL
ReadStep D "Firetherm 12.STEP"
XShow D
vfit



Are there any extra input requisites?
Or maybe wrong OCCT version is specified?

(0082723)
borm (reporter)
2019-03-06 11:36

I'm not aware of the script code so I can comment just on the C++ code. The STEPCAFControl_Reader has to be used and the color and name mode must be set to true to reproduce the crash. I can still reproduce it with the OCCT 7.2.0 and I get the same crash callstack.
(0082724)
kgv (developer)
2019-03-06 11:45

OK, your application doesn't setup signals.

void StepToTopoDS_TranslateEdgeLoop::Init(
...
  for (j=1; j<=NbEdge; j++ ) {
    OrEdge1  = EL->EdgeListValue(j);
    StepEdge = OrEdge1->EdgeElement();
//    if(j>1 && StepEdge == StepEdge1) theSame++; //gka 15.12.98
    StepEdge1 = StepEdge;                         //
    Handle(StepShape_EdgeCurve) EC = Handle(StepShape_EdgeCurve)::DownCast(StepEdge);
    Handle(StepGeom_Curve) C = EC->EdgeGeometry();

EC becomes NULL here, because second edge in the loop is of type StepShape_OrientedEdge, not StepShape_EdgeCurve.
(0082725)
borm (reporter)
2019-03-06 11:56

Can you please elaborate more on your comment? What does it mean that the application doesn't setup signal? What we need to do?

Still even if we don't setup the signals the code should not crash.
(0083122)
kgv (developer)
2019-03-20 08:31

Existing test case bugs/step/bug26451 can be used for reproducing the issue.

- Issue History
Date Modified Username Field Change
2018-07-23 18:11 borm New Issue
2018-07-23 18:11 borm Assigned To => gka
2019-03-03 00:04 kgv Note Added: 0082542
2019-03-03 00:04 kgv Assigned To gka => borm
2019-03-03 00:04 kgv Status new => feedback
2019-03-05 18:59 borm Note Added: 0082701
2019-03-05 23:05 kgv Note Added: 0082706
2019-03-05 23:06 kgv Note Edited: 0082706 View Revisions
2019-03-06 10:25 kgv Resolution open => unable to reproduce
2019-03-06 11:36 borm Note Added: 0082723
2019-03-06 11:45 kgv Note Added: 0082724
2019-03-06 11:45 kgv Assigned To borm => gka
2019-03-06 11:45 kgv Status feedback => assigned
2019-03-06 11:45 kgv Resolution unable to reproduce => open
2019-03-06 11:45 kgv Target Version => 7.5.0
2019-03-06 11:52 kgv Relationship added related to 0030541
2019-03-06 11:53 kgv Summary Crash by reading STEP file => Data Exchange - Crash by reading STEP file
2019-03-06 11:55 kgv File Added: Firetherm_12.7z
2019-03-06 11:56 kgv Description Updated View Revisions
2019-03-06 11:56 kgv Steps to Reproduce Updated View Revisions
2019-03-06 11:56 borm Note Added: 0082725
2019-03-06 12:05 kgv Relationship added related to 0030533
2019-03-20 08:31 kgv Note Added: 0083122
2019-03-20 08:31 kgv Steps to Reproduce Updated View Revisions


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker