View Issue Details

IDProjectCategoryView StatusLast Update
0026400CommunityOCCT:Data Exchangepublic2023-01-17 03:23
Reporterventu Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionunable to reproduce 
Product Version6.8.0 
Target Version7.8.0 
Summary0026400: Data Exchange, Step Import - Wrong step file crashes OC
DescriptionImporting a STeP file with "REPRESENTATION_ITEM()" in it crashes the program.
AFAICT REPRESENTATION_ITEM should have a NAME parameter, so the file is wrong.
Still I think it could easily be imported (or at least gracefully rejected).

What happens is that the following line (RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx:228):
    if (!data->CheckNbParams(num,1,ach,"representation_item")) return;
finds an incorrect number of parameters and returns immediately.
So ent->Init is not called; the entity is thus invalid, but still translated later.
The crash happens in StepGeom_BSplineCurve::Degree() which is called on a null reference from StepToGeom_MakeBSplineCurve::Convert while handling the invalid entity.

Maybe it would be possible to set aName to an emtpy string in RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx, when such a parameter is missing?
TagsNo tags attached.
Test case number

Attached Files

  • sample.zip (3,432,167 bytes)

Activities

ventu

2015-07-10 12:05

reporter  

sample.zip (3,432,167 bytes)

user1100

2021-11-17 15:57

  ~0105226

Last edited: 2021-11-17 15:57

Current bug is not reproduced in the current master and doesn't reproduce in OpenCascade 6.8.0
After checking attached step file I didn't find any syntax or logical errors. All entities contain valid links to other entities. All OCCT releases from 6.8 to 7.6 don't throw any exceptions or crash

dpasukhi

2021-11-17 16:00

administrator   ~0105227

Dear bugmaster,
please close the issue.

The current bug not reproduce in the any OCC releases with OSD::SetSignal() ON or OFF.

vglukhik

2023-01-17 03:23

administrator   ~0112858

Closed.

Issue History

Date Modified Username Field Change
2015-07-04 20:57 ventu New Issue
2015-07-04 20:57 ventu Assigned To => gka
2015-07-10 12:05 ventu File Added: sample.zip
2021-11-13 09:27 dpasukhi Assigned To gka => user1100
2021-11-13 09:54 dpasukhi Summary Wrong STeP file crashes OC => Data Exchange, Step Import - Wrong step file crashes OC
2021-11-13 11:38 user1100 Assigned To user1100 => bugmaster
2021-11-13 11:39 user1100 Assigned To bugmaster => user1100
2021-11-15 09:26 kgv Target Version => 7.7.0
2021-11-17 15:57 user1100 Note Added: 0105226
2021-11-17 15:57 user1100 Assigned To user1100 => dpasukhi
2021-11-17 15:57 user1100 Status new => feedback
2021-11-17 15:57 user1100 Note Edited: 0105226
2021-11-17 16:00 dpasukhi Note Added: 0105227
2021-11-17 16:00 dpasukhi Assigned To dpasukhi => bugmaster
2021-11-17 16:17 kgv Resolution open => unable to reproduce
2022-10-24 10:38 szy Target Version 7.7.0 => 7.8.0
2023-01-17 03:23 vglukhik Status feedback => closed
2023-01-17 03:23 vglukhik Note Added: 0112858