View Issue Details

IDProjectCategoryView StatusLast Update
0029304Open CASCADEOCCT:DRAWpublic2018-06-29 21:19
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.3.1 
Target Version7.3.0Fixed in Version7.3.0 
Summary0029304: Draw Harness, DBRep_DrawableShape - fix inappropriate use of unordered map
DescriptionDBRep_DrawableShape::display() for Poly_Triangulation misuses TColStd_DataMapOfIntegerInteger for collecting pairs of edge indices, which does not make sense (edges are added in strict order, thus map is not uses as map for lookup) and broken (iteration order through map is undefined).

  // array is replaced on map because it is impossible
  // to calculate number of internal edges in advance
  // due to "internal edges"
  TColStd_DataMapOfIntegerInteger Internal;
...
    Internal.Bind(in, n[j]);
    Internal.Bind(in+1, n[k]);
    in += 2;
...
  TColStd_DataMapIteratorOfDataMapOfIntegerInteger aIt(Internal);
  for (; aIt.More(); aIt.Next()) {
    Standard_Integer n1 = aIt.Value();
    aIt.Next();
    Standard_Integer n2 = aIt.Value();
    dis.Draw(Nodes(n1).Transformed(tr),
         Nodes(n2).Transformed(tr));


The issue has been introduced by fix for 0020515.

The problem has been found while testing fix for 0029302, when suddenly a couple of image differences has been observed (improvements) without a reason (see also screenshots for #0028996).
The difference was caused by removed saturated property of map, since in these cases map Extent exceeded number of Buckets (Internal.Extent()=1529856; NbBuckets: 995329).
Steps To ReproduceTest cases:
de_mesh stl_read B4
emesh standard E7
emesh standard E8
emesh bugs bug25995_2
TagsNo tags attached.
Test case numberNot required

Relationships

related to 0029302 closedbugmaster Open CASCADE Foundation Classes, NCollection - optimize iteration of indexed maps 
child of 0020515 closedszy Open CASCADE OCC parallelization 

Activities

git

2017-11-09 10:20

administrator   ~0072098

Branch CR29304 has been created by kgv.

SHA-1: 6a91e0356d2ba24a0654add0dbcd7fe52ac08fe7


Detailed log of new commits:

Author: kgv
Date: Thu Nov 9 10:18:49 2017 +0300

    0029304: Draw Harness, DBRep_DrawableShape - fix inappropriate use of unordered map
    
    TColStd_DataMapOfIntegerInteger has been replaced by NCollection_Vector.

kgv

2017-11-09 10:20

developer   ~0072099

Patch is ready for review.

abv

2017-11-09 11:56

manager   ~0072107

No remarks, please test

bugmaster

2017-11-09 13:29

administrator   ~0072115

Combination -
OCCT branch : CR29304 SHA-1: 6a91e0356d2ba24a0654add0dbcd7fe52ac08fe7
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:
Linux:
OCCT
Total CPU difference: 20702.030000000468 / 20729.730000000465 [-0.13%]
Products
Total CPU difference: 7916.560000000107 / 7934.890000000088 [-0.23%]
Windows:
OCCT
Total CPU difference: 18721.087206198503 / 18506.86663299847 [+1.16%]
Products
Total CPU difference: 7984.583582899948 / 7981.338762099939 [+0.04%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2017-11-10 12:15

administrator   ~0072163

Branch CR29304 has been deleted by kgv.

SHA-1: 6a91e0356d2ba24a0654add0dbcd7fe52ac08fe7

Related Changesets

occt: master 182bd7bc

2017-11-09 07:18:49

kgv


Committer: bugmaster Details Diff
0029304: Draw Harness, DBRep_DrawableShape - fix inappropriate use of unordered map

TColStd_DataMapOfIntegerInteger has been replaced by NCollection_Vector.
Affected Issues
0029304
mod - src/DBRep/DBRep_DrawableShape.cxx Diff File

Issue History

Date Modified Username Field Change
2017-11-09 10:16 kgv New Issue
2017-11-09 10:16 kgv Assigned To => kgv
2017-11-09 10:16 kgv Product Version 7.2.0 => 6.3.1
2017-11-09 10:16 kgv Relationship added child of 0020515
2017-11-09 10:17 kgv Description Updated
2017-11-09 10:17 kgv Relationship added related to 0029302
2017-11-09 10:20 git Note Added: 0072098
2017-11-09 10:20 kgv Note Added: 0072099
2017-11-09 10:20 kgv Assigned To kgv => abv
2017-11-09 10:20 kgv Status new => resolved
2017-11-09 10:25 kgv Description Updated
2017-11-09 10:26 kgv Steps to Reproduce Updated
2017-11-09 10:33 kgv Description Updated
2017-11-09 10:37 kgv Steps to Reproduce Updated
2017-11-09 10:38 kgv Description Updated
2017-11-09 11:56 abv Note Added: 0072107
2017-11-09 11:56 abv Assigned To abv => bugmaster
2017-11-09 11:56 abv Status resolved => reviewed
2017-11-09 12:47 bugmaster Test case number => Not required
2017-11-09 13:29 bugmaster Note Added: 0072115
2017-11-09 13:29 bugmaster Status reviewed => tested
2017-11-10 10:13 bugmaster Changeset attached => occt master 182bd7bc
2017-11-10 10:13 bugmaster Status tested => verified
2017-11-10 10:13 bugmaster Resolution open => fixed
2017-11-10 12:15 git Note Added: 0072163
2018-02-20 12:58 aiv Target Version 7.4.0 => 7.3.0
2018-06-29 21:15 aiv Fixed in Version => 7.3.0
2018-06-29 21:19 aiv Status verified => closed