MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029304Open CASCADE[OCCT] OCCT:DRAWpublic2017-11-09 10:162018-06-29 21:19
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.3.1 
Target Version[OCCT] 7.3.0Fixed in Version[OCCT] 7.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
Attached Files

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

-  Notes
(0072098)
git (administrator)
2017-11-09 10:20

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.
(0072099)
kgv (developer)
2017-11-09 10:20

Patch is ready for review.
(0072107)
abv (manager)
2017-11-09 11:56

No remarks, please test
(0072115)
bugmaster (administrator)
2017-11-09 13:29

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
(0072163)
git (administrator)
2017-11-10 12:15

Branch CR29304 has been deleted by kgv.

SHA-1: 6a91e0356d2ba24a0654add0dbcd7fe52ac08fe7

- Related Changesets
occt: master 182bd7bc
Timestamp: 2017-11-09 07:18:49
Author: kgv
Committer: bugmaster
Details ] Diff ]
0029304: Draw Harness, DBRep_DrawableShape - fix inappropriate use of unordered map

TColStd_DataMapOfIntegerInteger has been replaced by NCollection_Vector.
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 View Revisions
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 View Revisions
2017-11-09 10:26 kgv Steps to Reproduce Updated View Revisions
2017-11-09 10:30 kgv Relationship added has duplicate 0028996
2017-11-09 10:33 kgv Description Updated View Revisions
2017-11-09 10:37 kgv Steps to Reproduce Updated View Revisions
2017-11-09 10:38 kgv Description Updated View Revisions
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 user533 Target Version 7.4.0* => 7.3.0
2018-06-29 21:15 user533 Fixed in Version => 7.3.0
2018-06-29 21:19 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker