Server 2012 Blank Maps, solved

A few users running copies of SNIP on remote machines (often with TeamViewer or with Microsoft’s MSTSC Client) have reported blank screens at times for both Maps and Documents.  While SNIP runs fine (servicing clients etc.), none of the reports can be viewed.   This article describes this issue further and states that incorrect screen drivers were partly to blame.  That is correct, but not the full story.

The problem is most prevalent on server OS machines such as Windows Server 2012 (all releases).  In some of these machines OpenGL is not correctly started, in a few there is simply no OpenGL support present.  [And this is a different issue than trying to run SNIP on a single-core under-powered machine.  A two-core machine is highly recommended.]

Solution #1, starting with a script

SNIP operator Alan Merkel describes the root cause and how to overcome it in the below email.  In essence, SNIP needs to be started locally for the correct local screen drivers to work.

Update, Late 2018

The root issue involved in this is the use of the desktop openGL drivers vs the remote drivers.  From SNIP release 2.07 onward, some additional startup code has been added to ensure the use of the correct drivers.  This is observed to fix the problem of ‘blank’ document screens for some uses, but we are not sure if it will address it for all user machines.  The machines that seems to be most often affected have settings or both English and another language installed.

The Windows Server Screen Issue & Solution

On 10/16/2018 6:31 PM, Alan Merkel wrote:

First, thanks for a GREAT hunk of software – well done sir.
Now on to the what, why, and fix for the map issue…

What –

Described on your website very well.  Blank screen on Map viewer window.

Why –

The software (not your fault I think) does not like the remote desktop protocol for the graphics.

How to make it happen –

Close SNIP.  RDP (MSTSC Client) into the server.  Open SNIP.  Blank map screen.

How to make it NOT happen –

Close SNIP.  From the server console open SNIP.  Working map screen.

Next, RDP into the server as the logged in user from the console session.  Working map screen.

How to prove it –

From the RDP session (previous step) close, then re-open SNIP.  Blank map screen.

Screen resolution and video drivers make no difference.  Only where it was started from (console or RDP).

Can I run SNIP as a service to avoid this, and how?

Thanks again,
Alan Merkel
Merkel & Associates, Inc.

 

A useful Script

In a subsequent email Alan provided a clever but simple batch script which can be placed alongside the Windows copy of SNIP (typically found at the folder: C:\Program Files (x86)\SNIP\bin) and run to overcome this.   Here is the resulting script, slightly modified by SNIP developers.  This will be included in all future SNIP installer releases.

@echo off
REM The active session has an arrow as the first character
setlocal EnableDelayedExpansion
FOR /F %%A in ('qwinsta') do (
set tempSessionName=%%A
if "!tempSessionName:~0,1!"==">"  ( 
@echo off
tscon.exe !tempSessionName:~1! /v /dest:console 
)
)
cd "C:\Program Files (x86)\SNIP\bin"
start simpleNTRIP.exe
cls
exit

This is quite similar to the script which is used to create environment variables and then to start SNIP in Ubuntu.  Be sure to edit the path to the SNIP executable  (simpleNTRIP.exe) if you have installed in another folder.

And in reply to

Can I run SNIP as a service to avoid this, and how?

We are developing a suitable solution to this now, which will also integrate with our pending 24/7 monitoring service.  Because SNIP manages several open log files containing the state of the machine, data logs, and users, using simple 3rd party tools to periodically hard restart the process can run the risk of damaging these files. This is not recommended.  Because SNIP is a GUI application it does require access to the desktop.

Some deployments report that they are using utility tools like SrvStart to run SNIP as a service in this way.

Solution #2, adding OpenGL support in software

SNIP operator Ola Torgeir Bue has found a 3rd Party OpenGL software DLL called “Mesa3D” that resolves the problem as well.   We have used it here on other Windows Server 2012 machines as well.  In the machines we have seen with this issue, the default language and keyboard has never been English (but it is not clear if this is part of the cause).

The link is:  https://fdossena.com/?p=mesa/index.frag

From that site:

Mesa3D can be used to provide a Software Renderer to OpenGL applications. It is especially useful to run old apps and games that use an old version of OpenGL and do not work properly on modern hardware. Please note that this renderer is far from perfect, and many games will not work.

And it works for SNIP.

The project is in active development  (Version 19.04 released May 9th 2019).
While intended for use with older Windows PCs, it seems to work fine on Windows Servers.
Be sure to take a look at the open license as well: https://mesa3d.org/license.html

Simply download it, extract it, and place it alongside simpleNTRIP.exe in your SNIP /bin folder.  Restart SNIP.  That’s it.

 

 

Was this article helpful?

Related Articles