View Issue Details

IDProjectCategoryView StatusLast Update
0032314CommunityOCCT:Data Exchangepublic2021-05-01 13:32
ReporterTilo Pfliegner Assigned Tobugmaster  
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version7.3.0 
Target Version7.6.0Fixed in Version7.6.0 
Summary0032314: Data Exchange - Reading corrupted STEP files crashes
DescriptionWhen importing a (deliberately) corrupted STEP file (see attached file), STEPControl_Reader crashes in TransferRoots().
Steps To Reproduce
pload XDE OCAF
dsetsignal unset
testreadstep corrupted.stp s
ReadStep D corrupted.stp


The following lines of code produce this error:
    STEPControl_Reader reader;
    IFSelect_ReturnStatus result =  reader.ReadFile("corrupted.stp"); // returns "Done" with a few errors
    reader.TransferRoots(); // crashes


The root cause seems to be dereferencing a nullptr (directionRatios) in this method:
Standard_Integer StepGeom_Direction::NbDirectionRatios () const
{
    return directionRatios->Length();
}


However, I am not sure, what the correct solution would look like. Probably it would be best to return IFSelect_RetError from ReadFile(...) in these cases.
TagsNo tags attached.
Test case numberNot required

Attached Files

  • corrupted.stp (241,634 bytes)

Activities

Tilo Pfliegner

2021-04-21 16:40

reporter  

corrupted.stp (241,634 bytes)

git

2021-04-28 11:57

administrator   ~0100635

Branch CR32314 has been created by dpasukhi.

SHA-1: 1fb9c4a00fb1655a4dba6fe2ce2464bacd504a66


Detailed log of new commits:

Author: dpasukhi
Date: Wed Apr 28 11:53:40 2021 +0300

    0032314: Data Exchange - Reading corrupted STEP files crashes
    
    RWAxis2Placement3d:
     fixed problem with reading parameters ( if sub-entity invalid, set has-parameter to false )

git

2021-04-28 14:31

administrator   ~0100639

Branch CR32314 has been updated forcibly by dpasukhi.

SHA-1: c5339c7f033d2283dfa39f7e741e26313944a53f

dpasukhi

2021-04-28 14:36

administrator   ~0100640

Deak ika,
please review CR32314

All test are ok, see
http://jenkins-test-08.nnov.opencascade.com/view/CR32314-master-dpasukhi/view/COMPARE/

ika

2021-04-28 14:46

developer   ~0100641

No remarks.

Dear bugmaster,
please integrate
OCCT - CR32314
Products - NOT

bugmaster

2021-05-01 12:27

administrator   ~0100719

Combination -
OCCT branch : master
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17839.600000000362 / 17844.450000000477 [-0.03%]
Products
Total CPU difference: 11562.480000000109 / 11558.800000000136 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19303.28125 / 19431.828125 [-0.66%]
Products
Total CPU difference: 12894.515625 / 12871.203125 [+0.18%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2021-05-01 13:32

administrator   ~0100738

Branch CR32314 has been deleted by inv.

SHA-1: c5339c7f033d2283dfa39f7e741e26313944a53f

Related Changesets

occt: master 36fbf05b

2021-04-28 08:53:40

dpasukhi


Committer: bugmaster Details Diff
0032314: Data Exchange - Reading corrupted STEP files crashes

RWAxis2Placement3d:
fixed problem with reading parameters ( if sub-entity invalid, set has-parameter to false )
Affected Issues
0032314
mod - src/RWStepGeom/RWStepGeom_RWAxis2Placement3d.cxx Diff File

Issue History

Date Modified Username Field Change
2021-04-21 16:40 Tilo Pfliegner New Issue
2021-04-21 16:40 Tilo Pfliegner Assigned To => gka
2021-04-21 16:40 Tilo Pfliegner File Added: corrupted.stp
2021-04-22 11:31 kgv Target Version => 7.6.0
2021-04-22 11:31 kgv Summary Reading corrupted STEP files crashes OpenCascade => Data Exchange - Reading corrupted STEP files crashes
2021-04-22 11:31 kgv Steps to Reproduce Updated
2021-04-22 11:35 kgv Assigned To gka => dpasukhi
2021-04-22 11:35 kgv Steps to Reproduce Updated
2021-04-28 11:57 git Note Added: 0100635
2021-04-28 14:31 git Note Added: 0100639
2021-04-28 14:31 dpasukhi Status new => assigned
2021-04-28 14:36 dpasukhi Note Added: 0100640
2021-04-28 14:36 dpasukhi Assigned To dpasukhi => ika
2021-04-28 14:36 dpasukhi Status assigned => resolved
2021-04-28 14:46 ika Note Added: 0100641
2021-04-28 14:46 ika Assigned To ika => bugmaster
2021-04-28 14:46 ika Status resolved => reviewed
2021-05-01 12:27 bugmaster Note Added: 0100719
2021-05-01 12:27 bugmaster Status reviewed => tested
2021-05-01 12:38 bugmaster Test case number => Not required
2021-05-01 12:44 bugmaster Changeset attached => occt master 36fbf05b
2021-05-01 12:44 bugmaster Status tested => verified
2021-05-01 12:44 bugmaster Resolution open => fixed
2021-05-01 13:32 git Note Added: 0100738