MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025275Open CASCADE[OCCT] OCCT:Data Exchangepublic2014-09-26 09:532015-05-14 15:32
Reporternbv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.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 Filespng file icon file_content.PNG (35,317 bytes) 2014-09-26 09:53

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

-  Notes
(0032501)
nbv (developer)
2014-10-01 12:44

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).
(0033332)
git (administrator)
2014-10-20 14:19

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.
(0034995)
git (administrator)
2014-12-04 11:04

Branch CR25275 has been updated forcibly by nbv.

SHA-1: d38b92391a9f8c9a42eb55a14af0ef4e8d541ca9
(0035141)
git (administrator)
2014-12-08 16:12

Branch CR25275 has been updated forcibly by nbv.

SHA-1: 2fbaa8957aef6513d05359d47c8963c1bfc4abd1
(0035147)
git (administrator)
2014-12-08 17:09

Branch CR25275 has been updated forcibly by nbv.

SHA-1: 4808274acd903bee6df7c81370a6f7fcdbf267b0
(0035187)
git (administrator)
2014-12-09 10:41

Branch CR25275 has been updated forcibly by nbv.

SHA-1: f7eba5cc4e92a9fa326622fc402f2878bbfbe444
(0035188)
git (administrator)
2014-12-09 10:51

Branch CR25275 has been updated forcibly by nbv.

SHA-1: 8bc7ff98987cdba9f47ea182cb8b57f2bc0686ac
(0035192)
git (administrator)
2014-12-09 11:25

Branch CR25275 has been updated forcibly by nbv.

SHA-1: f622599e67d70b01d92f6d3d111d55623d4bdcb8
(0035207)
nbv (developer)
2014-12-09 14:13
edited on: 2014-12-10 10:41

Dear Mikhail!

Please review branch CR25275.

(0035288)
msv (developer)
2014-12-10 21:49

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?
(0035289)
abv (manager)
2014-12-10 21:58

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)?
(0035290)
msv (developer)
2014-12-10 22:44

Andrey, Nikolay did two fixes in one. He addressed the SUB symbol as well, stopping reading the file in this case.
(0035296)
nbv (developer)
2014-12-11 09:42

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)?"
(0035297)
msv (developer)
2014-12-11 09:50

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?
(0035298)
nbv (developer)
2014-12-11 10:02

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.
(0035299)
msv (developer)
2014-12-11 10:09

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.
(0035304)
nbv (developer)
2014-12-11 11:13
edited on: 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."

(0035310)
msv (developer)
2014-12-11 11:42

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.
(0035311)
nbv (developer)
2014-12-11 11:47

OK! Thank you so much.
(0035373)
git (administrator)
2014-12-12 16:48

Branch CR25275 has been updated forcibly by nbv.

SHA-1: 53d2b99c47a63de45bbf2f48f134bae6453486ca
(0035374)
nbv (developer)
2014-12-12 16:51

Dear Mikhail!

Please review CR25275 branch. Principle changes are in lines #87+
(0035394)
msv (developer)
2014-12-13 16:39

Reviewed.
(0035451)
git (administrator)
2014-12-17 12:43

Branch CR25275 has been updated forcibly by apv.

SHA-1: a523225468e75aaceccd9ada82a123c014737487
(0035452)
apv (tester)
2014-12-17 12:43

Branch CR25275 has been rebased on the current master
(0035487)
apv (tester)
2014-12-18 17:50
edited on: 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

(0035488)
nbv (developer)
2014-12-18 18:04

Dear Alexei!

Please recheck regression tests.
(0035489)
apv (tester)
2014-12-18 18:09

Test-case cr standard(001) E1 is unstable on current master.
(0036565)
git (administrator)
2015-01-26 12:34

Branch CR25275 has been deleted by inv.

SHA-1: a523225468e75aaceccd9ada82a123c014737487

- Related Changesets
occt: master 22835705
Timestamp: 2014-12-04 06:51:24
Author: 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.
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 View Revisions
2014-12-09 13:33 nbv Steps to Reproduce Updated View Revisions
2014-12-09 13:33 nbv Additional Information Updated View Revisions
2014-12-09 13:34 nbv Description Updated View Revisions
2014-12-09 13:34 nbv File Added: wrongnum.PNG
2014-12-09 13:35 nbv Description Updated View Revisions
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 View Revisions
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 View Revisions
2014-12-10 10:41 nbv Assigned To ifv => msv
2014-12-10 10:41 nbv Note Edited: 0035207 View Revisions
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 View Revisions
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 View Revisions
2014-12-12 16:31 nbv Steps to Reproduce Updated View Revisions
2014-12-12 16:31 nbv Additional Information Updated View Revisions
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 View Revisions
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-12 13:59 abv Relationship added related to 0025486
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


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker