MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029978Open CASCADE[OCCT] OCCT:Foundation Classespublic2018-07-23 16:322018-10-09 22:12
Reporteribs 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
Platformx86-64OSmacosOS Version10.13.6
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0029978: Foundation Classes, macOS - the result of reading some entity from STEP looks odd
DescriptionThe 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 Reproducestepread trj4_k1_top-ct-203.stp a 1288
small
donly a_1
fit
TagsNo tags attached.
Test case numberNot needed
Attached Files? file icon trj4_k1_top-ct-203.stp (129,218 bytes) 2018-07-23 16:32
png file icon Screen Shot 2018-07-23 at 16.01.48.png (34,301 bytes) 2018-07-23 16:33
png file icon Screen Shot 2018-07-23 at 16.13.39.png (41,792 bytes) 2018-07-23 16:33
png file icon failed-test-case.png (140,385 bytes) 2018-08-02 14:24
png file icon successful-test-case.png (153,443 bytes) 2018-08-02 14:25

- Relationships
related to 0029976closedbugmaster Community Regession from 7.2.0 on osx Faces created from gp_Cir have incorrect location 

-  Notes
(0077950)
abv (manager)
2018-07-23 22:24

The problem is not reproduced on Ubuntu 16.04 with Clang 6.0
(0077951)
ibs (developer)
2018-07-23 22:48
edited on: 2018-07-24 18:05

The problem isn't reproduced on macos 10.13.6 on IR-2018-07-20 (Debug)

(0078005)
git (administrator)
2018-07-25 17:40

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
(0078010)
git (administrator)
2018-07-25 18:34

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

(0078011)
git (administrator)
2018-07-25 18:51

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

(0078013)
git (administrator)
2018-07-25 19:14

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

(0078027)
git (administrator)
2018-07-26 10:43

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
(0078030)
abv (manager)
2018-07-26 13:16

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.
(0078046)
git (administrator)
2018-07-26 18:27

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
(0078048)
git (administrator)
2018-07-26 19:59

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

(0078054)
git (administrator)
2018-07-26 20:43

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.

(0078068)
git (administrator)
2018-07-27 09:52

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.
(0078073)
git (administrator)
2018-07-27 11:21

Branch CR29978_fix2 has been updated forcibly by abv.

SHA-1: 44b6e50a8a95ce7fa8aa6be5f5a8596000164cfd
(0078074)
git (administrator)
2018-07-27 11:24

Branch CR29978_fix has been updated forcibly by abv.

SHA-1: 8e70c900e99acbd4d3a14437e2cd7fed3521510e
(0078075)
git (administrator)
2018-07-27 11:27

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

(0078118)
git (administrator)
2018-07-27 19:29

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.
(0078125)
abv (manager)
2018-07-28 12:12

Working version of the fix is pushed to CR29978_fix3, please review. Test results are in Jenkins job CR29978-master-abv.
(0078174)
kgv (developer)
2018-07-30 11:35

Please refer existing Draw Harness test case reproducing the problem or push a new test case to the branch.
(0078211)
abv (manager)
2018-07-30 23:07

test de step_1 V7 should be relevant test case; please ask Ivan to check this on buggy build
(0078318)
ibs (developer)
2018-08-02 14:23

test de step_1 V7 is a relevant test case
(0078320)
ibs (developer)
2018-08-02 14:28

I have attached two screenshots showing the difference between 'GOOD and EVIL'
(0078321)
kgv (developer)
2018-08-02 15:14

OK, please queue the patch.
(0078335)
bugmaster (administrator)
2018-08-02 18:30

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
(0078386)
git (administrator)
2018-08-04 17:09

Branch CR29978_fix3 has been deleted by inv.

SHA-1: e83656c75887d960e2e8054cf3fbe1ffbc4aacf8
(0078389)
git (administrator)
2018-08-04 17:09

Branch CR29978_fix has been deleted by inv.

SHA-1: 79d45b37bddf03f2990eacba71bbe050ead68542
(0078390)
git (administrator)
2018-08-04 17:09

Branch CR29978_fix2 has been deleted by inv.

SHA-1: 44b6e50a8a95ce7fa8aa6be5f5a8596000164cfd
(0078391)
git (administrator)
2018-08-04 17:09

Branch CR29978_try2 has been deleted by inv.

SHA-1: da500251ba54fd2faf93c7c9e95a9222637cc8d1
(0078393)
git (administrator)
2018-08-04 17:09

Branch CR29978 has been deleted by inv.

SHA-1: 2eff02bf90d95f108c546b4030191533aaeb3c5a

- Related Changesets
occt: master c16c60a4
Timestamp: 2018-07-26 07:36:12
Author: abv
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.
mod - src/gp/gp_Mat.lxx Diff ] File ]
mod - src/gp/gp_Trsf.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2018-07-23 16:32 ibs New Issue
2018-07-23 16:32 ibs Assigned To => ibs
2018-07-23 16:32 ibs File Added: trj4_k1_top-ct-203.stp
2018-07-23 16:32 ibs Severity major => minor
2018-07-23 16:32 ibs Status new => assigned
2018-07-23 16:33 ibs File Added: Screen Shot 2018-07-23 at 16.01.48.png
2018-07-23 16:33 ibs File Added: Screen Shot 2018-07-23 at 16.13.39.png
2018-07-23 16:53 abv 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 abv Description Updated View Revisions
2018-07-23 22:24 abv Note Added: 0077950
2018-07-23 22:47 ibs Product Version 7.3.0 => Unscheduled
2018-07-23 22:47 ibs Target Version 7.4.0* => Unscheduled
2018-07-23 22:48 ibs Note Added: 0077951
2018-07-24 18:05 ibs Note Edited: 0077951 View Revisions
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 abv 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 abv Category OCCT:Data Exchange => OCCT:Foundation Classes
2018-07-27 10:31 abv 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 abv Note Added: 0078125
2018-07-28 12:12 abv Assigned To ibs => kgv
2018-07-28 12:12 abv 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 abv Note Added: 0078211
2018-07-30 23:07 abv Assigned To abv => kgv
2018-07-30 23:07 abv 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 ibs Note Added: 0078318
2018-08-02 14:24 ibs File Added: failed-test-case.png
2018-08-02 14:25 ibs File Added: successful-test-case.png
2018-08-02 14:28 ibs Note Added: 0078320
2018-08-02 14:28 ibs 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 abv Relationship added related to 0029976


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker