View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027891 | Open CASCADE | OCCT:Visualization | public | 2016-09-21 18:41 | 2016-12-09 16:38 |
Reporter | Assigned To | kgv | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.1.0 | Fixed in Version | 7.1.0 | ||
Summary | 0027891: Visualization - FPE due to use of DBL_MAX in SelectMgr_SelectingVolumeManager::DetectedPoint() | ||||
Description | When FPE signals are enabled (see 0026329), test bugs vis bug26344 crashes with Floating-point overflow exception. This problem is new one, it appeared after integration of fix for #27834. There are several problems: 1. Method SelectMgr_SelectingVolumeManager::DetectedPoint(), and some others, use floating point values equal to RealLast() (DBL_MAX) in case of invalid situation. This is unsafe since the problem remains unnoticed and may lead to invalid calculation or FPE signal somewhere much farther in the code. Please consider either raising exception, or using Precision::Infinite() instead of RealLast(). In either case, possibility to get such return value should be documented, and it should be properly treated by caller. If possible, yet better solution would be changing signature of such methods to allow them returning success status explicitly. 2. Method SelectMgr_SelectingVolumeManager::DetectedPoint() gets called from method StdSelect_ViewerSelector3d::Pick() which corresponds to selection by window, while it may be called only when selection by single point is performed. This apparently indicates some logical error. Call stack: TKV3d.dll!gp_XYZ::Multiply(const gp_Mat & Matrix) Line 188 + 0xe bytes C++ TKV3d.dll!gp_GTrsf::Transforms(gp_XYZ & Coord) Line 162 C++ TKV3d.dll!`anonymous namespace'::updatePoint3d(SelectMgr_SortCriterion & theCriterion, const gp_GTrsf & theInversedTrsf, SelectMgr_SelectingVolumeManager & theMgr) Line 77 C++ TKV3d.dll!SelectMgr_ViewerSelector::checkOverlap(const opencascade::handle<SelectBasics_SensitiveEntity> & theEntity, const gp_GTrsf & theInversedTrsf, SelectMgr_SelectingVolumeManager & theMgr) Line 230 C++ TKV3d.dll!SelectMgr_ViewerSelector::traverseObject(const opencascade::handle<SelectMgr_SelectableObject> & theObject, const SelectMgr_SelectingVolumeManager & theMgr, const opencascade::handle<Graphic3d_Camera> & theCamera, const NCollection_Mat4<double> & theProjectionMat, const NCollection_Mat4<double> & theWorldViewMat, const int theViewportWidth, const int theViewportHeight) Line 379 + 0x22 bytes C++ TKV3d.dll!SelectMgr_ViewerSelector::TraverseSensitives() Line 513 C++ TKV3d.dll!StdSelect_ViewerSelector3d::Pick(const int theXPMin, const int theYPMin, const int theXPMax, const int theYPMax, const opencascade::handle<V3d_View> & theView) Line 160 C++ TKV3d.dll!AIS_InteractiveContext::Select(const int theXPMin, const int theYPMin, const int theXPMax, const int theYPMax, const opencascade::handle<V3d_View> & theView, const bool toUpdateViewer) Line 356 C++ | ||||
Steps To Reproduce | Enable FPE signals handling in DRAW (e.g. switch to branch CR26329 and set CSF_FPE environment variable, or change Standard_False to Standard_True in calls to OSD::SetSignal() in DRAW) and then run: test bugs vis bug26344 vstate -entities Result - Draw Harness crashes. | ||||
Tags | No tags attached. | ||||
Test case number | bugs vis bug26344 | ||||
|
Branch CR27891 has been created by kgv. SHA-1: d3b7ce6a79ed1ee89a0eac883f2871f7289c0651 Detailed log of new commits: Author: kgv Date: Fri Sep 23 15:33:40 2016 +0300 0027891: Visualization - FPE due to use of DBL_MAX in SelectMgr_SelectingVolumeManager::DetectedPoint() |
|
Patch is ready for review. |
|
Branch CR27891 reviewed without remarks, ready for testing. |
|
Dear BugMaster, Branch CR27891 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: d3b7ce6a79ed1ee89a0eac883f2871f7289c0651 Number of compiler warnings: occt component : Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS : 0 (0 on master) products component : Linux: 64 (64 on master) Windows: 0 (0 on master) MacOS : 1147 Regressions/Differences/Improvements: http://occt-tests/CR27891-master-OCCT/Debian70-64/bugs/vis/bug27477.html http://occt-tests/CR27891-master-OCCT/Windows-64-VC10/bugs/vis/bug27477.html bugs vis bug27477: FAILED Testing cases: http://occt-tests/CR27891-master-OCCT/Debian70-64/bugs/vis/bug26344.html http://occt-tests/CR27891-master-OCCT/Windows-64-VC10/bugs/vis/bug26344.html bugs vis bug26344: OK Testing on Linux: occt component : Total MEMORY difference: 90946382 / 90233417 [+0.79%] Total CPU difference: 19325.39999999984 / 19251.459999999875 [+0.38%] products component : Total MEMORY difference: 30027851 / 30046985 [-0.06%] Total CPU difference: 5127.189999999981 / 5151.099999999975 [-0.46%] Testing on Windows: occt component : Total MEMORY difference: 57213963 / 57221541 [-0.01%] Total CPU difference: 17976.463232998743 / 18310.78897609872 [-1.83%] products component : Total MEMORY difference: 21271136 / 21235672 [+0.17%] Total CPU difference: 4864.423181999953 / 4988.631178199945 [-2.49%] There are no differences in images found by testdiff. |
|
Dear kgv, Branch CR27891 has been rejected due to: - regressions/differences/improvements |
|
Branch CR27891 has been updated by kgv. SHA-1: f1e1e53e93e56052fa5cdcee75c4c610dafe20e7 Detailed log of new commits: Author: kgv Date: Mon Sep 26 14:09:26 2016 +0300 adjust format for vstate command |
|
Branch CR27891_1 has been created by kgv. SHA-1: f81159a8a0dfe74254e0fac7dc923496ac8277fe Detailed log of new commits: Author: kgv Date: Fri Sep 23 15:33:40 2016 +0300 0027891: Visualization - FPE due to use of DBL_MAX in SelectMgr_SelectingVolumeManager::DetectedPoint() |
|
Please check updated patch. |
|
Dear BugMaster, Branch CR27891_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: f81159a8a0dfe74254e0fac7dc923496ac8277fe Number of compiler warnings: occt component : Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS : 0 (0 on master) products component : Linux: 64 (64 on master) Windows: 0 (0 on master) MacOS : 1149 Regressions/Differences/Improvements: No regressions/differences Testing cases: http://occt-tests/CR27891_1-master-OCCT/Debian70-64/bugs/vis/bug26344.html http://occt-tests/CR27891_1-master-OCCT/Windows-64-VC10/bugs/vis/bug26344.html bugs vis bug26344: OK Testing on Linux: occt component : Total MEMORY difference: 90837119 / 90245681 [+0.66%] Total CPU difference: 19387.38999999989 / 19252.119999999875 [+0.70%] products component : Total MEMORY difference: 30020603 / 30057668 [-0.12%] Total CPU difference: 5151.279999999975 / 5152.399999999975 [-0.02%] Testing on Windows: occt component : Total MEMORY difference: 57216643 / 57221541 [-0.01%] Total CPU difference: 17855.78085939864 / 18310.78897609872 [-2.48%] products component : Total MEMORY difference: 21271951 / 21235672 [+0.17%] Total CPU difference: 4901.863421999946 / 4988.631178199945 [-1.74%] There are no differences in images found by testdiff. |
|
Dear BugMaster, Branch CR27891_1 is TESTED. |
|
Branch CR27891 has been deleted by kgv. SHA-1: f1e1e53e93e56052fa5cdcee75c4c610dafe20e7 |
|
Branch CR27891_1 has been deleted by kgv. SHA-1: f81159a8a0dfe74254e0fac7dc923496ac8277fe |
occt: master 949c9b7f 2016-09-23 12:33:40 Details Diff |
0027891: Visualization - FPE due to use of DBL_MAX in SelectMgr_SelectingVolumeManager::DetectedPoint() |
Affected Issues 0027891 |
|
mod - src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx | Diff File | ||
mod - src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx | Diff File | ||
mod - src/SelectMgr/SelectMgr_ViewerSelector.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest.cxx | Diff File | ||
mod - tests/bugs/vis/bug26344 | Diff File | ||
mod - tests/bugs/vis/bug27477 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-09-21 18:41 |
|
New Issue | |
2016-09-21 18:41 |
|
Assigned To | => kgv |
2016-09-21 18:43 |
|
Test case number | => bugs vis bug26344 |
2016-09-21 18:43 |
|
Summary | Visualization - FPE due to use of DBL_MAX in => Visualization - FPE due to use of DBL_MAX in SelectMgr_SelectingVolumeManager::DetectedPoint() |
2016-09-21 18:43 |
|
Description Updated | |
2016-09-21 18:44 |
|
Relationship added | related to 0026329 |
2016-09-21 20:24 | kgv | Steps to Reproduce Updated | |
2016-09-22 10:46 | kgv | Steps to Reproduce Updated | |
2016-09-23 15:36 | git | Note Added: 0058078 | |
2016-09-23 15:36 | kgv | Note Added: 0058079 | |
2016-09-23 15:36 | kgv | Assigned To | kgv => san |
2016-09-23 15:36 | kgv | Status | new => resolved |
2016-09-23 16:16 |
|
Note Added: 0058090 | |
2016-09-23 16:16 |
|
Assigned To | san => bugmaster |
2016-09-23 16:16 |
|
Status | resolved => reviewed |
2016-09-23 16:19 |
|
Assigned To | bugmaster => mkv |
2016-09-26 12:58 |
|
Note Added: 0058157 | |
2016-09-26 12:59 |
|
Note Added: 0058158 | |
2016-09-26 12:59 |
|
Assigned To | mkv => kgv |
2016-09-26 12:59 |
|
Status | reviewed => feedback |
2016-09-26 14:11 | git | Note Added: 0058161 | |
2016-09-26 14:13 | git | Note Added: 0058162 | |
2016-09-26 14:13 | kgv | Note Added: 0058163 | |
2016-09-26 14:13 | kgv | Assigned To | kgv => bugmaster |
2016-09-26 14:13 | kgv | Status | feedback => reviewed |
2016-09-26 15:23 |
|
Assigned To | bugmaster => mkv |
2016-09-27 17:59 |
|
Note Added: 0058227 | |
2016-09-27 17:59 |
|
Note Added: 0058228 | |
2016-09-27 17:59 |
|
Assigned To | mkv => bugmaster |
2016-09-27 17:59 |
|
Status | reviewed => tested |
2016-10-03 13:47 | kgv | Changeset attached | => occt master 949c9b7f |
2016-10-03 13:47 | kgv | Assigned To | bugmaster => kgv |
2016-10-03 13:47 | kgv | Status | tested => verified |
2016-10-03 13:47 | kgv | Resolution | open => fixed |
2016-10-28 21:45 | git | Note Added: 0059528 | |
2016-10-28 21:45 | git | Note Added: 0059529 | |
2016-12-09 16:30 |
|
Status | verified => closed |
2016-12-09 16:38 |
|
Fixed in Version | => 7.1.0 |