View Issue Details

IDProjectCategoryView StatusLast Update
0023938CommunityOCCT:Data Exchangepublic2014-01-22 11:05
Reportergdumonteil Assigned Toika 
PriorityhighSeveritycrash 
Status closedResolutionfixed 
Platformx64OSWindows 
Product Version6.6.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0023938: Crash at StepToTopoDS_TranslateEdgeLoop::Init() &StepToTopoDS_TranslateEdge::Init()
DescriptionWhen loading a STEP file from our client, we've got a crash at "StepToTopoDS_TranslateEdgeLoop::Init()".

First, we're reading a STEP file with STEPCAFControl_Reader::ReadFile() method.
Then, we're transfer it with the "Transfer" method.

The crash happen during the transfer procedure, at StepToTopoDS_TranslateEdgeLoop::Init(), especialy at the IsKind test: "if (C->IsKind(STANDARD_TYPE(StepGeom_SurfaceCurve)))", line 294.
In our case, C seems to be NULL.

Just after at line 311, there is a nullity check of C: "if (!C.IsNull())".

To correct the crash, we add a nullity check before the call of the IsKind method:

if (!C.IsNull()) {
  if (C->IsKind(STANDARD_TYPE(StepGeom_SurfaceCurve))) {

With this correction, we got another crash at "StepToTopoDS_TranslateEdge::Init()", here at line 311, when testing the kind of C: "if ( C->IsKind(STANDARD_TYPE(StepGeom_Pcurve)))"

We correct here also by cheking the nullity of C before calling the IsKind function:

if (!C.IsNull()) {
  if ( C->IsKind(STANDARD_TYPE(StepGeom_Pcurve))) {

With this, we're finally able to fully transfer the STEP file.


We didn't go inside OCCT to find why the EdgeGeometry of a specific StepShape_EdgeCurve is NULL. Maybe, somebody of the OCCT dev team can find a better way to correct this.
Steps To ReproduceWe can't share the STEP file from our client. The STEP file was exported from SolidWorks 2011.
TagsNo tags attached.
Test case numberNot needed

Relationships

parent of 0024517 closedbugmaster Crash at StepToTopoDS_TranslateEdge::Init() 

Activities

ika

2013-05-14 14:31

developer   ~0024377

Necessary checks were added.

Branch CR23938 is ready to be reviewed.

Dear GKA,
Please review.

gka

2013-05-14 14:56

developer   ~0024378

Branch CR23938 is ready to be tested.

mkv

2013-05-15 16:25

tester   ~0024402

Dear BugMaster,

Branch CR23938 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 8c5342fb07ed2dacbc0da71ae4ac7f5e17905c54

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 11 (11 on master)

products component :
Linux: 0 (0 on master)
Windows: 64 (64 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 365994864 / 366044616
Total CPU difference: 44238.650000001195 / 43849.82000000105

Testing on Windows:
Total MEMORY difference: 419426308 / 421413388
Total CPU difference: 38636.328125 / 32294.609375

There are not serious differences in images found by testdiff.

Related Changesets

occt: master 2a141d40

2013-05-14 10:29:28

ika

Details Diff
0023938: Crash at StepToTopoDS_TranslateEdgeLoop::Init() &StepToTopoDS_TranslateEdge::Init()
necessary checks were added
Affected Issues
0023938
mod - src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx Diff File

Issue History

Date Modified Username Field Change
2013-04-26 17:24 gdumonteil New Issue
2013-04-26 17:24 gdumonteil Assigned To => gka
2013-05-08 15:28 gka Assigned To gka => ika
2013-05-08 15:28 gka Status new => assigned
2013-05-14 14:31 ika Note Added: 0024377
2013-05-14 14:31 ika Assigned To ika => gka
2013-05-14 14:31 ika Status assigned => resolved
2013-05-14 14:56 gka Note Added: 0024378
2013-05-14 14:56 gka Status resolved => reviewed
2013-05-15 16:25 mkv Note Added: 0024402
2013-05-15 16:25 mkv Test case number => Not needed
2013-05-15 16:25 mkv Assigned To gka => bugmaster
2013-05-15 16:25 mkv Status reviewed => tested
2013-05-20 10:56 ika Changeset attached => occt master 2a141d40
2013-05-20 10:56 ika Assigned To bugmaster => ika
2013-05-20 10:56 ika Status tested => verified
2013-05-20 10:56 ika Resolution open => fixed
2013-05-20 16:55 bugmaster Target Version => 6.7.0
2013-12-19 13:53 bugmaster Status verified => closed
2013-12-19 13:55 bugmaster Fixed in Version => 6.7.0
2014-01-22 11:05 mkv Relationship added parent of 0024517