View Issue Details

IDProjectCategoryView StatusLast Update
0027317Open CASCADEOCCT:Visualizationpublic2016-12-09 16:37
ReporterifvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.0.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027317: Visualization - add protection against possible floating point overflows in BVH trees
DescriptionProblem appears only for branch CR26329, which is dedicated to restoring floating point signals.
Tests
bugs vis bug6652, bug10702, bug26566,
v3d mesh A1 - A4, B2 - B5
have common reason:
Signal is generated in method
void BVH_BinnedBuilder<T, N, Bins>::GetSubVolumes (...), line 63:
    Standard_Integer aBinIndex = BVH::IntFloor<T> (
      (theSet->Center (anIdx, theAxis) - aMin) * anInverseStep);
because method theSet->Center(...) uses method
gp_Pnt Select3D_SensitiveSet::CenterOfGeometry() const
{
  return gp_Pnt (RealLast(), RealLast(), RealLast());
}
---
Test bugs vis bug25767 generates exeption in
OpenGl_BVHClipPrimitiveSet::Center(...)
because one of component of CornerMin or CornerMax of BndBox is FLOAT_MAX.
FLOAT_MAX is reduced coordinate of point
vpoint p2 8.4813999999999999e+102 117.1230001 128.35480981703273, which is used in test.
  
Steps To ReproduceSwitch to CR26329 and run tests
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0026329 closedkgv Restore floating point signals handling in DRAW 

Activities

git

2016-05-20 16:50

administrator   ~0054256

Branch CR27317 has been created by vpa.

SHA-1: 9158415ed4de68bc9a3349c08e10f68971f539aa


Detailed log of new commits:

Author: vpa
Date: Fri May 20 16:45:16 2016 +0300

    0027317: Some visualisation tests failed because of exceptions generated by FP signals.
    
    - missing implementation of CenterOfGeometry method was added in MeshVS_CommonSensitiveEntity;
    - a check to prevent float overflow was added to OpenGl_BVHClipPrimitiveSet::Center.

vpa

2016-05-20 16:51

developer   ~0054257

Dear Kirill,

please review patch in branch CR27317.

git

2016-05-20 16:54

administrator   ~0054258

Branch CR27317 has been updated forcibly by vpa.

SHA-1: 5bd100daa4827f003377cd9b6416a09c66cfab61

git

2016-05-20 19:42

administrator   ~0054259

Branch CR27317 has been updated forcibly by vpa.

SHA-1: a3c568d5626f750f965966980e2fa138b2ae9a09

vpa

2016-05-20 20:55

developer   ~0054260

The fix for the issue includes additional check in OpenGl_BVHClipPrimitiveSet::Center method, that has negative impact on building BVH tree for frustum culling. However the difference is not sufficient - the downgrade is about 2-5% (for example, BVH build for 1000 spheres took 0.00315067160408944 secs without a patch and 0.00319643085822463 with the patch).

msv

2016-05-20 23:04

developer   ~0054261

I think this check can be avoided, since you removed the source of error - implemented missing virtual method.

vpa

2016-05-23 12:26

developer   ~0054275

Last edited: 2016-05-23 12:37

Dear Mikhail,

implementation of missing virtual method resolves the issue only partially - it fixes float overflow in selection of MeshVS objects. The check is required to handle objects with huge coordinates in frustum culling (like points generated in bugs vis bug25767).

kgv

2016-05-23 12:37

developer   ~0054276

Please test the patch.

mkv

2016-05-23 19:19

tester   ~0054311

Dear vpa,
could you please rebase branch CR27317 on current master, there are conflict files.

mkv

2016-05-23 19:42

tester   ~0054314

Dear ifv,
could you please rebase branch CR26329 (from occt git-repository) and CR26329prod on current masters, there are conflict files.

git

2016-05-24 17:13

administrator   ~0054364

Branch CR27317 has been updated forcibly by vpa.

SHA-1: 3630439136e1c3e8af131c405613e1b5cf6e3fcd

vpa

2016-05-24 17:14

developer   ~0054365

Dear Mikhail,

please test updated patch in branch CR27317.

mkv

2016-05-25 16:14

tester   ~0054400

Dear BugMaster,
Branch CR27317 from occt git-repository (and CR26329prod from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 3630439136e1c3e8af131c405613e1b5cf6e3fcd
SHA-1: f0131940f52c109f3b55f923d62a4f8ce57c71f6

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 73 (72 on master)
Windows: 5 (4 on master)
MacOS : 1137

There is new additional compilation warning on Linux platform:
http://jenkins-test-07.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_13912/job/CR27317-CR26329prod-Products-Debian70-64-opt-compile/1/warnings17Result/package.-542137128/
QMShape_Tessellator.cxx:1738, GNU C Compiler 4 (gcc), Priority: Normal
unused variable 'tol2' [-Wunused-variable]

There are new additional compilation warnings on Windows platform:
http://jenkins-test-07.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_13912/job/CR27317-CR26329prod-Products-Windows-64-VC10-opt-compile/1/warnings34Result/package.1690353035/
QMShape_Tessellator.cxx:1738, MSBuild, Priority: Normal
'tol2' : unreferenced local variable

Regressions/Differences/Improvements:
http://occt-tests/CR27317-CR26329prod-OCCT/Debian70-64/bugs/fclasses/bug6143.html
 bugs fclasses bug6143: FAILED

http://occt-tests/CR27317-CR26329prod-OCCT/Windows-64-VC10/summary.html
Improvements:
  offset with_intersect_80 J9
Failed:
  boolean volumemaker A3
  bugs modalg_4 bug6725
  bugs moddata_1 bug22759
  de step_3 D7
  mesh advanced_incmesh B2, B3, B7, C2
  mesh advanced_incmesh_parallel B2, B3, B7, C2
  mesh advanced_mesh B2, B3, B7, C2
  mesh advanced_shading B2, B3, B7
  mesh standard_incmesh B4, B8, Q1, T9, U7, W9
  mesh standard_incmesh_parallel B4, B8, Q1, T9, U7, W9
  mesh standard_mesh B4, B8, Q1, T9, U7, W9
  mesh standard_shading B8, Q1, Q6, T9, U7, W9

http://occt-tests/CR27317-CR26329prod-Products/Debian70-64/summary.html
http://occt-tests/CR27317-CR26329prod-Products/Windows-64-VC10/summary.html
Failed:
  bfit pnt100 A4
  bfit pnt1000 A4
  bfit pnt10000 A4
  emesh bugs bug26326_1
  emesh standard E9, F1
  omf advanced_meshcut H1, M4, Z4, Z5

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 88061436 / 89064838 [-1.13%]
Total CPU difference: 19413.140000000098 / 19269.00999999994 [+0.75%]
products component :
Total MEMORY difference: 27445735 / 27776829 [-1.19%]
Total CPU difference: 5210.629999999989 / 5173.819999999993 [+0.71%]

Testing on Windows:
occt component :
Total MEMORY difference: 54907371 / 54920247 [-0.02%]
Total CPU difference: 17821.913042298922 / 17945.824636598914 [-0.69%]
products component :
Total MEMORY difference: 18851865 / 18817135 [+0.18%]
Total CPU difference: 5005.276484899946 / 5000.222052499956 [+0.10%]

There are following differences in images found by testdiff.
http://occt-tests/CR27317-CR26329prod-OCCT/Windows-64-VC10/diff-Windows-64-VC10.html
IMAGE v3d mesh B7: B7_vct1.png differs
IMAGE bugs iges bug22715_2: bug22715_2.png differs
IMAGE bugs modalg_2 bug22727: bug22727.png differs
IMAGE bugs modalg_6 bug26513: bug26513.png differs

http://occt-tests/CR27317-CR26329prod-Products/Windows-64-VC10/diff-Windows-64-VC10.html
IMAGE emesh bugs bug26326_1: bug26326_1.png differs

mkv

2016-05-25 16:14

tester   ~0054401

Dear vpa,
Branch CR27317 has been rejected due to:
- additional warnings
- regressions/differences/improvements
- differences in images

git

2016-05-25 16:25

administrator   ~0054403

Branch CR27317_1 has been created by kgv.

SHA-1: 4a715e33d95ead5b382e62e81b0dcc289ebd4483


Detailed log of new commits:

Author: vpa
Date: Fri May 20 19:42:09 2016 +0300

    0027317: Some visualisation tests failed because of exceptions generated by FP signals.
    
    - missing implementation of CenterOfGeometry method was added in MeshVS_CommonSensitiveEntity;
    - a check to prevent float overflow was added to OpenGl_BVHClipPrimitiveSet::Center.

kgv

2016-05-25 16:27

developer   ~0054404

Last edited: 2016-05-25 16:30

The main issue is solved within the patch - there are no regressions related to FPE from Visualization.
Other regressions come from the parent patch (0026329) which is not yet completed.

Please test detached patch to this bug in branch CR27317_1 (no Products) and integrate.

mkv

2016-05-26 12:25

tester   ~0054434

Dear BugMaster,
Branch CR27317_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 4a715e33d95ead5b382e62e81b0dcc289ebd4483

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 72 (72 on master)
Windows: 4 (4 on master)
MacOS : 1140

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 88897952 / 89054196 [-0.18%]
Total CPU difference: 19334.590000000015 / 19271.49999999995 [+0.33%]
products component :
Total MEMORY difference: 27802632 / 27861271 [-0.21%]
Total CPU difference: 5208.509999999994 / 5214.419999999994 [-0.11%]

Testing on Windows:
occt component :
Total MEMORY difference: 55782829 / 55815545 [-0.06%]
Total CPU difference: 17929.02332889895 / 18217.047975198915 [-1.58%]
products component :
Total MEMORY difference: 18925930 / 18892847 [+0.18%]
Total CPU difference: 4997.585635599952 / 5031.9838560999515 [-0.68%]

There are no differences in images found by testdiff.

mkv

2016-05-26 12:25

tester   ~0054435

Dear BugMaster,
Branch CR27317_1 is TESTED.

git

2016-05-27 13:09

administrator   ~0054469

Branch CR27317 has been deleted by inv.

SHA-1: 3630439136e1c3e8af131c405613e1b5cf6e3fcd

git

2016-05-27 13:09

administrator   ~0054470

Branch CR27317_1 has been deleted by inv.

SHA-1: 4a715e33d95ead5b382e62e81b0dcc289ebd4483

Related Changesets

occt: master 41e08b4d

2016-05-20 16:42:09

vpa


Committer: bugmaster Details Diff
0027317: Some visualisation tests failed because of exceptions generated by FP signals.

- missing implementation of CenterOfGeometry method was added in MeshVS_CommonSensitiveEntity;
- a check to prevent float overflow was added to OpenGl_BVHClipPrimitiveSet::Center.
Affected Issues
0027317
mod - src/MeshVS/MeshVS_CommonSensitiveEntity.cxx Diff File
mod - src/MeshVS/MeshVS_CommonSensitiveEntity.hxx Diff File
mod - src/OpenGl/OpenGl_BVHClipPrimitiveSet.cxx Diff File

Issue History

Date Modified Username Field Change
2016-03-29 17:48 ifv New Issue
2016-03-29 17:48 ifv Assigned To => san
2016-03-29 17:48 ifv Relationship added related to 0026329
2016-03-31 20:59 kgv Assigned To san => vpa
2016-03-31 20:59 kgv Status new => assigned
2016-03-31 20:59 kgv Category OCCT:VIS => OCCT:Visualization
2016-05-20 16:50 git Note Added: 0054256
2016-05-20 16:51 vpa Note Added: 0054257
2016-05-20 16:51 vpa Assigned To vpa => kgv
2016-05-20 16:51 vpa Status assigned => resolved
2016-05-20 16:54 git Note Added: 0054258
2016-05-20 19:42 git Note Added: 0054259
2016-05-20 20:55 vpa Note Added: 0054260
2016-05-20 23:04 msv Note Added: 0054261
2016-05-23 12:26 vpa Note Added: 0054275
2016-05-23 12:32 kgv Summary Some visualisation tests failed because of exceptions generated by FP signals. => Visualization - add protection against possible floating point overflows in BVH trees
2016-05-23 12:37 kgv Note Added: 0054276
2016-05-23 12:37 kgv Assigned To kgv => bugmaster
2016-05-23 12:37 kgv Status resolved => reviewed
2016-05-23 12:37 kgv Product Version => 7.0.0
2016-05-23 12:37 vpa Note Edited: 0054275
2016-05-23 14:37 mkv Assigned To bugmaster => mkv
2016-05-23 19:19 mkv Note Added: 0054311
2016-05-23 19:19 mkv Assigned To mkv => vpa
2016-05-23 19:19 mkv Status reviewed => feedback
2016-05-23 19:42 mkv Note Added: 0054314
2016-05-23 19:42 mkv Assigned To vpa => ifv
2016-05-24 15:38 mkv Assigned To ifv => vpa
2016-05-24 17:13 git Note Added: 0054364
2016-05-24 17:14 vpa Note Added: 0054365
2016-05-24 17:14 vpa Assigned To vpa => mkv
2016-05-24 17:14 vpa Status feedback => reviewed
2016-05-25 16:14 mkv Note Added: 0054400
2016-05-25 16:14 mkv Note Added: 0054401
2016-05-25 16:14 mkv Assigned To mkv => vpa
2016-05-25 16:14 mkv Status reviewed => assigned
2016-05-25 16:15 mkv Test case number => Not needed
2016-05-25 16:25 git Note Added: 0054403
2016-05-25 16:27 kgv Note Added: 0054404
2016-05-25 16:27 kgv Assigned To vpa => bugmaster
2016-05-25 16:27 kgv Status assigned => resolved
2016-05-25 16:27 kgv Status resolved => reviewed
2016-05-25 16:28 kgv Note Edited: 0054404
2016-05-25 16:28 kgv Note Edited: 0054404
2016-05-25 16:30 kgv Note Edited: 0054404
2016-05-25 17:02 mkv Assigned To bugmaster => mkv
2016-05-26 12:25 mkv Note Added: 0054434
2016-05-26 12:25 mkv Note Added: 0054435
2016-05-26 12:25 mkv Assigned To mkv => bugmaster
2016-05-26 12:25 mkv Status reviewed => tested
2016-05-27 13:02 bugmaster Changeset attached => occt master 41e08b4d
2016-05-27 13:02 bugmaster Status tested => verified
2016-05-27 13:02 bugmaster Resolution open => fixed
2016-05-27 13:09 git Note Added: 0054469
2016-05-27 13:09 git Note Added: 0054470
2016-12-09 16:31 aiv Status verified => closed
2016-12-09 16:37 aiv Fixed in Version => 7.1.0