MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026348Community[OCCT] OCCT:Visualizationpublic2015-06-17 12:462016-04-20 15:50
Reporterabv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.0.0Fixed in Version[OCCT] 7.0.0 
Summary0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix
DescriptionThe issue has been reported in OCE mailing list: in three places in OpenGl_View_Raytrace.cxx, array is compared against NULL, which should be always false:

OpenGl_View_Raytrace.cxx: if (theStructure->Transformation()->mat != NULL)
OpenGl_View_Raytrace.cxx: theStructure->Transformation()->mat ? aStructTransform : NULL, theGlContext);
OpenGl_View_Raytrace.cxx: theStructure->Transformation()->mat ? aStructTransform : NULL, theGlContext);

Here mat is a field (array) of the class OpenGl_Matrix, hence compiler (CLang) can assume it is always non-null.

It is likely that result of Transformation() should be compared against NULL instead (i.e. just remove "->mat"), to be checked.
Steps To ReproduceCompile with CLang (?)
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships

-  Notes
(0048466)
git (administrator)
2015-11-23 12:35

Branch CR26348 has been created by kgv.

SHA-1: 8b6da609f6c03747af0ac90d5296cbf5d6b866c6


Detailed log of new commits:

Author: osa
Date: Mon Nov 23 12:34:50 2015 +0300

    0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix
    
    Graphic3d_CStructure::Transformation - use Graphic3d_Mat4 instead of plain arrays.
    Drop duplicating field OpenGl_Structure::myTransformation (copy of Graphic3d_CStructure::Transformation).
    Drop unused property Graphic3d_CStructure::Composition and Graphic3d_Structure::Composition().
(0048467)
kgv (developer)
2015-11-23 12:35

Please test the patch.
(0048518)
apv (tester)
2015-11-24 15:14

Dear BugMaster,

Branch CR26348 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 8b6da609f6c03747af0ac90d5296cbf5d6b866c6

Number of compiler warnings:
occt component:
   Linux: 1 (0 on master)
   Windows: 0 (0 on master)
   MacOS: 128 (127 on master)
products component:
   Linux: 39 (39 on master)
   Windows: 0 (0 on master)
There is new additional warnings on Linux and MacOS:
Graphic3d_Structure.cxx:1561, GNU C Compiler 4 (gcc), Priority: Normal
suggest parentheses around '&&' within '||' [-Wparentheses]

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 92891480 / 93581960 [-0.74%]
Total CPU difference: 19956.579999999853 / 19980.499999999956 [-0.12%]

Testing on Windows:
Total MEMORY difference: 58363630 / 58376964 [-0.02%]
Total CPU difference: 18159.655207298943 / 18194.31862949887 [-0.19%]
(0048519)
apv (tester)
2015-11-24 15:15

Dear kgv,

Branch CR26348 has been rejected due to:
- additional warnings
(0048521)
git (administrator)
2015-11-24 15:24

Branch CR26348 has been updated by kgv.

SHA-1: 77812acade38cb382815035eb2a99e5df033e824


Detailed log of new commits:

Author: kgv
Date: Tue Nov 24 15:24:34 2015 +0300

    eliminate new compiler warning

(0048523)
git (administrator)
2015-11-24 15:27

Branch CR26348_1 has been created by kgv.

SHA-1: ee4b1cbdbf62ef98eb12b74a10b9c320ab585d71


Detailed log of new commits:

Author: osa
Date: Tue Nov 24 15:26:34 2015 +0300

    0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix
    
    Graphic3d_CStructure::Transformation - use Graphic3d_Mat4 instead of plain arrays.
    Drop duplicating field OpenGl_Structure::myTransformation (copy of Graphic3d_CStructure::Transformation).
    Drop unused property Graphic3d_CStructure::Composition and Graphic3d_Structure::Composition().
(0048524)
kgv (developer)
2015-11-24 15:28

Please check compilation of updated patch in branch CR26348_1, regression testing is not needed.
(0048534)
git (administrator)
2015-11-24 17:11

Branch CR26348_1 has been updated forcibly by apv.

SHA-1: 67ac1edd913e5fa29fa9c5c898243ff99a96cbaa
(0048535)
apv (tester)
2015-11-24 17:12

Branch CR26348_1 has been rebased on the current master
(0048564)
apv (tester)
2015-11-25 14:25

Dear BugMaster,

Branch CR26348_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms.
SHA-1: 67ac1edd913e5fa29fa9c5c898243ff99a96cbaa

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MacOS: 134 (134 on master)
products component:
   Linux: 39 (39 on master)
   Windows: 0 (0 on master)
(0053048)
git (administrator)
2016-04-17 14:07

Branch CR26348 has been deleted by kgv.

SHA-1: 77812acade38cb382815035eb2a99e5df033e824
(0053049)
git (administrator)
2016-04-17 14:07

Branch CR26348_1 has been deleted by kgv.

SHA-1: 67ac1edd913e5fa29fa9c5c898243ff99a96cbaa

- Related Changesets
occt: master 6bd94e0d
Timestamp: 2015-11-24 12:26:34
Author: osa
Committer: bugmaster
Details ] Diff ]
0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix

Graphic3d_CStructure::Transformation - use Graphic3d_Mat4 instead of plain arrays.
Drop duplicating field OpenGl_Structure::myTransformation (copy of Graphic3d_CStructure::Transformation).
Drop unused property Graphic3d_CStructure::Composition and Graphic3d_Structure::Composition().
mod - src/Graphic3d/Graphic3d_CStructure.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_CStructure.hxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_Structure.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_Structure.hxx Diff ] File ]
mod - src/OpenGl/FILES Diff ] File ]
rm - src/OpenGl/OpenGl_Matrix.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Matrix.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Structure.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Structure.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_StructureShadow.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_View.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_View_Raytrace.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-06-17 12:46 abv New Issue
2015-06-17 12:46 abv Assigned To => kgv
2015-06-17 13:29 kgv Relationship added related to 0024393
2015-11-17 16:08 kgv Target Version 7.0.0 => 7.1.0
2015-11-23 10:05 kgv Status new => assigned
2015-11-23 10:05 kgv Target Version 7.1.0 => 7.0.0
2015-11-23 10:05 kgv Summary Incorrect comparisons in OpenGl_View_Raytrace.cxx => Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix
2015-11-23 12:35 git Note Added: 0048466
2015-11-23 12:35 kgv Note Added: 0048467
2015-11-23 12:35 kgv Assigned To kgv => bugmaster
2015-11-23 12:35 kgv Status assigned => resolved
2015-11-23 12:35 kgv Status resolved => reviewed
2015-11-23 15:58 apv Assigned To bugmaster => apv
2015-11-24 15:11 apv Test case number => Not needed
2015-11-24 15:14 apv Note Added: 0048518
2015-11-24 15:14 apv Assigned To apv => kgv
2015-11-24 15:14 apv Status reviewed => assigned
2015-11-24 15:15 apv Note Added: 0048519
2015-11-24 15:24 git Note Added: 0048521
2015-11-24 15:27 git Note Added: 0048523
2015-11-24 15:28 kgv Note Added: 0048524
2015-11-24 15:28 kgv Assigned To kgv => bugmaster
2015-11-24 15:28 kgv Status assigned => resolved
2015-11-24 15:28 kgv Status resolved => reviewed
2015-11-24 16:59 apv Assigned To bugmaster => apv
2015-11-24 17:11 git Note Added: 0048534
2015-11-24 17:12 apv Note Added: 0048535
2015-11-25 14:25 apv Note Added: 0048564
2015-11-25 14:25 apv Assigned To apv => bugmaster
2015-11-25 14:25 apv Status reviewed => tested
2015-11-27 12:21 bugmaster Changeset attached => occt master 6bd94e0d
2015-11-27 12:21 bugmaster Status tested => verified
2015-11-27 12:21 bugmaster Resolution open => fixed
2016-04-17 14:07 git Note Added: 0053048
2016-04-17 14:07 git Note Added: 0053049
2016-04-20 15:42 user533 Fixed in Version => 7.0.0
2016-04-20 15:50 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker