View Issue Details

IDProjectCategoryView StatusLast Update
0031970Open CASCADEOCCT:Data Exchangepublic2021-03-25 10:20
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.8.0 
Target Version7.6.0Fixed in Version7.6.0 
Summary0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
DescriptionReading STEP file with syntax errors produced the following output on OCCT 6.7.1:
      ...    Step File Reading : c:/workssd/test2.stp
    ****    StepFile Error : At line 20, syntax error    ****
      ...    STEP File   Read    ...
      ... Step File loaded  ...
   569 records (entities,sub-lists,scopes), 1386 parameters

*** ERR StepReaderData *** Pour Entite #5
    Type:PRODUCT_DEFINITION  Param.n0 4: 0000009 Non trouve
      ... Parameters prepared ... Report : 1 unknown entities.
      ...   Objets analysed  ...
  STEP Loading done : 349 Entities
Status from reading STEP file c:/workssd/test2.stp : file read
Count of shapes produced : 1

so that user see at which line syntax error occurred.
Since OCCT 6.8.0 (0025418) the output is like that:
*** ERR StepReaderData *** Pour Entite #5
    Type:PRODUCT_DEFINITION  Param.n0 4: 0000009 Non trouve
Report : 1 unknown entities.
Status from reading STEP file c:/workssd/test2.stp : file read
Count of shapes produced : 1

so user sees only that something was wrong without enough details.

Lost message is passed to StepFile_Interrupt() which is no more logged in by default (without OCCT_DEBUG macros) and called to a local dummy variable "checkread" of type Interface_Check which is inaccessible outside:
void StepFile_Interrupt (char* mess)
{
#ifdef OCCT_DEBUG
  Message_Messenger::StreamBuffer sout = Message::SendInfo();
  sout << "    ****    StepFile Error : " << mess << "    ****" << std::endl;
#endif
  checkread->AddFail(mess);
}


It is proposed reconsidering OCCT_DEBUG usage in this context and instead print such valuable message with Trace level instead. The usage of global non thread-safe variable and inaccessible anywhere "checkread" should be also checked.
Steps To Reproduce
pload XDE
testreadstep test2.stp s
TagsNo tags attached.
Test case numberNot required

Attached Files

  • test2.stp (15,732 bytes)

Relationships

related to 0031000 closedbugmaster Community Data Exchange - STEP file cannot be opened due to lower-case special token End-ISO-10303-21 
parent of 0032115 closedbugmaster Open CASCADE Data Exchange, STEP reader - Incorrect full path to file is not caught 
related to 0031971 closedbugmaster Open CASCADE Data Exchange, STEP reader - error messages should not be in French 
child of 0025418 closedbugmaster Community Debug output to be limited to OCC development environment 
Not all the children of this issue are yet resolved or closed.

Activities

kgv

2020-12-02 12:24

developer  

test2.stp (15,732 bytes)

git

2020-12-29 11:52

administrator   ~0097973

Branch CR31970 has been created by dpasukhi.

SHA-1: 9751bc3826e30097b0aab4383f17ec997345af94


Detailed log of new commits:

Author: dpasukhi
Date: Sat Dec 26 23:20:50 2020 +0300

    0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
    
    - Removed global variables within StepFile_Read.cxx
    - Upgraded error message during bison analyzing ( added a expected expression information )
    - Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
      for a compatibility with the StepData/StepData_StepReaderData
    - Added handling parse errors and transferring it to the StepData_StepReaderData
    - Now parsing and referencing errors save in the check and non output by default,
      but parsing with OCCT_DEBUG flag output this error messages
    - Removed useless location.hxx
    - Removed TraceLevel for the StepFile_Reader ( now it useless,
      it is 0 by default and newer and nowhere change )
    - Translate error message into English within StepData_StepReaderData

git

2021-01-27 16:39

administrator   ~0098441

Branch CR31970_1 has been created by dpasukhi.

SHA-1: b3cd09657bb8231e5cdf7a5f10c3f807cb2c46d6


Detailed log of new commits:

Author: dpasukhi
Date: Mon Jan 11 13:20:31 2021 +0300

    0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
    
     - Upgraded files using new version of WinFlexBison
     - Removed global variables within StepFile_Read.cxx
     - Upgraded error message during bison analyzing ( added a expected expression information )
     - Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
     for a compatibility with the StepData/StepData_StepReaderData
     - Added handling parse errors and transferring it to the StepData_StepReaderData
     - Now parsing and referencing errors save in the check and non output by default
     - Step_file's and Step_Data's output info prints according by trace level of printer
     - Removed useless location.hxx
     - Removed TraceLevel for the StepFile_Reader ( now it useless,
      it is 0 by default and newer and nowhere change )
     - Translate error message into English within StepData_StepReaderData
     - Replace "Error" word in the output messages

git

2021-01-27 17:25

administrator   ~0098442

Branch CR31970_1 has been updated forcibly by dpasukhi.

SHA-1: 46fda13d2d2435ea6a96445db24c11cd1c90521a

dpasukhi

2021-01-27 23:43

administrator   ~0098455

Solution implementation

git

2021-01-28 11:27

administrator   ~0098469

Branch CR31970_1 has been updated forcibly by dpasukhi.

SHA-1: 6e189bfd10e027559c2400a6fe8960dd9595f5d4

dpasukhi

2021-01-28 23:33

administrator   ~0098486

testing

git

2021-02-04 22:11

administrator   ~0098660

Branch CR31970_1 has been updated by dpasukhi.

SHA-1: 3b3cf002453d94c87b417f09ca90328d776ce390


Detailed log of new commits:

Author: dpasukhi
Date: Thu Feb 4 18:32:58 2021 +0300

    // remarks fixed

git

2021-02-04 22:14

administrator   ~0098661

Branch CR31970_2 has been created by dpasukhi.

SHA-1: b1187011a1a41dfb8061b5d2f2387a9e1db0f455


Detailed log of new commits:

Author: dpasukhi
Date: Mon Jan 11 13:20:31 2021 +0300

    0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
    
     - Upgraded files using new version of WinFlexBison
     - Removed global variables within StepFile_Read.cxx
     - Upgraded error message during bison analyzing ( added a expected expression information )
     - Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
     for a compatibility with the StepData/StepData_StepReaderData
     - Added handling parse errors and transferring it to the StepData_StepReaderData
     - Now parsing and referencing errors save in the check and non output by default
     - Step_file's and Step_Data's output info prints according by trace level of printer
     - Removed useless location.hxx
     - Removed TraceLevel for the StepFile_Reader ( now it useless,
      it is 0 by default and newer and nowhere change )
     - Translate error message into English within StepData_StepReaderData
     - Replace "Error" word in the output messages

dpasukhi

2021-02-04 23:43

administrator   ~0098663

Testing - check CPU time regressions

5mb file, 20 iterations, 25 warnings for file: old 2.901442 | new 2.893749 - no regressions

350mb file, 5 iterations, 105907 warning for file: old 81.94792 | new 81.26042 - no regressions ( testing without transfer any geometry )

350mb file, 3 iterations, 105907 warning for file: old 284.8203125 | new 284.375
 - no regressions ( full read, with transfer geometry )

dpasukhi

2021-02-05 13:00

administrator   ~0098671

Dear kgv,
please review CR31970_2,
all remarks have been done.

No regressions, see:
http://occt-tests/CR31970-master-dpasukhi-OCCT/Debian80-64/diff_summary.html
http://occt-tests/CR31970-master-dpasukhi-OCCT/Windows-64-VC14/diff_summary.html
http://occt-tests/CR31970-master-dpasukhi-Products/Windows-64-VC14/diff_summary.html
http://occt-tests/CR31970-master-dpasukhi-Products/Debian80-64/diff_summary.html

Restart: ( file in the bug24759 is invalid and leads to undefined behavior )
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31970-master-dpasukhi/view/TESTING/job/CR31970-master-dpasukhi-OCCT-Windows-64-VC14-opt-test-restart/1/HTML_20Report/

bugmaster

2021-02-06 14:16

administrator   ~0098721

Combination -
OCCT branch : IR-2021-02-05
master SHA - d918913f1cfa6df6852ccc3cab50aae2b5a29821
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2021-02-05 SHA - 7f3780c87f7b9ca7bc315437ae37fd3815a4316d
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: 17801.74000000001 / 17781.070000000076 [+0.12%]
Products
Total CPU difference: 11522.820000000105 / 11527.24000000011 [-0.04%]
Windows-64-VC14:
OCCT
Total CPU difference: 19371.578125 / 19391.0625 [-0.10%]
Products
Total CPU difference: 12882.46875 / 12836.03125 [+0.36%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2021-02-06 14:29

administrator   ~0098726

Branch CR31970_2 has been deleted by inv.

SHA-1: b1187011a1a41dfb8061b5d2f2387a9e1db0f455

git

2021-02-06 14:29

administrator   ~0098727

Branch CR31970_1 has been deleted by inv.

SHA-1: 3b3cf002453d94c87b417f09ca90328d776ce390

git

2021-02-06 14:29

administrator   ~0098739

Branch CR31970 has been deleted by inv.

SHA-1: 9751bc3826e30097b0aab4383f17ec997345af94

Related Changesets

occt: master 0c38be8f

2021-01-11 10:20:31

dpasukhi


Committer: bugmaster Details Diff
0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible

- Upgraded files using new version of WinFlexBison
- Removed global variables within StepFile_Read.cxx
- Upgraded error message during bison analyzing ( added a expected expression information )
- Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
for a compatibility with the StepData/StepData_StepReaderData
- Added handling parse errors and transferring it to the StepData_StepReaderData
- Now parsing and referencing errors save in the check and non output by default
- Step_file's and Step_Data's output info prints according by trace level of printer
- Removed useless location.hxx
- Removed TraceLevel for the StepFile_Reader ( now it useless,
it is 0 by default and newer and nowhere change )
- Translate error message into English within StepData_StepReaderData
- Replace "Error" word in the output messages
Affected Issues
0031970
mod - src/ExprIntrp/ExprIntrp.tab.c Diff File
mod - src/ExprIntrp/ExprIntrp.tab.h Diff File
mod - src/ExprIntrp/lex.ExprIntrp.c Diff File
mod - src/StepData/StepData_StepReaderData.cxx Diff File
mod - src/StepData/StepData_StepReaderTool.cxx Diff File
mod - src/StepFile/FILES Diff File
mod - src/StepFile/lex.step.cxx Diff File
rm - src/StepFile/location.hh Diff File
mod - src/StepFile/step.lex Diff File
mod - src/StepFile/step.tab.cxx Diff File
mod - src/StepFile/step.tab.hxx Diff File
mod - src/StepFile/step.yacc Diff File
mod - src/StepFile/StepFile_Read.cxx Diff File
mod - src/StepFile/StepFile_Read.hxx Diff File
mod - src/StepFile/StepFile_ReadData.cxx Diff File
mod - src/StepFile/StepFile_ReadData.hxx Diff File
mod - src/StepSelect/StepSelect_WorkLibrary.cxx Diff File
mod - tests/de/step_1/R9 Diff File

Issue History

Date Modified Username Field Change
2020-12-02 12:24 kgv New Issue
2020-12-02 12:24 kgv Assigned To => gka
2020-12-02 12:24 kgv File Added: test2.stp
2020-12-02 12:24 kgv Relationship added related to 0031000
2020-12-02 12:26 kgv Relationship added child of 0025418
2020-12-02 12:26 kgv Description Updated
2020-12-02 12:29 kgv Relationship added related to 0031971
2020-12-02 12:29 kgv Assigned To gka => dpasukhi
2020-12-02 12:29 kgv Status new => assigned
2020-12-04 17:15 dpasukhi Assigned To dpasukhi => abv
2020-12-04 17:15 dpasukhi Status assigned => resolved
2020-12-04 17:15 dpasukhi Steps to Reproduce Updated
2020-12-04 17:15 dpasukhi Assigned To abv => dpasukhi
2020-12-04 17:16 dpasukhi Status resolved => assigned
2020-12-04 17:21 dpasukhi Steps to Reproduce Updated
2020-12-29 11:52 git Note Added: 0097973
2021-01-27 16:39 git Note Added: 0098441
2021-01-27 17:25 git Note Added: 0098442
2021-01-27 23:43 dpasukhi Note Added: 0098455
2021-01-28 11:27 git Note Added: 0098469
2021-01-28 23:33 dpasukhi Note Added: 0098486
2021-02-04 22:11 git Note Added: 0098660
2021-02-04 22:14 git Note Added: 0098661
2021-02-04 23:00 dpasukhi Relationship added parent of 0032115
2021-02-04 23:43 dpasukhi Note Added: 0098663
2021-02-05 13:00 dpasukhi Note Added: 0098671
2021-02-05 13:00 dpasukhi Assigned To dpasukhi => kgv
2021-02-05 13:00 dpasukhi Status assigned => resolved
2021-02-05 13:07 kgv Assigned To kgv => bugmaster
2021-02-05 13:07 kgv Status resolved => reviewed
2021-02-06 14:16 bugmaster Note Added: 0098721
2021-02-06 14:16 bugmaster Status reviewed => tested
2021-02-06 14:22 bugmaster Test case number => Not required
2021-02-06 14:24 bugmaster Changeset attached => occt master 0c38be8f
2021-02-06 14:24 bugmaster Status tested => verified
2021-02-06 14:24 bugmaster Resolution open => fixed
2021-02-06 14:29 git Note Added: 0098726
2021-02-06 14:29 git Note Added: 0098727
2021-02-06 14:29 git Note Added: 0098739