MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029127Open CASCADE[OCCT] OCCT:Visualizationpublic2017-09-20 14:192017-10-11 11:39
Reporterkgv 
Assigned Tobugmaster 
PrioritylowSeverityminor 
StatusverifiedResolutionfixed 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.1.0 
Target Version[OCCT] 7.2.1Fixed in Version 
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
Attached Files

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

-  Notes
(0070712)
git (administrator)
2017-09-20 14:29

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.
(0070713)
kgv (developer)
2017-09-20 14:30

Patch is ready for review.
(0070744)
san (developer)
2017-09-21 17:15

Branch CR29127 reviewed without remarks, ready for testing.
(0070764)
git (administrator)
2017-09-21 22:04

Branch CR29127 has been updated forcibly by inv.

SHA-1: 12d4e3ea3847bcecd683d6b5c6671db9e0ab4ec5
(0070784)
bugmaster (administrator)
2017-09-22 13:20

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
(0071037)
git (administrator)
2017-09-29 17:12

Branch CR29127 has been deleted by kgv.

SHA-1: 12d4e3ea3847bcecd683d6b5c6671db9e0ab4ec5
(0071313)
abv (manager)
2017-10-10 07:06

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?
(0071334)
kgv (developer)
2017-10-11 11:39
edited on: 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
Timestamp: 2017-09-20 11:28:26
Author: 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.
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 View Revisions


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker