MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026128Community[OCCT] OCCT:Visualizationpublic2015-04-23 10:272015-05-14 16:37
Reportersolomin_s 
Assigned Tobugmaster 
PrioritynormalSeveritytrivial 
StatusclosedResolutionfixed 
PlatformLinixOSUbuntuOS Version14.04
Product Version[OCCT] 6.5.3 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.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
Attached Files

- Relationships
related to 0022819closedbugmaster Open CASCADE Redesign of OpenGl driver 

-  Notes
(0040152)
git (administrator)
2015-04-23 10:31

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
(0040319)
kgv (developer)
2015-04-28 11:43
edited on: 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?

(0040320)
solomin_s (developer)
2015-04-28 11:55
edited on: 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.

(0040327)
kgv (developer)
2015-04-28 12:11
edited on: 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.

(0040331)
git (administrator)
2015-04-28 12:44

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

(0040333)
git (administrator)
2015-04-28 12:49

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.
(0040334)
kgv (developer)
2015-04-28 12:50

Updated patch is ready for review.
(0040338)
solomin_s (developer)
2015-04-28 13:02

Yes, you are right! Thanks for update and fix :)
(0040409)
san (developer)
2015-04-29 12:41

Branch CR26128_1 reviewed without remarks, ready for testing.
(0040445)
git (administrator)
2015-04-29 20:28

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

(0040565)
apv (tester)
2015-05-05 16:46

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%]
(0041105)
git (administrator)
2015-05-14 16:37

Branch CR26128 has been deleted by inv.

SHA-1: 2f33c2350abea67971d020bc1f2f85d40262ed5d
(0041106)
git (administrator)
2015-05-14 16:37

Branch CR26128_1 has been deleted by inv.

SHA-1: 46d8dd0a05b323d459f3f543eede3d633793d9b6

- Related Changesets
occt: master 95db72f1
Timestamp: 2015-05-06 14:05:39
Author: 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
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 View Revisions
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 View Revisions
2015-04-28 11:56 solomin_s Note Edited: 0040320 View Revisions
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 View Revisions
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 user533 Status verified => closed
2015-05-14 15:30 user533 Fixed in Version => 6.9.0
2015-05-14 16:37 git Note Added: 0041105
2015-05-14 16:37 git Note Added: 0041106


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker