View Issue Details

IDProjectCategoryView StatusLast Update
0026128CommunityOCCT:Visualizationpublic2015-05-14 16:37
Reportersolomin_s Assigned Tobugmaster  
PrioritynormalSeveritytrivial 
Status closedResolutionfixed 
PlatformLinixOSUbuntu 
Product Version6.5.3 
Target Version6.9.0Fixed in Version6.9.0 
Summary0026128: Visualization, TKOpenGl - fix misprint in external GLX context initialization
DescriptionOpenGl_Window initalization failed when external opengl context pass to V3d_View.
XGetVisualInfo return valid XVisualInfo object for correct Display, but in case of external opengl context Aspect_GraphicDeviceDefinitionError is raised.
In this case XVisualInfo configuration shoold be checked and exception should be raised if XVisualInfo has no needed configuration.
Steps To ReproduceHandle_V3d_View aView = anAISContext->CurrentViewer()->CreateView();
aView->SetWindow(aWindow, theContext, nullptr, nullptr);
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0022819 closedbugmaster Open CASCADE Redesign of OpenGl driver 

Activities

git

2015-04-23 10:31

administrator   ~0040152

Branch CR26128 has been created by solomin_s.

SHA-1: 6ef92a25a6544c38fdc0fb32098a3aed842e45b1


Detailed log of new commits:

Author: Sergey Solomin
Date: Thu Apr 23 10:29:54 2015 +0300

    0026128: Incorrect OpenGl_Window intialization with external OpenGl context on Linux

kgv

2015-04-28 11:43

developer   ~0040319

Last edited: 2015-04-28 11:43

Could you please elaborate how this patch helps anyhow?

As far as I can see it just raises exception in one more scenario - when external context has no depth/stencil buffers and something like this.
Or I have missed something in the patch?

solomin_s

2015-04-28 11:55

developer   ~0040320

Last edited: 2015-04-28 11:56

Previous code has bug: exception will be raised if XGetVisualInfo returned correct XVisualInfo.

More:
aVis = XGetVisualInfo (aDisp, aVisInfoMask, &aVisInfo, &aNbItems); //<- return correct VisualInfo (not NULL)
if (!myOwnGContext)
{
  if (aVis != NULL) // <- for external context is true, because aVis is not NULL
  {
    Aspect_GraphicDeviceDefinitionError::Raise ("OpenGl_Window::CreateWindow: XGetVisualInfo failed."); // <- exception raise, so viewer cannot be initialized
    return;
  }
   aWindow = aParent;
}

I suppose aVis should be check to have needed configuration, and exception should be raised if aVis is NULL or unsupported by occt.
My changes fix it.

kgv

2015-04-28 12:11

developer   ~0040327

Last edited: 2015-04-28 12:13

  if (aVis != NULL) // <- for external context is true, because aVis is not NULL

oh, I see it now - there is misprint in condition ;).

> I suppose aVis should be check to have needed configuration,
> and exception should be raised if aVis is NULL or unsupported by occt.
this would be different for alien context, because these extra checks are not intended to prevent creation of the view, but to apply extra workaround in this case - create a subwindow with more reliable Visual.

But this workaround will not be applied for alien context and would just prevent creation of the view in case when it might be (partially) functional (e.g. it will not be a complete disaster if window would not have stencil buffer) - warning message would be more reliable in this context. So I believe that this change should be withdrawn from the patch.

git

2015-04-28 12:44

administrator   ~0040331

Branch CR26128 has been updated by kgv.

SHA-1: 2f33c2350abea67971d020bc1f2f85d40262ed5d


Detailed log of new commits:

Author: kgv
Date: Tue Apr 28 12:43:55 2015 +0300

    OpenGl_Window, GLX - push warning about missing caps in window Visual

git

2015-04-28 12:49

administrator   ~0040333

Branch CR26128_1 has been created by kgv.

SHA-1: 63708235acbac06368f9a5042744bbe9757e4a6e


Detailed log of new commits:

Author: Sergey Solomin
Date: Tue Apr 28 12:48:31 2015 +0300

    0026128: Visualization, TKOpenGl - fix misprint in external GLX context initialization
    
    OpenGl_Window, GLX - push warning about missing caps in window Visual.
    Allow initialization of alien GLX context.

kgv

2015-04-28 12:50

developer   ~0040334

Updated patch is ready for review.

solomin_s

2015-04-28 13:02

developer   ~0040338

Yes, you are right! Thanks for update and fix :)

san

2015-04-29 12:41

developer   ~0040409

Branch CR26128_1 reviewed without remarks, ready for testing.

git

2015-04-29 20:28

administrator   ~0040445

Branch CR26128_1 has been updated by inv.

SHA-1: 46d8dd0a05b323d459f3f543eede3d633793d9b6


Detailed log of new commits:

Author: bugmaster
Date: Wed Apr 29 20:27:27 2015 +0300

    Correction of misprinting

apv

2015-05-05 16:46

tester   ~0040565

Dear BugMaster,

Branch CR26128_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 46d8dd0a05b323d459f3f543eede3d633793d9b6

Number of compiler warnings:
occt component:
   Linux: 18 (18 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 4 (4 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 94675129 / 94611080 [+0.07%]
Total CPU difference: 50888.24999999936 / 51017.469999999455 [-0.25%]

Testing on Windows:
Total MEMORY difference: 57176071 / 57184627 [-0.01%]
Total CPU difference: 15784.758383698976 / 15796.84846119897 [-0.08%]

git

2015-05-14 16:37

administrator   ~0041105

Branch CR26128 has been deleted by inv.

SHA-1: 2f33c2350abea67971d020bc1f2f85d40262ed5d

git

2015-05-14 16:37

administrator   ~0041106

Branch CR26128_1 has been deleted by inv.

SHA-1: 46d8dd0a05b323d459f3f543eede3d633793d9b6

Related Changesets

occt: master 95db72f1

2015-05-06 14:05:39

solomin_s


Committer: bugmaster Details Diff
0026128: Visualization, TKOpenGl - fix misprint in external GLX context initialization

OpenGl_Window, GLX - push warning about missing caps in window Visual.
Allow initialization of alien GLX context.

Correction of misprinting
Affected Issues
0026128
mod - src/OpenGl/OpenGl_Window.cxx Diff File

Issue History

Date Modified Username Field Change
2015-04-23 10:27 solomin_s New Issue
2015-04-23 10:27 solomin_s Assigned To => kgv
2015-04-23 10:31 git Note Added: 0040152
2015-04-27 19:25 kgv Target Version 6.9.0 => 7.1.0
2015-04-27 21:27 solomin_s Status new => resolved
2015-04-28 11:43 kgv Note Added: 0040319
2015-04-28 11:43 kgv Assigned To kgv => solomin_s
2015-04-28 11:43 kgv Status resolved => feedback
2015-04-28 11:43 kgv Note Edited: 0040319
2015-04-28 11:55 solomin_s Note Added: 0040320
2015-04-28 11:55 solomin_s Assigned To solomin_s => kgv
2015-04-28 11:56 solomin_s Note Edited: 0040320
2015-04-28 11:56 solomin_s Note Edited: 0040320
2015-04-28 12:11 kgv Note Added: 0040327
2015-04-28 12:11 kgv Assigned To kgv => solomin_s
2015-04-28 12:11 kgv Summary Incorrect OpenGl_Window intialization with external OpenGl context on Linux => Visualization, TKOpenGl - fix misprint in external GLX context management
2015-04-28 12:12 kgv Summary Visualization, TKOpenGl - fix misprint in external GLX context management => Visualization, TKOpenGl - fix misprint in external GLX context initialization
2015-04-28 12:13 kgv Note Edited: 0040327
2015-04-28 12:44 git Note Added: 0040331
2015-04-28 12:49 git Note Added: 0040333
2015-04-28 12:50 kgv Note Added: 0040334
2015-04-28 12:50 kgv Assigned To solomin_s => san
2015-04-28 12:50 kgv Severity minor => trivial
2015-04-28 12:50 kgv Status feedback => resolved
2015-04-28 12:50 kgv Target Version 7.1.0 => 6.9.0
2015-04-28 12:59 kgv Product Version 6.9.0 => 6.5.3
2015-04-28 12:59 kgv Relationship added related to 0022819
2015-04-28 13:02 solomin_s Note Added: 0040338
2015-04-29 12:41 san Note Added: 0040409
2015-04-29 12:41 san Assigned To san => bugmaster
2015-04-29 12:41 san Status resolved => reviewed
2015-04-29 14:45 apv Assigned To bugmaster => apv
2015-04-29 20:28 git Note Added: 0040445
2015-05-05 16:44 apv Test case number => Not needed
2015-05-05 16:46 apv Note Added: 0040565
2015-05-05 16:46 apv Assigned To apv => bugmaster
2015-05-05 16:46 apv Status reviewed => tested
2015-05-07 11:18 bugmaster Changeset attached => occt master 95db72f1
2015-05-07 11:18 bugmaster Status tested => verified
2015-05-07 11:18 bugmaster Resolution open => fixed
2015-05-14 15:28 aiv Status verified => closed
2015-05-14 15:30 aiv Fixed in Version => 6.9.0
2015-05-14 16:37 git Note Added: 0041105
2015-05-14 16:37 git Note Added: 0041106