View Issue Details

IDProjectCategoryView StatusLast Update
0025275Open CASCADEOCCT:Data Exchangepublic2015-05-14 15:32
ReporternbvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version6.9.0Fixed in Version6.9.0 
Summary0025275: Different result of reading operation from *.igs and *.stp file for WINDOWS and LINUX platforms
DescriptionFor example, there is the file UKI60107-6.igs in OCCT Base with following structure.

Useful data are in line-range from 1 to 11092 (see file_content.png attached picture). Next lines contain not actual data. [In the picture file is showed with unprinted symbols, such as LF (ASCII-code 0x0A), SUB (ASCII-code 0x1A), BEL (ASCII-code 0x07) etc.]

WINDOWS reads only (!) these 1092 lines, after that it breaks to read in reason of meeting end of file.

LINUX continues reading. It results in this error:
"1 F: Syntax error in IGES file at line 11093 in section T."

(see test de iges_3 A3 in DEBUG mode on LINUX platform). On WINDOWS platform these errors are absent.
Steps To Reproducetest de iges_3 A3

New test case is not required.
Additional information
and documentation updates
Just for the record:
According to information from here (http://ru.science.wikia.com/wiki/ASCII), symbol SUB (ASCII-code 0x1A) is used for substituting lost or entering with mistake symbol. Now it is interpreted by DOS and WINDOWS (LINUX is not in this list) system as END OF FILE. Therefore, LINUX does not break reading.
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • file_content.PNG (35,317 bytes)

Relationships

related to 0023547 closedabv Open CASCADE Tests failures in debug mode 
related to 0025602 assignedskl Open CASCADE Data Exchange - It is important for IGES and STEP file format to add check, if wrong data are read from the file 

Activities

nbv

2014-09-26 09:53

developer  

file_content.PNG (35,317 bytes)

nbv

2014-10-01 12:44

developer   ~0032501

Small remark!

This problem is actual for *.igs file. In *.stp-file range of correct data is well-defined thanks to file-structure (for example, useful data are contained between "ISO-10303-21" and "END-ISO-10303-21" tags).

git

2014-10-20 14:19

administrator   ~0033332

Branch CR25275 has been created by nbv.

SHA-1: 39caea0e17f6a0e746fc5d6f46df2c4fd0127261


Detailed log of new commits:

Author: nbv
Date: Fri Oct 17 15:45:19 2014 +0400

    step

Author: nbv
Date: Fri Oct 17 13:32:21 2014 +0400

    tests/de/iges_2/H9

Author: nbv
Date: Mon Oct 13 17:36:20 2014 +0400

    Illegal number processing.

Author: nbv
Date: Tue Sep 30 12:51:38 2014 +0400

    Catch illegal numbers.

Author: nbv
Date: Tue Sep 30 09:44:28 2014 +0400

    0025275: Diferent result of reading operation from *.igs and *.stp file for WINDOWS and LINUX platform
    
    Symbol SUB (ASCII-code 0x1A) should be considered as End-Of-File both on WINDOWS and LINUX (and on other) system.

git

2014-12-04 11:04

administrator   ~0034995

Branch CR25275 has been updated forcibly by nbv.

SHA-1: d38b92391a9f8c9a42eb55a14af0ef4e8d541ca9

git

2014-12-08 16:12

administrator   ~0035141

Branch CR25275 has been updated forcibly by nbv.

SHA-1: 2fbaa8957aef6513d05359d47c8963c1bfc4abd1

git

2014-12-08 17:09

administrator   ~0035147

Branch CR25275 has been updated forcibly by nbv.

SHA-1: 4808274acd903bee6df7c81370a6f7fcdbf267b0

git

2014-12-09 10:41

administrator   ~0035187

Branch CR25275 has been updated forcibly by nbv.

SHA-1: f7eba5cc4e92a9fa326622fc402f2878bbfbe444

git

2014-12-09 10:51

administrator   ~0035188

Branch CR25275 has been updated forcibly by nbv.

SHA-1: 8bc7ff98987cdba9f47ea182cb8b57f2bc0686ac

git

2014-12-09 11:25

administrator   ~0035192

Branch CR25275 has been updated forcibly by nbv.

SHA-1: f622599e67d70b01d92f6d3d111d55623d4bdcb8

nbv

2014-12-09 14:13

developer   ~0035207

Last edited: 2014-12-10 10:41

Dear Mikhail!

Please review branch CR25275.

msv

2014-12-10 21:49

developer   ~0035288

Remarks:

Class Precision.
- The macro DEFINE_STANDARD_ALLOC is extra for the class containing only static methods.
- Please remove obsolete code in "#ifdef PRECISION_OBSOLETE"
- Do not use Standard_EXPORT keyword for inline methods.
- The method IsIllegal is too complex to be inline.
- The method IsInfinitesimal will return true for zero argument. It is wrong by definition.

Package Standard
- It is questionable adding new exception of type Standard_FloatingPointOverflow. First, it must inherit Standard_NumericError rather than Standard_Failure. Second, There is already Standard_Overflow exception. Moreover, taking into account the contexts, in which this new exception is raised I would name it Standard_IllegalNumber, again inheriting Standard_NumericError.

IGESData_GlobalSection.cxx
- The lines 157-165 must be placed inside the scope of condition of line 154:
      if ( i == 13 || i == 17 || i == 19 || i == 20)

StepData_StepReaderData.cxx
- The lines 543-552 have wrong indentation. Please take into account that where tab characters are used there tab length is assumed to be 8 characters.

General remark. I would like to know where exception about illegal number is caught during step/iges reading. What will be the result of reading such file?

abv

2014-12-10 21:58

manager   ~0035289

Nikolai, please describe what has been done in your fix. The issue description refers to problem with symbol SUB which, in my own experience, unavoidably breaks reading of the file on Windows. Have you been able to cope with that? Or you made some changes completely irrelevant to this problem (as I guess from Mikhail remarks)?

msv

2014-12-10 22:44

developer   ~0035290

Andrey, Nikolay did two fixes in one. He addressed the SUB symbol as well, stopping reading the file in this case.

nbv

2014-12-11 09:42

developer   ~0035296

Dear Andrey!

Bug description was extended:
"Additionally, it is important for IGES and STEP file format to add check, if if wrong data are read from the file. For example, if file contains number ~ 1.0e-314 (less than DBL_MIN) or Nan-numbers (see wrongnum.PNG file attached)."

However, it is not the reason for different result for WINDOWS and LINUX platforms. Therefore, we are discussing with Mikhail: "Should we divide this issue on two separately parts (create new bug about wrong numbers reading or keep full script in this issue)?"

msv

2014-12-11 09:50

developer   ~0035297

Nikolay, one thing is unclear for me. Why you in steps to reproduce added the line:
test de step_1 E6
I looked at that step file, and it does not contain any unprintable symbols. Is this file also read differently on windows and linux?

nbv

2014-12-11 10:02

developer   ~0035298

Test "de iges_3 A3" contains unprintable symbol SUB (ASCII-code 0x1A). For *.stp-file this problem is not actual (see above).

Test "de step_1 E6" uses file, fragment of which is in attached picture "wrongnum.PNG". Therefore, this test must be in Steps To Reproduce.

msv

2014-12-11 10:09

developer   ~0035299

What is wrong when reading bad numbers? Do you observe different behavior on windows and linux? Or is there any floating point exception? Why is it necessary to take care of illegal numbers?
In any case, I would like to separate these two problems in different bugs and solved them separately.

nbv

2014-12-11 11:13

developer   ~0035304

Last edited: 2014-12-11 11:13

"What is wrong when reading bad numbers?"

Sometimes it is not wrong. But it is possible for computations to use these data. For example, when computing value of (X^2)*f(X) (in Newton method), where X is 1.0e+109 => f(X) ~ 1.0e+100. Then (X^2)*f(X) ~ 1.0e+318 > DBL_MAX. Earlier, when OCCT Catch Signals was ON, this fact will result of the exception. Now, this situation is not controlled. There is no point in improving OCCT computational methods for processing these cases, if these wrong numbers are source data.




"Do you observe different behavior on windows and linux?"

See http://tracker.dev.opencascade.org/view.php?id=25275#c35296. "...it is not the reason for different result for WINDOWS and LINUX platforms."

msv

2014-12-11 11:42

developer   ~0035310

Nikolay, concluding the above discussion, I suggest that you create a new bug for treating illegal numbers during files import, and leave in the current fix only the code relevant to the subject of this bug.

nbv

2014-12-11 11:47

developer   ~0035311

OK! Thank you so much.

git

2014-12-12 16:48

administrator   ~0035373

Branch CR25275 has been updated forcibly by nbv.

SHA-1: 53d2b99c47a63de45bbf2f48f134bae6453486ca

nbv

2014-12-12 16:51

developer   ~0035374

Dear Mikhail!

Please review CR25275 branch. Principle changes are in lines #87+

msv

2014-12-13 16:39

developer   ~0035394

Reviewed.

git

2014-12-17 12:43

administrator   ~0035451

Branch CR25275 has been updated forcibly by apv.

SHA-1: a523225468e75aaceccd9ada82a123c014737487

apv

2014-12-17 12:43

tester   ~0035452

Branch CR25275 has been rebased on the current master

apv

2014-12-18 17:50

tester   ~0035487

Last edited: 2014-12-18 17:57

Dear BugMaster,

Branch CR25275 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: a523225468e75aaceccd9ada82a123c014737487

Number of compiler warnings:
occt component:
   Linux: 18 (18 on master)
   Windows: 0 (0 on master)
products component :
   Linux: 11 (11 on master)
   Windows: 1 (1 on master)

Regressions/Differences:
http://occt-tests/CR25275-master-products/Debian60-64/summary.html
http://occt-tests/CR25275-master-products/Windows-32-VC10/summary.html
cr standard(001) E1

Testing on Linux:
Total MEMORY difference: 367181040 / 367862128
Total CPU difference: 48660.6899999999 / 51444.81000000015

Testing on Windows:
Total MEMORY difference: 277906444 / 277277864
Total CPU difference: 46918.0 / 37472.0935757

nbv

2014-12-18 18:04

developer   ~0035488

Dear Alexei!

Please recheck regression tests.

apv

2014-12-18 18:09

tester   ~0035489

Test-case cr standard(001) E1 is unstable on current master.

git

2015-01-26 12:34

administrator   ~0036565

Branch CR25275 has been deleted by inv.

SHA-1: a523225468e75aaceccd9ada82a123c014737487

Related Changesets

occt: master 22835705

2014-12-04 06:51:24

nbv


Committer: bugmaster Details Diff
0025275: Diferent result of reading operation from *.igs and *.stp file for WINDOWS and LINUX platform

Symbol SUB (ASCII-code 0x1A) should be considered as End-Of-File both on WINDOWS and LINUX (and on other) system.
Affected Issues
0025275
mod - src/IGESFile/liriges.c Diff File

Issue History

Date Modified Username Field Change
2014-09-26 09:53 nbv New Issue
2014-09-26 09:53 nbv Assigned To => nbv
2014-09-26 09:53 nbv File Added: file_content.PNG
2014-09-26 09:58 abv Target Version => 7.1.0
2014-09-26 11:04 nbv Relationship added related to 0023547
2014-10-01 12:44 nbv Note Added: 0032501
2014-10-20 14:19 git Note Added: 0033332
2014-12-04 11:04 git Note Added: 0034995
2014-12-08 16:12 git Note Added: 0035141
2014-12-08 17:09 git Note Added: 0035147
2014-12-09 10:41 git Note Added: 0035187
2014-12-09 10:51 git Note Added: 0035188
2014-12-09 11:25 git Note Added: 0035192
2014-12-09 13:33 nbv Description Updated
2014-12-09 13:33 nbv Steps to Reproduce Updated
2014-12-09 13:33 nbv Additional Information Updated
2014-12-09 13:34 nbv Description Updated
2014-12-09 13:34 nbv File Added: wrongnum.PNG
2014-12-09 13:35 nbv Description Updated
2014-12-09 13:36 nbv File Deleted: wrongnum.PNG
2014-12-09 13:37 nbv File Added: wrongnum.PNG
2014-12-09 13:40 nbv Additional Information Updated
2014-12-09 13:42 nbv Status new => assigned
2014-12-09 14:13 nbv Note Added: 0035207
2014-12-09 14:15 nbv Assigned To nbv => ifv
2014-12-09 14:15 nbv Status assigned => resolved
2014-12-09 14:15 nbv Steps to Reproduce Updated
2014-12-10 10:41 nbv Assigned To ifv => msv
2014-12-10 10:41 nbv Note Edited: 0035207
2014-12-10 21:49 msv Note Added: 0035288
2014-12-10 21:49 msv Assigned To msv => nbv
2014-12-10 21:49 msv Status resolved => assigned
2014-12-10 21:58 abv Note Added: 0035289
2014-12-10 22:44 msv Note Added: 0035290
2014-12-11 09:18 kgv Summary Diferent result of reading operation from *.igs and *.stp file for WINDOWS and LINUX platform => Different result of reading operation from *.igs and *.stp file for WINDOWS and LINUX platforms
2014-12-11 09:42 nbv Note Added: 0035296
2014-12-11 09:50 msv Note Added: 0035297
2014-12-11 10:02 nbv Note Added: 0035298
2014-12-11 10:09 msv Note Added: 0035299
2014-12-11 11:13 nbv Note Added: 0035304
2014-12-11 11:13 nbv Note Edited: 0035304
2014-12-11 11:42 msv Note Added: 0035310
2014-12-11 11:47 nbv Note Added: 0035311
2014-12-12 16:30 nbv File Deleted: wrongnum.PNG
2014-12-12 16:31 nbv Description Updated
2014-12-12 16:31 nbv Steps to Reproduce Updated
2014-12-12 16:31 nbv Additional Information Updated
2014-12-12 16:32 nbv Relationship added related to 0025602
2014-12-12 16:48 git Note Added: 0035373
2014-12-12 16:51 nbv Note Added: 0035374
2014-12-12 16:51 nbv Assigned To nbv => msv
2014-12-12 16:51 nbv Status assigned => resolved
2014-12-13 16:39 msv Note Added: 0035394
2014-12-13 16:39 msv Assigned To msv => bugmaster
2014-12-13 16:39 msv Status resolved => reviewed
2014-12-16 15:55 mkv Assigned To bugmaster => apv
2014-12-17 12:43 git Note Added: 0035451
2014-12-17 12:43 apv Note Added: 0035452
2014-12-18 17:50 apv Note Added: 0035487
2014-12-18 17:50 apv Assigned To apv => nbv
2014-12-18 17:50 apv Status reviewed => assigned
2014-12-18 17:57 apv Note Edited: 0035487
2014-12-18 18:04 nbv Note Added: 0035488
2014-12-18 18:04 nbv Assigned To nbv => apv
2014-12-18 18:04 nbv Status assigned => feedback
2014-12-18 18:09 apv Note Added: 0035489
2014-12-18 18:09 apv Assigned To apv => bugmaster
2014-12-18 18:09 apv Status feedback => tested
2014-12-18 18:10 apv Test case number => Not needed
2014-12-26 13:33 bugmaster Changeset attached => occt master 22835705
2014-12-26 13:33 bugmaster Status tested => verified
2014-12-26 13:33 bugmaster Resolution open => fixed
2015-01-19 16:23 bugmaster Target Version 7.1.0 => 6.9.0
2015-01-26 12:34 git Note Added: 0036565
2015-05-14 15:29 aiv Status verified => closed
2015-05-14 15:32 aiv Fixed in Version => 6.9.0