MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031970Open CASCADE[OCCT] OCCT:Data Exchangepublic2020-12-02 12:242020-12-29 11:52
Reporterkgv 
Assigned Todpasukhi 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
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 number
Attached Files? file icon test2.stp (15,732 bytes) 2020-12-02 12:24

- Relationships
related to 0031000verifiedbugmaster Community Data Exchange - STEP file cannot be opened due to lower-case special token End-ISO-10303-21 
related to 0031971assigneddpasukhi Open CASCADE Data Exchange, STEP reader - error messages should not be in French 
child of 0025418closedbugmaster Community Debug output to be limited to OCC development environment 

-  Notes
(0097973)
git (administrator)
2020-12-29 11:52

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

- 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 View Revisions
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 Note Added: 0097327
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 View Revisions
2020-12-04 17:15 dpasukhi Assigned To abv => dpasukhi
2020-12-04 17:15 dpasukhi Note Deleted: 0097327
2020-12-04 17:16 dpasukhi Status resolved => assigned
2020-12-04 17:21 dpasukhi Steps to Reproduce Updated View Revisions
2020-12-29 11:52 git Note Added: 0097973


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker