View Issue Details

IDProjectCategoryView StatusLast Update
0029229Open CASCADEOCCT:Meshpublic2018-06-29 21:19
Reporterdbv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.2.0 
Target Version7.3.0Fixed in Version7.3.0 
Summary0029229: Mesh - Crash at Poly_Triangulation::Normal
DescriptionMethod Poly_Triangulation::Normal crashes due to bad way of construction returning gp_Dir. It creates default gp_Dir(1, 0, 0) and then fills it with methods SetX, SetY, SetZ. Those methods checks resulting norm of vector before changing value and throws exception if it is not good. So if we have normal (0, 0, 1), then Poly_Triangulation::Normal will crash at SetX.
Steps To ReproducePoly_Triangulation tri(1, 1, false);
Handle(TShort_HArray1OfShortReal) normals = new TShort_HArray1OfShortReal(1, 3);
tri.SetNormals(normals);
tri.SetNormal(1, gp_Dir(0, 0, 1));
tri.Normal(1); // Crash
TagsNo tags attached.
Test case numberNot required

Activities

git

2017-10-14 18:15

administrator   ~0071493

Branch CR29229 has been created by dbv.

SHA-1: 4d192d544b6d20ab59babdeeaee83e939ed297d8


Detailed log of new commits:

Author: dbv
Date: Sat Oct 14 18:14:06 2017 +0300

    0029229: Crash at Poly_Triangulation::Normal
    
    Fixed creation of returning gp_Dir

dbv

2017-10-14 18:17

developer   ~0071494

Fixed creation of returning gp_Dir

Dear Sergey, could you please review patch at branch CR29229.

kgv

2017-10-14 19:10

developer   ~0071495

While you near the lines - could you please also fix buggy method definition (erroneous const at returned gp_Dir)?
  const gp_Dir Poly_Triangulation::Normal 

git

2017-10-14 19:24

administrator   ~0071496

Branch CR29229 has been updated forcibly by dbv.

SHA-1: 14f5f9a1e551460b60cffefc7cf48a0b3d202409

dbv

2017-10-14 19:25

developer   ~0071497

Fixed

ssv

2017-10-15 14:42

developer   ~0071499

Reviewed. Please, test and integrate.

bugmaster

2017-10-16 15:10

administrator   ~0071539

Combination -
OCCT branch : CR29229 SHA-1: 14f5f9a1e551460b60cffefc7cf48a0b3d202409
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
No differences that require special attention

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2017-10-23 15:01

administrator   ~0071711

Branch CR29229 has been deleted by kgv.

SHA-1: 14f5f9a1e551460b60cffefc7cf48a0b3d202409

Related Changesets

occt: master 4ea76aea

2017-10-14 15:14:06

dbv


Committer: bugmaster Details Diff
0029229: Crash at Poly_Triangulation::Normal

Fixed creation of returning gp_Dir
Affected Issues
0029229
mod - src/Poly/Poly_Triangulation.cxx Diff File
mod - src/Poly/Poly_Triangulation.hxx Diff File

Issue History

Date Modified Username Field Change
2017-10-14 18:12 dbv New Issue
2017-10-14 18:12 dbv Assigned To => dbv
2017-10-14 18:12 dbv Status new => assigned
2017-10-14 18:15 git Note Added: 0071493
2017-10-14 18:17 dbv Note Added: 0071494
2017-10-14 18:17 dbv Assigned To dbv => ssv
2017-10-14 18:17 dbv Status assigned => resolved
2017-10-14 19:05 kgv Summary Crash at Poly_Triangulation::Normal => Mesh - Crash at Poly_Triangulation::Normal
2017-10-14 19:08 kgv Product Version 7.3.0 => 7.2.0
2017-10-14 19:08 kgv Target Version 7.4.0 => 7.3.0
2017-10-14 19:10 kgv Note Added: 0071495
2017-10-14 19:24 git Note Added: 0071496
2017-10-14 19:25 dbv Note Added: 0071497
2017-10-15 14:42 ssv Note Added: 0071499
2017-10-15 14:42 ssv Assigned To ssv => bugmaster
2017-10-15 14:42 ssv Status resolved => reviewed
2017-10-16 15:06 bugmaster Test case number => Not required
2017-10-16 15:10 bugmaster Note Added: 0071539
2017-10-16 15:10 bugmaster Status reviewed => tested
2017-10-19 19:11 bugmaster Changeset attached => occt master 4ea76aea
2017-10-19 19:11 bugmaster Status tested => verified
2017-10-19 19:11 bugmaster Resolution open => fixed
2017-10-23 15:01 git Note Added: 0071711
2018-06-29 21:15 aiv Fixed in Version => 7.3.0
2018-06-29 21:19 aiv Status verified => closed