MantisBT - Open CASCADE
View Issue Details
0024141Open CASCADE[OCCT] OCCT:DRAWpublic2013-09-03 16:432021-06-23 10:27
kgv 
kgv 
normalminor 
assignedopen 
ALL
[OCCT] 6.6.0 
[OCCT] 7.6.0* 
0024141: Draw Harness, ViewerTest - AIS_InteractiveContext should be explicitly cleared before removal
After removing of viewer and interactive context (AIS_InteractiveContext), existing interactive objects still holds handle of Graphic3d_GraphicDriver which also leads to re-computation errors like this:
> AIS_TexturedShape::Compute() in ShadingMode failed

Or memory corruption inside OpenGl_GraphicDriver (which should be destroyed but has left in invalid state by back references).
Test case for current master (using shared OpenGL resources to expose OpenGl_GraphicDriver internal issues):

pload MODELING
pload VISUALIZATION
box b 1 2 3
vinit drv1/v1/v1
vdisplay b
vfit
vtexture b 3
vinit drv2/v1/v1
vdisplay b
vtexture b 4
vfit

vclose drv1/v1/v1
vinit drv1/v1/v1
vdisplay b
vtexture b 5
vfit
No tags attached.
related to 0024047closed gka Open CASCADE Exception in TPrsStd_AISPresentation during destruction of TDocStd_Document 
related to 0027957closed apn Open CASCADE Visualization, AIS_InteractiveContext - protect from displaying the same AIS_InteractiveObject within multiple contexts 
related to 0032456new kgv Open CASCADE Draw Harness, ViewerTest - map of interactive objects GetMapOfAIS() should be bound to active AIS_InteractiveContext 
child of 0023117closed bugmaster Open CASCADE TKV3d and TKOpenGl code clean-up 
Issue History
2013-09-03 16:43kgvNew Issue
2013-09-03 16:43kgvAssigned To => aba
2013-09-03 16:43kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5794#r5794
2013-09-03 16:45kgvRelationship addedrelated to 0024047
2013-09-06 19:07sanStatusnew => assigned
2013-10-18 07:32kgvTarget Version6.7.0 => 6.7.1
2013-12-20 09:05kgvRelationship addedrelated to 0024391
2014-02-17 16:38kgvSummaryAIS_InteracriveObject holds presentation(s) for removed Graphic3d_GraphicDriver => Visualization - AIS_InteractiveObject holds presentation(s) for removed Graphic3d_GraphicDriver
2014-03-29 10:27kgvRelationship addedchild of 0023117
2014-03-29 10:31kgvNote Added: 0028554
2014-04-04 18:09abvTarget Version6.7.1 => 6.8.0
2014-09-29 22:35kgvTarget Version6.8.0 => 7.1.0
2016-10-13 12:41kgvCategoryOCCT:Visualization => OCCT:DRAW
2016-10-13 12:41kgvSummaryVisualization - AIS_InteractiveObject holds presentation(s) for removed Graphic3d_GraphicDriver => Draw Harness, ViewerTet - AIS_InteractiveContext should be explicitly cleared before removal
2016-10-13 15:36kgvRelationship addedrelated to 0027957
2016-11-22 11:05kgvAssigned Toaba => kgv
2016-11-22 11:05kgvTarget Version7.1.0 => 7.2.0
2016-11-22 11:05kgvSummaryDraw Harness, ViewerTet - AIS_InteractiveContext should be explicitly cleared before removal => Draw Harness, ViewerTest - AIS_InteractiveContext should be explicitly cleared before removal
2017-07-20 11:40kgvTarget Version7.2.0 => 7.3.0
2018-03-25 12:16kgvTarget Version7.3.0 => 7.4.0
2019-08-13 13:03kgvTarget Version7.4.0 => 7.5.0
2020-08-28 16:31kgvTarget Version7.5.0 => 7.6.0*
2021-06-23 10:27kgvRelationship addedrelated to 0032456

Notes
(0028554)
kgv   
2014-03-29 10:31   
The code now has proper NULL-check protections, however OpenGl_GraphicDriver is still alive when closing the last view - the only way to destroy it is to create new driver and clear context.
vinit drv2/v1/v1
vclear