MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0024228Open CASCADE[OCCT] OCCT:Visualizationpublic2013-10-06 13:052013-12-19 13:58
Reporterkgv 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.5.0 
Target Version[OCCT] 6.7.0Fixed in Version[OCCT] 6.7.0 
Summary0024228: TKOpenGL - destroy GL context at view close
DescriptionCurrent implementation holds context infinitely in OpenGl_Display instance.
This should be corrected.
Additional information
and documentation updates
This patch has solved the following issues:
1) OpenGl_GraphicDriver is now do not use any global variables (make OpenGl_Display as class field). Global state prevented shared GL resources usage (trailing resources - line strip aspects) and prevented creation of independent driver instances from different threads. See 0023028: TKOpenGl eliminate global static variables.
2) OpenGl_GraphicDriver no more keeps list of workstation for infinity. OpenGL context now destroyed as soon as it become unused. Notice that applications should not use the old window from removed view for creation of new view - the new window should be created instead.
3) Implemented delayed OpenGL resources initialization for drawing aspects. This has been introduced by 0024131 (TKOpenGL redesign GPU memory management for markers presentation) and 0023544 (Texture management in TKOpenGl should be redesigned). Delayed initialization solves the two design issues:
- Some applications might create some interactive objects before view initialization (reported by Salome).
- In multi-view applications there is no guarantee that proper OpenGL context is currently bound to working thread, while context activation is expensive operation.
4) Fixed combined Depth+Stencil FBO destruction (see 0024253: FBO: Improper deletion of combined Stencil+Depth RenderBuffer).
5) Broken OpenGL context (in case when device/window has been lost before proper destruction) is no more used for GL resources destruction.
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0024192closedabv Open CASCADE Adding support for shaders to OCCT visualization toolkit 
related to 0024253closedbugmaster Open CASCADE FBO: Improper deletion of combined Stencil+Depth RenderBuffer 
related to 0024320closedbugmaster Open CASCADE TKOpenGl, Ray Tracing - OpenGL resources created for OpenCL interconnection should be managed in common way 
child of 0023028closedbugmaster Open CASCADE Visualization, TKOpenGl - eliminate global static variables 

-  Notes
(0025917)
kgv (developer)
2013-10-06 13:08

Patch is ready for review in CR24228 branch.
(0025939)
apl (developer)
2013-10-07 15:52

Dear Bugmaster,

The branch passed review, please test.
(0025979)
mkv (tester)
2013-10-09 06:56

Dear BugMaster,

Branch CR24228 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: b4bfc6975ffc05032fb66bb8403ed00b16670b9e

Number of compiler warnings:

occt component :
Linux: 431 (424 on master) - New additional warnings!
Windows: 9 (9 on master)

products component :
Linux: 189 (189 on master)
Windows: 287 (287 on master)

Regressions/Differences:
http://occt-tests/CR24228-master-occt/Windows-32-VC9/summary.html [^]
bugs caf bug24047
bugs vis bug280_2, bug280_3, bug349, bug349_1,, bug23654_MarkersRecompute
caf bugs B6
caf presentation A4
xml ocaf_std B6, C8
xml ocaf_xml B6

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 367323728 / 367240552
Total CPU difference: 40725.30000000105 / 44590.05000000126

Testing on Windows:
Total MEMORY difference: 434690328 / 433051444
Total CPU difference: 35452.8125 / 41177.03125

There are not differences in images found by testdiff.
(0026016)
kgv (developer)
2013-10-10 10:57
edited on: 2013-10-10 11:27

Destruction of OpenGl_GraphicDriver and OpenGl_Display has been corrected.

Dear apl, please proceed trailing issues with TKOpenGl aspects initialization.

(0026119)
apl (developer)
2013-10-17 14:14
edited on: 2013-10-17 14:16

Dear kgv,

The patch for delayed aspects initialization is implemented in branch CR24228_2.

The same solution will be applied for 24192 (shaders). The initially planned handle-based aspects management should be separated into new issue - not to block the pending ones.

Could you please review?

(0026122)
apl (developer)
2013-10-17 15:28

Dear kgv,

The final remarks are in branch CR24228 - const& for Graphic3d_TextureRoot::GetId

Please proceed.
(0026124)
kgv (developer)
2013-10-17 15:33

Patch is ready for testing.
(0026133)
mkv (tester)
2013-10-18 11:26

Dear BugMaster,

Branch CR24228 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 212db0cd365a21bf502dde1cdbdcfde0c42bda2e

Number of compiler warnings:

occt component :
Linux: 3698 (370 on master)
Windows: 6 (6 on master)

products component :
Linux: 190 (191 on master)
Windows: 287 (287 on master)

Regressions/Differences:
http://occt-tests/CR24228-master-occt/Windows-32-VC9/bugs/vis/bug23654_MarkersRecompute.html [^]
bugs vis(004) bug23654_MarkersRecompute: FAILED (exception)

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 352825868 / 353452124
Total CPU difference: 38877.88000000049 / 43493.110000000976

Testing on Windows:
Total MEMORY difference: 406530180 / 407043832
Total CPU difference: 28412.8125 / 30165.484375

There are not differences in images found by testdiff.
(0026146)
apl (developer)
2013-10-19 15:33
edited on: 2013-10-19 15:33

Dear kgv,

Changes for the crash on test case bug23654_MarkersRecompute are pushed to CR24228. The bug can be only reproduced when running "bugs vis" test grid (not a single test) on Windows workstation through ssh connection with mesa libraries in environment.

Could you please review it?

(0026147)
kgv (developer)
2013-10-19 16:46

Dear bugmaster,

please re-test the branch CR24228.
(0026227)
mkv (tester)
2013-10-23 08:56

Dear BugMaster,

Branch CR24228 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 2016eefaf7dbb6fdabfd5151c88fa6daa31bc6cc

Number of compiler warnings:

occt component :
Linux: 368 (368 on master)
Windows: 6 (6 on master)

products component :
Linux: 189 (190 on master)
Windows: 287 (287 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 351221280 / 353757096
Total CPU difference: 42710.730000000956 / 42953.950000000776

Testing on Windows:
Total MEMORY difference: 407000848 / 407043760
Total CPU difference: 29441.859375 / 37414.875

There are not differences in images found by testdiff.

- Related Changesets
occt: master fd4a6963
Timestamp: 2013-10-24 08:53:42
Author: abv
Committer: abv
Details ] Diff ]
0024228: TKOpenGL - destroy GL context at view close

- OpenGl_Display - release GL resources correctly on closing views
- OpenGl_AspectFace, OpenGl_AspectText, OpenGl_AspectLine, OpenGl_AspectMarker - initialize OpenGl resources on demand, when context is available.
- Graphic3d_TextureRoot - use const modifier for GetId method to avoid asynchronous resource state at OpenGl.
- Do not call OpenGL functions if no active GL context has been left
- Reset thread's context before deletion for Mesa WNT
mod - src/Graphic3d/Graphic3d_TextureRoot.cdl Diff ] File ]
mod - src/Graphic3d/Graphic3d_TextureRoot.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_AspectFace.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_AspectFace.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_AspectLine.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_AspectLine.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_AspectMarker.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_AspectMarker.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_AspectText.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_AspectText.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_CappingAlgo.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_CappingPlaneResource.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Context.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Context.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Display.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Display.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_FrameBuffer.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_FrameBuffer.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_GraphicDriver.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_GraphicDriver_1.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_GraphicDriver_2.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_GraphicDriver_3.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_GraphicDriver_4.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_GraphicDriver_7.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_GraphicDriver_Layer.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Group.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Group.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_PointSprite.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_PrimitiveArray.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Structure.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Structure.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_telem_view.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_telem_view.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_TextureBufferArb.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Trihedron.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_VertexBuffer.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_View.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_View.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Window.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Workspace.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Workspace_2.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Workspace_5.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-10-06 13:05 kgv New Issue
2013-10-06 13:05 kgv Assigned To => kgv
2013-10-06 13:08 kgv Note Added: 0025917
2013-10-06 13:08 kgv Assigned To kgv => san
2013-10-06 13:08 kgv Status new => resolved
2013-10-06 13:09 kgv Relationship added child of 0023028
2013-10-06 13:10 kgv Relationship added related to 0023654
2013-10-07 10:01 kgv Product Version => 6.5.0
2013-10-07 15:17 kgv Assigned To san => apl
2013-10-07 15:52 apl Note Added: 0025939
2013-10-07 15:52 apl Assigned To apl => bugmaster
2013-10-07 15:52 apl Status resolved => reviewed
2013-10-07 17:34 bugmaster Assigned To bugmaster => mkv
2013-10-09 06:56 mkv Note Added: 0025979
2013-10-09 06:57 mkv Test case number => Not needed
2013-10-09 06:57 mkv Assigned To mkv => kgv
2013-10-09 06:57 mkv Status reviewed => assigned
2013-10-10 10:57 kgv Note Added: 0026016
2013-10-10 10:57 kgv Assigned To kgv => apl
2013-10-10 11:27 kgv Note Edited: 0026016 View Revisions
2013-10-17 14:14 apl Note Added: 0026119
2013-10-17 14:14 apl Assigned To apl => kgv
2013-10-17 14:14 apl Status assigned => resolved
2013-10-17 14:16 apl Note Edited: 0026119 View Revisions
2013-10-17 15:28 apl Note Added: 0026122
2013-10-17 15:28 apl Relationship added related to 0024192
2013-10-17 15:33 kgv Note Added: 0026124
2013-10-17 15:33 kgv Assigned To kgv => bugmaster
2013-10-17 15:33 kgv Status resolved => reviewed
2013-10-18 11:26 mkv Note Added: 0026133
2013-10-18 11:31 mkv Assigned To bugmaster => apl
2013-10-18 11:31 mkv Status reviewed => assigned
2013-10-19 15:25 apl Relationship added related to 0024253
2013-10-19 15:33 apl Note Added: 0026146
2013-10-19 15:33 apl Assigned To apl => kgv
2013-10-19 15:33 apl Status assigned => feedback
2013-10-19 15:33 apl Note Edited: 0026146 View Revisions
2013-10-19 16:46 kgv Note Added: 0026147
2013-10-19 16:46 kgv Assigned To kgv => bugmaster
2013-10-19 16:46 kgv Status feedback => reviewed
2013-10-19 17:24 kgv Additional Information Updated View Revisions
2013-10-19 17:30 kgv Additional Information Updated View Revisions
2013-10-21 07:34 mkv Assigned To bugmaster => mkv
2013-10-23 08:56 mkv Note Added: 0026227
2013-10-23 08:57 mkv Assigned To mkv => bugmaster
2013-10-23 08:57 mkv Status reviewed => tested
2013-10-25 14:42 abv Changeset attached => occt master fd4a6963
2013-10-25 14:42 abv Assigned To bugmaster => abv
2013-10-25 14:42 abv Status tested => verified
2013-10-25 14:42 abv Resolution open => fixed
2013-10-29 16:25 kgv Relationship added related to 0024297
2013-11-05 15:29 kgv Relationship added related to 0024320
2013-12-19 13:51 bugmaster Status verified => closed
2013-12-19 13:58 bugmaster Fixed in Version => 6.7.0


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker