View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025275 | Open CASCADE | OCCT:Data Exchange | public | 2014-09-26 09:53 | 2015-05-14 15:32 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 6.9.0 | Fixed in Version | 6.9.0 | ||
Summary | 0025275: Different result of reading operation from *.igs and *.stp file for WINDOWS and LINUX platforms | ||||
Description | For 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 Reproduce | test 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. | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
2014-09-26 09:53 developer |
file_content.PNG (35,317 bytes) |
|
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). |
|
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. |
|
Branch CR25275 has been updated forcibly by nbv. SHA-1: d38b92391a9f8c9a42eb55a14af0ef4e8d541ca9 |
|
Branch CR25275 has been updated forcibly by nbv. SHA-1: 2fbaa8957aef6513d05359d47c8963c1bfc4abd1 |
|
Branch CR25275 has been updated forcibly by nbv. SHA-1: 4808274acd903bee6df7c81370a6f7fcdbf267b0 |
|
Branch CR25275 has been updated forcibly by nbv. SHA-1: f7eba5cc4e92a9fa326622fc402f2878bbfbe444 |
|
Branch CR25275 has been updated forcibly by nbv. SHA-1: 8bc7ff98987cdba9f47ea182cb8b57f2bc0686ac |
|
Branch CR25275 has been updated forcibly by nbv. SHA-1: f622599e67d70b01d92f6d3d111d55623d4bdcb8 |
|
Dear Mikhail! Please review branch CR25275. |
|
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? |
|
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)? |
|
Andrey, Nikolay did two fixes in one. He addressed the SUB symbol as well, stopping reading the file in this case. |
|
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)?" |
|
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? |
|
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. |
|
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. |
|
"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." |
|
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. |
|
OK! Thank you so much. |
|
Branch CR25275 has been updated forcibly by nbv. SHA-1: 53d2b99c47a63de45bbf2f48f134bae6453486ca |
|
Dear Mikhail! Please review CR25275 branch. Principle changes are in lines #87+ |
|
Reviewed. |
|
Branch CR25275 has been updated forcibly by apv. SHA-1: a523225468e75aaceccd9ada82a123c014737487 |
|
Branch CR25275 has been rebased on the current master |
|
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 |
|
Dear Alexei! Please recheck regression tests. |
|
Test-case cr standard(001) E1 is unstable on current master. |
|
Branch CR25275 has been deleted by inv. SHA-1: a523225468e75aaceccd9ada82a123c014737487 |
occt: master 22835705 2014-12-04 06:51:24
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 |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-09-26 09:53 |
|
New Issue | |
2014-09-26 09:53 |
|
Assigned To | => nbv |
2014-09-26 09:53 |
|
File Added: file_content.PNG | |
2014-09-26 09:58 |
|
Target Version | => 7.1.0 |
2014-09-26 11:04 |
|
Relationship added | related to 0023547 |
2014-10-01 12:44 |
|
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 |
|
Description Updated | |
2014-12-09 13:33 |
|
Steps to Reproduce Updated | |
2014-12-09 13:33 |
|
Additional Information Updated | |
2014-12-09 13:34 |
|
Description Updated | |
2014-12-09 13:34 |
|
File Added: wrongnum.PNG | |
2014-12-09 13:35 |
|
Description Updated | |
2014-12-09 13:36 |
|
File Deleted: wrongnum.PNG | |
2014-12-09 13:37 |
|
File Added: wrongnum.PNG | |
2014-12-09 13:40 |
|
Additional Information Updated | |
2014-12-09 13:42 |
|
Status | new => assigned |
2014-12-09 14:13 |
|
Note Added: 0035207 | |
2014-12-09 14:15 |
|
Assigned To | nbv => ifv |
2014-12-09 14:15 |
|
Status | assigned => resolved |
2014-12-09 14:15 |
|
Steps to Reproduce Updated | |
2014-12-10 10:41 |
|
Assigned To | ifv => msv |
2014-12-10 10:41 |
|
Note Edited: 0035207 | |
2014-12-10 21:49 |
|
Note Added: 0035288 | |
2014-12-10 21:49 |
|
Assigned To | msv => nbv |
2014-12-10 21:49 |
|
Status | resolved => assigned |
2014-12-10 21:58 |
|
Note Added: 0035289 | |
2014-12-10 22:44 |
|
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 |
|
Note Added: 0035296 | |
2014-12-11 09:50 |
|
Note Added: 0035297 | |
2014-12-11 10:02 |
|
Note Added: 0035298 | |
2014-12-11 10:09 |
|
Note Added: 0035299 | |
2014-12-11 11:13 |
|
Note Added: 0035304 | |
2014-12-11 11:13 |
|
Note Edited: 0035304 | |
2014-12-11 11:42 |
|
Note Added: 0035310 | |
2014-12-11 11:47 |
|
Note Added: 0035311 | |
2014-12-12 16:30 |
|
File Deleted: wrongnum.PNG | |
2014-12-12 16:31 |
|
Description Updated | |
2014-12-12 16:31 |
|
Steps to Reproduce Updated | |
2014-12-12 16:31 |
|
Additional Information Updated | |
2014-12-12 16:32 |
|
Relationship added | related to 0025602 |
2014-12-12 16:48 | git | Note Added: 0035373 | |
2014-12-12 16:51 |
|
Note Added: 0035374 | |
2014-12-12 16:51 |
|
Assigned To | nbv => msv |
2014-12-12 16:51 |
|
Status | assigned => resolved |
2014-12-13 16:39 |
|
Note Added: 0035394 | |
2014-12-13 16:39 |
|
Assigned To | msv => bugmaster |
2014-12-13 16:39 |
|
Status | resolved => reviewed |
2014-12-16 15:55 |
|
Assigned To | bugmaster => apv |
2014-12-17 12:43 | git | Note Added: 0035451 | |
2014-12-17 12:43 |
|
Note Added: 0035452 | |
2014-12-18 17:50 |
|
Note Added: 0035487 | |
2014-12-18 17:50 |
|
Assigned To | apv => nbv |
2014-12-18 17:50 |
|
Status | reviewed => assigned |
2014-12-18 17:57 |
|
Note Edited: 0035487 | |
2014-12-18 18:04 |
|
Note Added: 0035488 | |
2014-12-18 18:04 |
|
Assigned To | nbv => apv |
2014-12-18 18:04 |
|
Status | assigned => feedback |
2014-12-18 18:09 |
|
Note Added: 0035489 | |
2014-12-18 18:09 |
|
Assigned To | apv => bugmaster |
2014-12-18 18:09 |
|
Status | feedback => tested |
2014-12-18 18:10 |
|
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 |
|
Status | verified => closed |
2015-05-14 15:32 |
|
Fixed in Version | => 6.9.0 |