View Issue Details

IDProjectCategoryView StatusLast Update
0023003Open CASCADEOCCT:Visualizationpublic2012-11-16 13:18
ReportervtnAssigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionreopened 
PlatformWindowsOSVC++ 2008 
Product Version6.5.2 
Target Version6.5.4Fixed in Version6.5.4 
Summary0023003: Photos of AIS Viewer are corrupted on Windows if tests are executed remotely
DescriptionDescription:
Test executable: http://svn/svn/occt/trunk/tests/tap-tools/
Test cases: http://svn/svn/occt/trunk/tests/mesh

Preparation of environment:
ssh -l mnt quadrex

export os_type=Windows
export CASROOT=//slotex/nnt_06/KAS/dev/occt-652-opt-vc8
export OCCT3RDPARTY=//Aquarex/nnt_03/Common/OpenCASCADE6.5.2/3rdparty/win32
export TESTS_DATA=x:/tests_data

execution string:
.../tap-tools/run.sh .../tap-tools/env.sh .../tests .../results mesh 001 A2
TagsNo tags attached.
Test case number

Attached Files

  • A2.gif (9,669 bytes)

Relationships

related to 0023001 closedbugmaster Mistake in OpenGl_FrameBuffer::IsValidDepthBuffer 

Activities

vtn

2012-02-28 11:58

developer  

A2.gif (9,669 bytes)

kgv

2012-02-28 12:09

developer   ~0019795

Please provide information about used SSH server.

vtn

2012-02-28 12:20

developer   ~0019797

OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011

kgv

2012-02-29 10:22

developer   ~0019809

Last edited: 2012-02-29 10:30

sshd is launched as service that cause several limitations in Windows.
Services started with non-interactive session and isolated from available interactive sessions.

Interactive application (OCCT uses OpenGL thus it is interactive even in off-screen mode) launched by service get no any hardware acceleration for GDI and OpenGL and has dedicated (non-visible) desktop.

DRAWEXE launched by ssh service got Microsoft software GL context like this:
  GLvendor = 'Microsoft Corporation'
  GLdevice = 'GDI Generic'
  GLversion = '1.1.0'
  GLSLversion = ''

This results in folowing critical problems:
 - No hardware acceleration
 - No FBO support, required for correct off-screen rendering
 - Outdated GL version not main goal for testing company (visualization tests)

V3d provide OpenGL dump capabilities without FBO for outdated GL implementations (for backward compatibility). However this support is limited to:
 - Requested image dimensions should corresponds to window
 - GL driver should provide at least double buffer support (otherwise image dump may be overlapped by other windows)
 - GL window should fit to the desktop (otherwise GL driver may clip rendering and result image)
 - Result not guarantied even when above conditions are satisfied

According to attached snapshots GL driver clip the image because it doesn't fit to the desktop. This is because Windows create desktop for non-interactive sessions with some basic dimensions.

vinit command currently uses predefined (left= 0; top= 460) position and width=height=409 (all in pixels). This window position fits in all modern monitors but not in ultra-low resolutions like 1024x768 and 800x600.
460+409-768=101 and this corresponds to observed clipped 101 bottom pixels on snapshots. As workaround vinit command can be called with explicit position 'vinit 0 0 409 409' (ugly 409 pixels hardcoded for backward-compatibility) or try to write small application that changes resolution of non-visible desktop.

The best solution - to launch DRAWEXE within active interactive session. This is the ONLY solution that provides hardware accelerated GL context.
The drawback of this solution - it requires that interactive session is really exists, means - some user is logged-in locally on server and will not log-off until tests will done.

So the simplest way - to launch DRAWEXE interactively (means - launch it using display physically connected to workstation). Other ways - to launch interactive application from service - are much more complicated. See this link for full-fit description:
http://blogs.msdn.com/b/winsdk/archive/2009/07/14/launching-an-interactive-process-from-windows-service-in-windows-vista-and-later.aspx

And the last solution - to use another software implementation of OpenGL. Mesa3D project provides implementation of GL2.0+ standard including FBO required for correct off-screen rendering. The installation is simple - just prepend path to Mesa3D implementation of GLU32.DLL and OPENGL32.DLL libraries to PATH (tested within precompiled Mesa3D 6.41 available on web).

vtn

2012-02-29 16:09

developer   ~0019819

Last edited: 2012-02-29 19:22

The image is created well if window is created with 0 0 coordinates:
vinit 0 0 409 409
This workaround is implemented in draw.pl

Mesa have not an influence on photo.

vtn

2012-07-11 14:18

developer   ~0020902

The draw.pl is not exists anymore. The fix should be implemented on DRAW.

vtn

2012-07-11 14:23

developer   ~0020904

Dear Andrey,

The fix is integrated in CR23087_CR23210_master GIT repository.

Please review it.

Vladimir

abv

2012-07-11 15:42

manager   ~0020909

Reviewed with no remarks; the fix is in CR23003

abv

2012-07-11 16:05

manager   ~0020912

The fix is simplified following remark by Kirill: now default top co-ordinate of the AIS window is set to 0 on all platforms.

Related Changesets

occt: master 8c3c9904

2012-07-13 12:09:09

abv


Committer: abv Details Diff
0023003: Photos of AIS Viewer are corrupted on Windows if tests are executed remotely

Default position of 3d viewer window created by vinit command is set to the right-left corner of the screen (0,0) to avoid problems on small screens, e.g. dummy remote desktops

Default position of 3d viewer window created by vinit command is set to be close to the right-left corner of the screen (0,0) to avoid problems on small screens, e.g. dummy screens of remote desktops
Affected Issues
0023003
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2012-02-28 11:58 vtn New Issue
2012-02-28 11:58 vtn Assigned To => kgv
2012-02-28 11:58 vtn File Added: A2.gif
2012-02-28 12:00 vtn Description Updated
2012-02-28 12:09 kgv Note Added: 0019795
2012-02-28 12:09 kgv Assigned To kgv => vtn
2012-02-28 12:09 kgv Status new => feedback
2012-02-28 12:20 vtn Note Added: 0019797
2012-02-28 12:20 vtn Status feedback => assigned
2012-02-28 12:20 vtn Assigned To vtn => kgv
2012-02-28 12:20 vtn Reproducibility have not tried => always
2012-02-29 10:22 kgv Note Added: 0019809
2012-02-29 10:24 kgv Note Edited: 0019809
2012-02-29 10:27 kgv Note Edited: 0019809
2012-02-29 10:30 kgv Note Edited: 0019809
2012-02-29 10:31 kgv Assigned To kgv => vtn
2012-02-29 10:31 kgv Status assigned => feedback
2012-02-29 16:09 vtn Note Added: 0019819
2012-02-29 16:09 vtn Status feedback => assigned
2012-02-29 16:09 vtn Status assigned => resolved
2012-02-29 19:21 bugmaster Status resolved => reviewed
2012-02-29 19:22 bugmaster Status reviewed => verified
2012-02-29 19:22 bugmaster Resolution open => fixed
2012-02-29 19:22 bugmaster Note Edited: 0019819
2012-03-11 10:45 bugmaster Target Version => 6.5.3
2012-03-11 10:55 szv Summary Photos of AIS Viewer are currupted on Windows if tests are executed remoutly. => Photos of AIS Viewer are corrupted on Windows if tests are executed remotely
2012-03-21 12:33 apl Relationship added related to 0023001
2012-07-11 14:18 vtn Note Added: 0020902
2012-07-11 14:18 vtn Status closed => feedback
2012-07-11 14:18 vtn Resolution fixed => reopened
2012-07-11 14:18 vtn Status feedback => assigned
2012-07-11 14:23 vtn Note Added: 0020904
2012-07-11 14:23 vtn Assigned To vtn => abv
2012-07-11 14:23 vtn Status assigned => resolved
2012-07-11 15:42 abv Note Added: 0020909
2012-07-11 15:42 abv Assigned To abv => bugmaster
2012-07-11 15:42 abv Status resolved => reviewed
2012-07-11 16:05 abv Note Added: 0020912
2012-07-12 11:29 apn Assigned To bugmaster => apn
2012-07-17 17:50 abv Changeset attached => occt master 8c3c9904
2012-07-17 17:52 abv Assigned To apn => abv
2012-07-17 17:52 abv Status reviewed => verified
2012-10-01 14:30 bugmaster Target Version 6.5.3 => 6.5.4
2012-11-16 13:14 bugmaster Fixed in Version 6.5.3 => 6.5.4
2012-11-16 13:18 bugmaster Status verified => closed