MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031756Open CASCADE[OCCT] OCCT:Data Exchangepublic2020-09-07 13:202020-09-22 18:28
Reporterabv 
Assigned Todpasukhi 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
DescriptionThe problem has been discovered during analysis of regression manifested on test case bugs step bug26451 with a fix made for #31489.

The STEP entity #71919 (and many others) in the file attached to issue 0026451 has last parameter missing, like this:

#71919=EDGE_CURVE('',#84041,#84041,#0, );
#71920=FILL_AREA_STYLE('',(#84042));

When this STEP file is read, such entities are parsed incorrectly: instead of incomplete list of parameters, they get extra parameters by including ones from the next entity, and that next entity gets ignored:

~~~~~
Draw[1]> test bugs step bug26451
...
Draw[2]> entity #71919
  -- DUMP Entity n0 71355 level 1
 --- (STEP) Entity 71355:#71919 Type cdl : StepShape_EdgeCurve
 *** NOT WELL LOADED : CONTENT FROM FILE ***
In dump, iii:#jjj means : entity rank iii has step ident #jjj
71355:#71919 = EDGE_CURVE('',83437:#84041,83437:#84041,#0,#0,/* (SUB) */
  (83438:#84042));
  /* On Entity above, Fail Messages recorded at Read time :
Count of Parameters is not 5 for edge_curve
A reference to another entity is unresolved */
 ** Data Check (One Entity) **
Check:1 -- Entity (n0:id) 71355:#71919 Type:EDGE_CURVE
Count of Parameters is not 5 for edge_curve
A reference to another entity is unresolved

Draw[3]> entity #71920
Error in Command : entity #71920
~~~~~

I have prepared synthetic test file for this case, attached as bug31756.stp.
Desired behavior is that the file should be read successfully (it is just a sphere) but error shall be generated on entity 0000015.

Current behavior is:
- on master branch: translation fails, with error on entity 0000015 (wrong nb. of parameters)
- on CR31489_1: translation succeeds without any messages

Note that while work-around implemented in CR31489_1 effectively works in this particular case, this issue shows that our STEP parser can be broken easily by incorrect data, and its behavior becomes unpredictable. We need to understand how original problem occurs and prevent this in more generic way.
Steps To Reproducepload ALL
stepread [locate_data_file bug31756.stp] a *
TagsNo tags attached.
Test case number
Attached Files? file icon bug31756.stp (2,175 bytes) 2020-09-07 14:39

- Relationships
related to 0026451closedbugmaster Community Crash importing STeP file 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2020-09-07 13:20 abv New Issue
2020-09-07 13:20 abv Assigned To => dpasukhi
2020-09-07 13:20 abv Relationship added related to 0031489
2020-09-07 13:20 abv Relationship added related to 0026451
2020-09-07 14:39 abv File Added: bug31756.stp
2020-09-07 14:45 abv Description Updated View Revisions
2020-09-07 14:45 abv Steps to Reproduce Updated View Revisions
2020-09-17 19:49 gka Status new => assigned
2020-09-22 18:28 szy Target Version 7.5.0 => 7.6.0*


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker