MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032314Community[OCCT] OCCT:Data Exchangepublic2021-04-21 16:402021-05-01 13:32
ReporterTilo Pfliegner 
Assigned Tobugmaster 
PrioritynormalSeveritycrash 
StatusverifiedResolutionfixed 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
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? file icon corrupted.stp (241,634 bytes) 2021-04-21 16:40

- Relationships

-  Notes
(0100635)
git (administrator)
2021-04-28 11:57

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 )
(0100639)
git (administrator)
2021-04-28 14:31

Branch CR32314 has been updated forcibly by dpasukhi.

SHA-1: c5339c7f033d2283dfa39f7e741e26313944a53f
(0100640)
dpasukhi (developer)
2021-04-28 14:36

Deak ika,
please review CR32314

All test are ok, see
http://jenkins-test-08.nnov.opencascade.com/view/CR32314-master-dpasukhi/view/COMPARE/ [^]
(0100641)
ika (developer)
2021-04-28 14:46

No remarks.

Dear bugmaster,
please integrate
OCCT - CR32314
Products - NOT
(0100719)
bugmaster (administrator)
2021-05-01 12:27

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
(0100738)
git (administrator)
2021-05-01 13:32

Branch CR32314 has been deleted by inv.

SHA-1: c5339c7f033d2283dfa39f7e741e26313944a53f

- Related Changesets
occt: master 36fbf05b
Timestamp: 2021-04-28 08:53:40
Author: 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 )
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 View Revisions
2021-04-22 11:35 kgv Assigned To gka => dpasukhi
2021-04-22 11:35 kgv Steps to Reproduce Updated View Revisions
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


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker