View Issue Details

IDProjectCategoryView StatusLast Update
0029127Open CASCADEOCCT:Visualizationpublic2018-06-29 21:19
Reporterkgv Assigned Tobugmaster  
PrioritylowSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version7.1.0 
Target Version7.3.0Fixed in Version7.3.0 
Summary0029127: Visualization - V3d_View::ToPixMap() crashes on tiled rendering without FBO
DescriptionWithout FBO, V3d_View::ToPixMap() is unable adjusting Viewport dimensions, so that the code just fallbacks into rendering full-window size:
        if (!aFBOPtr.IsNull())
        {
          // crop corners in case of FBO
          // (no API to resize viewport of on-screen buffer - keep uncropped in this case)
          aTile = aTile.Cropped();
        }

This has a destructive side effect - the uncropped tile is mapped out of the allocated memory region of the given Image_PixMap, leading to application crash.
Steps To Reproduce
pload MODELING VISUALIZATION
box b 1 2 3 
# force using Microsoft software driver implementing only OpenGL 1.1
vcaps -softMode 1
vclear
vinit View1
vsetdispmode 1
vdisplay b
vfit
vdump texture_409.png -buffer rgb -width 409 -height 409
vdump texture_412.png -buffer rgb -width 412 -height 412
TagsNo tags attached.
Test case numberbugs vis bug29127

Relationships

child of 0029124 closedbugmaster Visualization, Tests - failures when tests are executed via Remote Desktop connection 
child of 0022582 closedbugmaster Visualization - provide an API for dumping a sub-region of the viewport 

Activities

git

2017-09-20 14:29

administrator   ~0070712

Branch CR29127 has been created by kgv.

SHA-1: cae2490d07fcd3711c3569e3d78e62a8945b88a5


Detailed log of new commits:

Author: kgv
Date: Wed Sep 20 14:28:26 2017 +0300

    0029127: Visualization - V3d_View::ToPixMap() crashes on tiled rendering without FBO
    
    Fixed out-of-memory writing within fallback View dump mode.

kgv

2017-09-20 14:30

developer   ~0070713

Patch is ready for review.

san

2017-09-21 17:15

developer   ~0070744

Branch CR29127 reviewed without remarks, ready for testing.

git

2017-09-21 22:04

administrator   ~0070764

Branch CR29127 has been updated forcibly by inv.

SHA-1: 12d4e3ea3847bcecd683d6b5c6671db9e0ab4ec5

bugmaster

2017-09-22 13:20

administrator   ~0070784

Combination -
OCCT branch : CR29127 SHA-1: 12d4e3ea3847bcecd683d6b5c6671db9e0ab4ec5
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.

http://jenkins-test-10.nnov.opencascade.com/view/CR29127-master/

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

New test cases are OK

git

2017-09-29 17:12

administrator   ~0071037

Branch CR29127 has been deleted by kgv.

SHA-1: 12d4e3ea3847bcecd683d6b5c6671db9e0ab4ec5

abv

2017-10-10 07:06

manager   ~0071313

On my computer with CSF_FPE set to 1 test bugs vis bug29127 fails on current master (MSVC 10 64-bit) with exception "Floating-point invalid operation.". The call stack is (without a bunch of additional opengl calls at top):

     ...
     opengl32.dll!00007fff780c6054()
     TKOpenGl.dll!OpenGl_View::redrawImmediate(Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer * theReadFbo, OpenGl_FrameBuffer * theDrawFbo, OpenGl_FrameBuffer * theOitAccumFbo, const bool theIsPartialUpdate) Line 804 C++
     TKOpenGl.dll!OpenGl_View::Redraw() Line 514 + 0x3f bytes C++
     TKV3d.dll!V3d_View::Redraw() Line 259 C++
     TKV3d.dll!V3d_Viewer::Redraw() Line 178 C++
     TKV3d.dll!AIS_InteractiveContext::UpdateCurrentViewer() Line 207 C++
> TKViewerTest.dll!ViewerTest_AutoUpdater::Update() Line 110 + 0x17 bytes C++
     TKViewerTest.dll!ViewerTest_AutoUpdater::~ViewerTest_AutoUpdater() Line 41 + 0xa bytes C++
     TKViewerTest.dll!VDisplay2(Draw_Interpretor & theDI, int theArgNb, const char * * theArgVec) Line 4411 + 0x31 bytes C++
     TKViewerTest.dll!Draw_Interpretor::CallBackDataFunc::Invoke(Draw_Interpretor & theDI, int theArgNb, const char * * theArgVec) Line 81 + 0x22 bytes C++
     TKDraw.dll!CommandCmd(void * theClientData, Tcl_Interp * interp, int argc, const char * * argv) Line 166 + 0x25 bytes C++


Should we debug it or just call dsetsignal 0 in the beginning of the test?

kgv

2017-10-11 11:39

developer   ~0071334

Last edited: 2017-10-11 11:39

> On my computer with CSF_FPE set to 1
> test bugs vis bug29127 fails on current master (MSVC 10 64-bit)
> with exception "Floating-point invalid operation.".
> Should we debug it or just call dsetsignal 0 in the beginning of the test?
The problem is inside OpenGL drivers - Microsoft software implementation in this case (test explicitly requests it for validating obsolete OpenGL 1.1 code path).

Actually, this is one of the reasons why we have decided disabling FPE by default in Draw Harness in past
(test failures on software implementations like Mesa/Microsoft and even some Intel drivers).

Related Changesets

occt: master c8fe0e2d

2017-09-20 11:28:26

kgv


Committer: bugmaster Details Diff
0029127: Visualization - V3d_View::ToPixMap() crashes on tiled rendering without FBO

Fixed out-of-memory writing within fallback View dump mode.
Affected Issues
0029127
mod - src/V3d/V3d_View.cxx Diff File
add - tests/bugs/vis/bug29127 Diff File

Issue History

Date Modified Username Field Change
2017-09-20 14:19 kgv New Issue
2017-09-20 14:19 kgv Assigned To => kgv
2017-09-20 14:29 git Note Added: 0070712
2017-09-20 14:30 kgv Note Added: 0070713
2017-09-20 14:30 kgv Assigned To kgv => san
2017-09-20 14:30 kgv Priority normal => low
2017-09-20 14:30 kgv Status new => resolved
2017-09-20 14:30 kgv Relationship added child of 0029124
2017-09-20 14:32 kgv Relationship added child of 0022582
2017-09-20 14:32 kgv Product Version 7.2.0 => 7.1.0
2017-09-21 17:15 san Note Added: 0070744
2017-09-21 17:15 san Assigned To san => bugmaster
2017-09-21 17:15 san Status resolved => reviewed
2017-09-21 22:04 git Note Added: 0070764
2017-09-22 13:19 bugmaster Test case number => bugs vis bug29127
2017-09-22 13:20 bugmaster Note Added: 0070784
2017-09-22 13:20 bugmaster Status reviewed => tested
2017-09-29 13:26 bugmaster Changeset attached => occt master c8fe0e2d
2017-09-29 13:26 bugmaster Status tested => verified
2017-09-29 13:26 bugmaster Resolution open => fixed
2017-09-29 17:12 git Note Added: 0071037
2017-10-10 07:06 abv Note Added: 0071313
2017-10-11 11:39 kgv Note Added: 0071334
2017-10-11 11:39 kgv Note Edited: 0071334
2018-06-29 21:15 aiv Fixed in Version => 7.3.0
2018-06-29 21:19 aiv Status verified => closed