Archived issue #0024141

Draw Harness, ViewerTest - AIS_InteractiveContext should be explicitly cleared before removal

Open CASCADEOCCT:DRAWassigned1 public note

Search issues

Description

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).

Steps to reproduce

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

Public activity

1 archived note

Participants are labeled by their role within this record.

01Author
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

Related records