View Issue Details

IDProjectCategoryView StatusLast Update
0024868CommunityOCCT:Visualizationpublic2024-01-12 21:52
ReporterMarkus Assigned Tovpozdyayev 
PrioritylowSeverityminor 
Status assignedResolutionopen 
PlatformWindows 
Product Version6.7.0 
Target VersionUnscheduled 
Summary0024868: Visulization, TKOpenGl - Exception when many views are created
DescriptionWhen more than approximately 70 views are created in Draw via vinit, an exception is thrown in the call to
wglCreateContext (aWindowDC);
in
OpenGl_Window::OpenGl_Window (const Handle(OpenGl_Display)& theDisplay,
                              const CALL_DEF_WINDOW& theCWindow,
                              Aspect_RenderingContext theGContext,
                              const Handle(OpenGl_Caps)& theCaps,
                              const Handle(OpenGl_Context)& theShareCtx)

Is this a limitation or a bug?

The behaviour is the same in OCC 6.7.1 beta.

Similar behaviour can also be reproduced with the ImportExportSample (either MFC or CSharp) using menu "Window > New windw" to create new views.
Steps To Reproduce
pload VISUALIZATION
for {set i 1} {$i < 1000} { incr i} {puts $i; vinit}



Exception on AMD:
78
An exception was caught 012EBCB8 : Aspect_GraphicDeviceDefinitionError: OpenGl_Window::CreateWindow: wglCreateContext failed. Error code: 0
** Exception ** 012EBCB8 : Aspect_GraphicDeviceDefinitionError: OpenGl_Window::CreateWindow: wglCreateContext failed. Error code: 0


Exception on Intel:
33
An exception was caught 01BEBCB8 : Aspect_GraphicDeviceDefinitionError: OpenGl_Window::CreateWindow: wglShareLists failed. Error code: -1073278755
** Exception ** 01BEBCB8 : Aspect_GraphicDeviceDefinitionError: OpenGl_Window::CreateWindow: wglShareLists failed. Error code: -1073278755 
TagsNo tags attached.
Test case number

Relationships

related to 0022832 closedaba Community Not documented limitation of Graphic3d_StructureManager 
related to 0025147 closedbugmaster Open CASCADE Visualization, TKOpenGl - support EGL as alternative to GLX 

Activities

abv

2014-04-24 09:20

manager   ~0029046

Last edited: 2014-04-24 09:23

There is limitation of number of views that can be created, currently 100, see http://dev.opencascade.org/doc/refman/html/class_visual3d___view_manager.html

In my experiment using OCCT 6.7.0 vc8 32-bit and OCCT 6.7.1 beta vc10 64-bit it stops exactly on 101-th view:

Draw[1]> pload ALL
Draw[2]> for {set i 1} {$i < 1000} { incr i} {puts $i; vinit}
1
...
100
101
An exception was caught 000007FEEB8FFD38 : Aspect_IdentDefinitionError: GenId Next Error: Available == 0
** Exception ** 000007FEEB8FFD38 : Aspect_IdentDefinitionError: GenId Next Error: Available == 0
Draw[3]> exit

If you confirm that it stops on 101-th view (not 71-th as you reported), I suggest we close this issue as known limitation. If it fails earlier, please try to debug in your environment, as we cannot reproduce it here.

Timo

2014-04-24 14:27

developer   ~0029058

It seems it is dependent on the graphics driver.

Until now I had:
ATI FirePro V5800 (driver: 9.3.3.3000), Win 7 Pro

and received the following Draw output:
...
86
An exception was caught 0082F028 : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLAT
ION at address 0x00000008 during 'READ' operation
** Exception ** 0082F028 : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at a
ddress 0x00000008 during 'READ' operation

After updating the driver to:
ATI FirePro V5800 (driver: 13.350.1012.0), Win 7 Pro
I received the same output as you.

I tested it still on some other systems.
The result was correct (100 views) on:
- NVIDIA Quadro FX 4600 (driver: 9.18.13.3165), Win 8.1 Pro
- NVIDIA Quadro FX 1600M (driver: 8.17.12.9573), Win 7 Ultimate


There was a problem in the following case:
- Intel HD Graphics 4000 (driver: 9.17.10.2875), Win 8 Pro
Output:
33
An exception was caught 01BEBCB8 : Aspect_GraphicDeviceDefinitionError: OpenGl_W
indow::CreateWindow: wglShareLists failed. Error code: -1073278755
** Exception ** 01BEBCB8 : Aspect_GraphicDeviceDefinitionError: OpenGl_Window::C
reateWindow: wglShareLists failed. Error code: -1073278755

kgv

2014-04-24 14:55

developer   ~0029059

The exception looks like limitation of OpenGL driver - there is nothing wrong in OCCT (although it should be checked that code has appropriate checks in case of failure).

However the problem itself can be resolved by re-usage of the single OpenGL context instance across all views (already planned but nowhere announced since this change will make no differenced in most cases, rather than this one accidentally appeared).

Issue History

Date Modified Username Field Change
2014-04-23 17:23 Timo New Issue
2014-04-23 17:23 Timo Assigned To => san
2014-04-23 17:24 Timo Description Updated
2014-04-23 17:47 Timo Description Updated
2014-04-23 17:48 Timo Description Updated
2014-04-23 17:48 Timo Steps to Reproduce Updated
2014-04-23 17:48 Timo Description Updated
2014-04-23 17:48 Timo Steps to Reproduce Updated
2014-04-23 17:49 Timo Description Updated
2014-04-23 17:49 Timo Steps to Reproduce Updated
2014-04-24 09:20 abv Note Added: 0029046
2014-04-24 09:20 abv Assigned To san => Timo
2014-04-24 09:20 abv Status new => feedback
2014-04-24 09:20 abv Relationship added related to 0022832
2014-04-24 09:23 abv Note Edited: 0029046
2014-04-24 14:27 Timo Note Added: 0029058
2014-04-24 14:28 Timo Assigned To Timo => abv
2014-04-24 14:29 Timo Status feedback => assigned
2014-04-24 14:47 kgv Assigned To abv => kgv
2014-04-24 14:47 kgv Priority normal => low
2014-04-24 14:47 kgv Platform => Windows
2014-04-24 14:47 kgv Target Version 6.7.1 => 6.8.0
2014-04-24 14:47 kgv Summary Exception when many views are created => Visulization, TKOpenGl - Exception when many views are created
2014-04-24 14:47 kgv Steps to Reproduce Updated
2014-04-24 14:55 kgv Note Added: 0029059
2014-09-29 21:48 kgv Target Version 6.8.0 => 7.1.0
2014-09-29 22:29 kgv Relationship added related to 0025147
2016-10-25 09:48 kgv Target Version 7.1.0 => 7.2.0
2017-05-31 15:41 Timo Reporter Timo => Markus
2017-07-20 11:32 kgv Target Version 7.2.0 => 7.4.0
2019-09-04 12:58 abv Target Version 7.4.0 => 7.5.0
2020-08-28 14:42 kgv Target Version 7.5.0 => 7.6.0
2021-08-24 14:21 kgv Target Version 7.6.0 => 7.7.0
2022-08-17 11:57 kgv Target Version 7.7.0 => 7.8.0
2022-10-19 15:49 smoskvin Assigned To kgv => vpozdyayev
2023-08-01 15:09 dpasukhi Target Version 7.8.0 => Unscheduled