View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029978 | Open CASCADE | OCCT:Foundation Classes | public | 2018-07-23 16:32 | 2018-10-09 22:12 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | x86-64 | OS | macos | ||
Product Version | 7.3.0 | ||||
Target Version | 7.4.0 | Fixed in Version | 7.4.0 | ||
Summary | 0029978: Foundation Classes, macOS - the result of reading some entity from STEP looks odd | ||||
Description | The result of reading some entity from STEP looks odd, see attached images. This is reproduced when OCCT is built with XCode 9.4.1 (LLVM 9.1.0), but not with older versions of the compiler, e.g. XCode 9.0.0 (LLVM 9.0.0) | ||||
Steps To Reproduce | stepread trj4_k1_top-ct-203.stp a 1288 small donly a_1 fit | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
2018-07-23 16:32 developer |
trj4_k1_top-ct-203.stp (129,218 bytes) |
2018-07-23 16:33 developer |
Screen Shot 2018-07-23 at 16.01.48.png (34,301 bytes) |
2018-07-23 16:33 developer |
Screen Shot 2018-07-23 at 16.13.39.png (41,792 bytes) |
|
The problem is not reproduced on Ubuntu 16.04 with Clang 6.0 |
|
The problem isn't reproduced on macos 10.13.6 on IR-2018-07-20 (Debug) |
|
Branch CR29978 has been created by abv. SHA-1: 2ec376997bd85e5bd0f22f7f40275011de924782 Detailed log of new commits: Author: abv Date: Wed Jul 25 17:38:45 2018 +0300 0029978: Data Exchange, macOS - the result of reading some entity from STEP looks odd test code |
|
Branch CR29978 has been updated by abv. SHA-1: 6db6d4a0ff0fd5c8feb35e550557e398fa3ccf8e Detailed log of new commits: Author: abv Date: Wed Jul 25 18:33:40 2018 +0300 next iteration |
|
Branch CR29978 has been updated by abv. SHA-1: 5f6f9c1cdde12edb3b8e206b6a6d42e928d64de1 Detailed log of new commits: Author: abv Date: Wed Jul 25 18:49:51 2018 +0300 add coutt of point |
|
Branch CR29978 has been updated by abv. SHA-1: 2eff02bf90d95f108c546b4030191533aaeb3c5a Detailed log of new commits: Author: abv Date: Wed Jul 25 19:13:00 2018 +0300 print cone |
|
Branch CR29978_fix has been created by abv. SHA-1: 07a4827abd93f0a71e1d8f2365dc926556c39881 Detailed log of new commits: Author: abv Date: Thu Jul 26 10:36:12 2018 +0300 0029978: Data Exchange, macOS - the result of reading some entity from STEP looks odd Code is optimized manually to avoid bug of XCode 9.4 compiler optimizer |
|
The problem is diagnosed as a bug in the optimizer of the compiler (clang coming with XCode 9.4.1). The problematic place is method gp_Trsf::SetTransformation(): void gp_Trsf::SetTransformation (const gp_Ax3& A3) { shape = gp_CompoundTrsf; scale = 1.0; loc = A3.Location().XYZ(); matrix.SetCols (A3.XDirection().XYZ(), A3.YDirection().XYZ(), A3. Direction().XYZ()); matrix.Transpose(); loc.Multiply (matrix); loc.Reverse (); } The result with XCode in optimized mode (-O2 used by default) looks like if loc was multiplied by matrix that is not yet transposed. If optimization is disabled (by adding "__attribute__((optnone))" before the method), it works well. |
|
Branch CR29978_try2 has been created by abv. SHA-1: c695921efb9c81b8e9002fcd687c879892813cd6 Detailed log of new commits: Author: abv Date: Thu Jul 26 18:26:21 2018 +0300 Try tweaking gp_Trsf and gp_Mat |
|
Branch CR29978_try2 has been updated by abv. SHA-1: da500251ba54fd2faf93c7c9e95a9222637cc8d1 Detailed log of new commits: Author: abv Date: Thu Jul 26 19:58:26 2018 +0300 printouts |
|
Branch CR29978_fix has been updated by abv. SHA-1: d19cfe7fd9afeb60c7891d6355b6f78eb645b2b0 Detailed log of new commits: Author: abv Date: Thu Jul 26 20:41:00 2018 +0300 On Apple with XCode 9.4.1 and onwards, the compiler optimization is disabled for method gp_Mat::Transpose() as optimizer generates invalid code when that method is used. |
|
Branch CR29978_fix2 has been created by abv. SHA-1: c1528d8fbf34e4f12973fd5a3cf5f2d771366e0c Detailed log of new commits: Author: abv Date: Thu Jul 26 10:36:12 2018 +0300 0029978: Data Exchange, macOS - the result of reading some entity from STEP looks odd Optimization is explicitly disabled for methods in gp_Trsf and gp_Trsf2d classes which have been found to misbehave when compiled by XCode 9.4 compiler with -O2 flag. Minor code simplifications are made in the affected methods. |
|
Branch CR29978_fix2 has been updated forcibly by abv. SHA-1: 44b6e50a8a95ce7fa8aa6be5f5a8596000164cfd |
|
Branch CR29978_fix has been updated forcibly by abv. SHA-1: 8e70c900e99acbd4d3a14437e2cd7fed3521510e |
|
Branch CR29978_fix has been updated by abv. SHA-1: 79d45b37bddf03f2990eacba71bbe050ead68542 Detailed log of new commits: Author: abv Date: Fri Jul 27 11:25:48 2018 +0300 possible reproducer |
|
Branch CR29978_fix3 has been created by abv. SHA-1: e83656c75887d960e2e8054cf3fbe1ffbc4aacf8 Detailed log of new commits: Author: abv Date: Thu Jul 26 10:36:12 2018 +0300 0029978: Data Exchange, macOS - the result of reading some entity from STEP looks odd On Apple with XCode 9.4.1 and onwards, the compiler optimization is disabled for method gp_Mat::Transpose() as optimizer generates invalid code when that method is used. Some refactoring of the code affected by this bug. |
|
Working version of the fix is pushed to CR29978_fix3, please review. Test results are in Jenkins job CR29978-master-abv. |
|
Please refer existing Draw Harness test case reproducing the problem or push a new test case to the branch. |
|
test de step_1 V7 should be relevant test case; please ask Ivan to check this on buggy build |
|
test de step_1 V7 is a relevant test case |
2018-08-02 14:24 developer |
failed-test-case.png (140,385 bytes) |
2018-08-02 14:25 developer |
successful-test-case.png (153,443 bytes) |
|
I have attached two screenshots showing the difference between 'GOOD and EVIL' |
|
OK, please queue the patch. |
|
Combination - OCCT branch : CR29978_fix3 SHA - e83656c75887d960e2e8054cf3fbe1ffbc4aacf8 Products branch : master SHA - 5bf9109bd22e12bf80de2694686cfbf63bba4b6f 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: Debian70-64: OCCT Total CPU difference: 16888.909999999974 / 17220.20999999982 [-1.92%] Products Total CPU difference: 7401.210000000056 / 7395.280000000046 [+0.08%] Windows-64-VC10: OCCT Total CPU difference: 16856.173251698663 / 17014.420666098493 [-0.93%] Products Total CPU difference: 8216.338668499904 / 8218.070279599868 [-0.02%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR29978_fix3 has been deleted by inv. SHA-1: e83656c75887d960e2e8054cf3fbe1ffbc4aacf8 |
|
Branch CR29978_fix has been deleted by inv. SHA-1: 79d45b37bddf03f2990eacba71bbe050ead68542 |
|
Branch CR29978_fix2 has been deleted by inv. SHA-1: 44b6e50a8a95ce7fa8aa6be5f5a8596000164cfd |
|
Branch CR29978_try2 has been deleted by inv. SHA-1: da500251ba54fd2faf93c7c9e95a9222637cc8d1 |
|
Branch CR29978 has been deleted by inv. SHA-1: 2eff02bf90d95f108c546b4030191533aaeb3c5a |
occt: master c16c60a4 2018-07-26 07:36:12
Committer: bugmaster Details Diff |
0029978: Data Exchange, macOS - the result of reading some entity from STEP looks odd On Apple with XCode 9.4.1 and onwards, the compiler optimization is disabled for method gp_Mat::Transpose() as optimizer generates invalid code when that method is used. Some refactoring of the code affected by this bug. |
Affected Issues 0029978 |
|
mod - src/gp/gp_Mat.lxx | Diff File | ||
mod - src/gp/gp_Trsf.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-07-23 16:32 |
|
New Issue | |
2018-07-23 16:32 |
|
Assigned To | => ibs |
2018-07-23 16:32 |
|
File Added: trj4_k1_top-ct-203.stp | |
2018-07-23 16:32 |
|
Severity | major => minor |
2018-07-23 16:32 |
|
Status | new => assigned |
2018-07-23 16:33 |
|
File Added: Screen Shot 2018-07-23 at 16.01.48.png | |
2018-07-23 16:33 |
|
File Added: Screen Shot 2018-07-23 at 16.13.39.png | |
2018-07-23 16:53 |
|
Summary | Data Exchange, the result of reading some entity from STEP looks odd => Data Exchange, macOS - the result of reading some entity from STEP looks odd |
2018-07-23 16:53 |
|
Description Updated | |
2018-07-23 22:24 |
|
Note Added: 0077950 | |
2018-07-23 22:47 |
|
Product Version | 7.3.0 => Unscheduled |
2018-07-23 22:47 |
|
Target Version | 7.4.0 => Unscheduled |
2018-07-23 22:48 |
|
Note Added: 0077951 | |
2018-07-24 18:05 |
|
Note Edited: 0077951 | |
2018-07-25 17:40 | git | Note Added: 0078005 | |
2018-07-25 18:34 | git | Note Added: 0078010 | |
2018-07-25 18:51 | git | Note Added: 0078011 | |
2018-07-25 19:14 | git | Note Added: 0078013 | |
2018-07-26 10:43 | git | Note Added: 0078027 | |
2018-07-26 13:16 |
|
Note Added: 0078030 | |
2018-07-26 18:27 | git | Note Added: 0078046 | |
2018-07-26 19:59 | git | Note Added: 0078048 | |
2018-07-26 20:43 | git | Note Added: 0078054 | |
2018-07-27 09:52 | git | Note Added: 0078068 | |
2018-07-27 10:31 |
|
Category | OCCT:Data Exchange => OCCT:Foundation Classes |
2018-07-27 10:31 |
|
Summary | Data Exchange, macOS - the result of reading some entity from STEP looks odd => Foundation Classes, macOS - the result of reading some entity from STEP looks odd |
2018-07-27 11:21 | git | Note Added: 0078073 | |
2018-07-27 11:24 | git | Note Added: 0078074 | |
2018-07-27 11:27 | git | Note Added: 0078075 | |
2018-07-27 19:29 | git | Note Added: 0078118 | |
2018-07-28 12:12 |
|
Note Added: 0078125 | |
2018-07-28 12:12 |
|
Assigned To | ibs => kgv |
2018-07-28 12:12 |
|
Status | assigned => resolved |
2018-07-30 11:35 | kgv | Note Added: 0078174 | |
2018-07-30 11:35 | kgv | Assigned To | kgv => abv |
2018-07-30 11:35 | kgv | Status | resolved => assigned |
2018-07-30 11:35 | kgv | Product Version | Unscheduled => 7.3.0 |
2018-07-30 11:35 | kgv | Target Version | Unscheduled => 7.4.0 |
2018-07-30 23:07 |
|
Note Added: 0078211 | |
2018-07-30 23:07 |
|
Assigned To | abv => kgv |
2018-07-30 23:07 |
|
Status | assigned => resolved |
2018-07-30 23:09 | kgv | Assigned To | kgv => ibs |
2018-07-30 23:09 | kgv | Status | resolved => feedback |
2018-08-02 14:23 |
|
Note Added: 0078318 | |
2018-08-02 14:24 |
|
File Added: failed-test-case.png | |
2018-08-02 14:25 |
|
File Added: successful-test-case.png | |
2018-08-02 14:28 |
|
Note Added: 0078320 | |
2018-08-02 14:28 |
|
Assigned To | ibs => kgv |
2018-08-02 15:14 | kgv | Note Added: 0078321 | |
2018-08-02 15:14 | kgv | Assigned To | kgv => bugmaster |
2018-08-02 15:14 | kgv | Status | feedback => reviewed |
2018-08-02 18:30 | bugmaster | Note Added: 0078335 | |
2018-08-02 18:30 | bugmaster | Status | reviewed => tested |
2018-08-02 18:31 | bugmaster | Test case number | => Not needed |
2018-08-04 16:51 | bugmaster | Changeset attached | => occt master c16c60a4 |
2018-08-04 16:51 | bugmaster | Status | tested => verified |
2018-08-04 16:51 | bugmaster | Resolution | open => fixed |
2018-08-04 17:09 | git | Note Added: 0078386 | |
2018-08-04 17:09 | git | Note Added: 0078389 | |
2018-08-04 17:09 | git | Note Added: 0078390 | |
2018-08-04 17:09 | git | Note Added: 0078391 | |
2018-08-04 17:09 | git | Note Added: 0078393 | |
2018-10-09 22:12 |
|
Relationship added | related to 0029976 |