View Issue Details

IDProjectCategoryView StatusLast Update
0029978Open CASCADEOCCT:Foundation Classespublic2018-10-09 22:12
ReporteribsAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Platformx86-64OSmacos 
Product Version7.3.0 
Target Version7.4.0Fixed in Version7.4.0 
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

  • trj4_k1_top-ct-203.stp (129,218 bytes)
  • Screen Shot 2018-07-23 at 16.01.48.png (34,301 bytes)
  • Screen Shot 2018-07-23 at 16.13.39.png (41,792 bytes)
  • failed-test-case.png (140,385 bytes)
  • successful-test-case.png (153,443 bytes)

Relationships

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

Activities

ibs

2018-07-23 16:32

developer  

trj4_k1_top-ct-203.stp (129,218 bytes)

ibs

2018-07-23 16:33

developer  

Screen Shot 2018-07-23 at 16.01.48.png (34,301 bytes)

ibs

2018-07-23 16:33

developer  

Screen Shot 2018-07-23 at 16.13.39.png (41,792 bytes)

abv

2018-07-23 22:24

manager   ~0077950

The problem is not reproduced on Ubuntu 16.04 with Clang 6.0

ibs

2018-07-23 22:48

developer   ~0077951

Last edited: 2018-07-24 18:05

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

git

2018-07-25 17:40

administrator   ~0078005

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

git

2018-07-25 18:34

administrator   ~0078010

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

git

2018-07-25 18:51

administrator   ~0078011

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

git

2018-07-25 19:14

administrator   ~0078013

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

git

2018-07-26 10:43

administrator   ~0078027

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

abv

2018-07-26 13:16

manager   ~0078030

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.

git

2018-07-26 18:27

administrator   ~0078046

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

git

2018-07-26 19:59

administrator   ~0078048

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

git

2018-07-26 20:43

administrator   ~0078054

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.

git

2018-07-27 09:52

administrator   ~0078068

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.

git

2018-07-27 11:21

administrator   ~0078073

Branch CR29978_fix2 has been updated forcibly by abv.

SHA-1: 44b6e50a8a95ce7fa8aa6be5f5a8596000164cfd

git

2018-07-27 11:24

administrator   ~0078074

Branch CR29978_fix has been updated forcibly by abv.

SHA-1: 8e70c900e99acbd4d3a14437e2cd7fed3521510e

git

2018-07-27 11:27

administrator   ~0078075

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

git

2018-07-27 19:29

administrator   ~0078118

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.

abv

2018-07-28 12:12

manager   ~0078125

Working version of the fix is pushed to CR29978_fix3, please review. Test results are in Jenkins job CR29978-master-abv.

kgv

2018-07-30 11:35

developer   ~0078174

Please refer existing Draw Harness test case reproducing the problem or push a new test case to the branch.

abv

2018-07-30 23:07

manager   ~0078211

test de step_1 V7 should be relevant test case; please ask Ivan to check this on buggy build

ibs

2018-08-02 14:23

developer   ~0078318

test de step_1 V7 is a relevant test case

ibs

2018-08-02 14:24

developer  

failed-test-case.png (140,385 bytes)

ibs

2018-08-02 14:25

developer  

successful-test-case.png (153,443 bytes)

ibs

2018-08-02 14:28

developer   ~0078320

I have attached two screenshots showing the difference between 'GOOD and EVIL'

kgv

2018-08-02 15:14

developer   ~0078321

OK, please queue the patch.

bugmaster

2018-08-02 18:30

administrator   ~0078335

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

git

2018-08-04 17:09

administrator   ~0078386

Branch CR29978_fix3 has been deleted by inv.

SHA-1: e83656c75887d960e2e8054cf3fbe1ffbc4aacf8

git

2018-08-04 17:09

administrator   ~0078389

Branch CR29978_fix has been deleted by inv.

SHA-1: 79d45b37bddf03f2990eacba71bbe050ead68542

git

2018-08-04 17:09

administrator   ~0078390

Branch CR29978_fix2 has been deleted by inv.

SHA-1: 44b6e50a8a95ce7fa8aa6be5f5a8596000164cfd

git

2018-08-04 17:09

administrator   ~0078391

Branch CR29978_try2 has been deleted by inv.

SHA-1: da500251ba54fd2faf93c7c9e95a9222637cc8d1

git

2018-08-04 17:09

administrator   ~0078393

Branch CR29978 has been deleted by inv.

SHA-1: 2eff02bf90d95f108c546b4030191533aaeb3c5a

Related Changesets

occt: master c16c60a4

2018-07-26 07:36:12

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.
Affected Issues
0029978
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
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
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