Re: Issues with VSE GUI applications and Remote Desktop?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Issues with VSE GUI applications and Remote Desktop?

Anders Sandvig
Thank you for your input (Todor also).

I did some more experimenting yesterday with Remote Desktop running as a
normal
window (not fullscreen), and then the application starts, even if the
Remote
Desktop window is inactive, partially or fully covered by another window
or
partially or fully located off-screen. The new conclusion being that the
application only hangs on startup when Remote Desktop is either
minimized or
disconnected.

(The distinction between minimized and inactive is not obvious when
running in
fullscreen mode, as the default way of "getting rid of" the Remote
Desktop
window is then to minimize it, via the toolbar at the top of the screen,
and
not switch avway via Alt-Tab.)

I also tried out various ways to disable the splash screen, with no
luck. If I
delete the app.bmp file, starting the application while logged on works
fine
(no splash screen shown), but starting it while Remote Desktop is
minimized or
disconnected gives a message box saying "Virtual machine stack
overflow." once
logged back on.

Replacing app.bmp with app.dll containing empty implementations of
OpenStartupDialog() and CloseStartupDialog() (as described in section
"Adding a
Sign-on Dialog" in chapter 5-3 of the VSE User's Guide) also gives the
same
result (OK when logged in, stack overflow when minimized/disconnected).

So, in summary:

With normal splash screen: Starts OK when logged on, hang when
minimized/disconnected.

With no splash screen: Starts OK when logged on, stack overflow crash
when
minimized/disconnected.

With no splash screen and empty DLL: Starts OK when logged on, stack
overflow
crash when minimized/disconnected.

Whether it's Remote Desktop or VSE who is to blame, I don't know, but I
still
think it's a rather odd behavior...


Jon Raiford wrote:
> Could what you are seeing be because the console hasn't been logged in
and no
> application windows are allowed to be created yet? Try logging into
the
> actual console of the machine and see if it also works. I find it hard
to
> believe the remote desktop is significant.

No. If that was the case, the Python script wouldn't be running either,
which
it is (as can be verified via its HTTP admin interface and also seen as
a
running "DOS box" once logged on via Remote Desktop). Also, the setup
works
perfectly for all applications that are not written in VSE... ;)


> Regardless, its probably best to run this as a Windows service. You
can use
> something like FireDaemon (http://www.firedaemon.com
> <http://www.firedaemon.com/> ) to launch any app as a service and it
even has
> an option for "Interact with Desktop". This lets it run as a desktop
and
> still show the GUI. We use it and it works good.

Eventually we want to go the Windows service route, but that's further
down the
road, as there are several other issues in the application and related
systems
that need to be sorted out first. For now, we would like to get the
setup we
already have in place to work better. :)


Anders

***           this signature added by listserv             ***
*** Visit  http://www.listserv.dfn.de/archives/vswe-l.html ***
*** for archive browsing and VSWE-L membership management  ***
Reply | Threaded
Open this post in threaded view
|

Re: Issues with VSE GUI applications and Remote Desktop?

Möbus. Manfred

Not sure if this helps, but maybe related to your situation:

 

There is CursorManager class>>cursorPosition,

Sometimes the api function GetCursorPos() returns false when the current desktop is not visible in the “ordinary” way, e.g. screensaver active, and probably also disconnected rdp sessions.

Since it is invoked on many places, this may cause such errors. We have patched it long ago to return the point 0@0 if the api function fails (be sure to return a point and not nil, because the senders do not check).

 

Manfred

 

From: Using Visual Smalltalk for Windows/Enterprise [mailto:[hidden email]] On Behalf Of Jon Raiford
Sent: Mittwoch, 27. Oktober 2010 15:31
To: [hidden email]
Subject: Re: Issues with VSE GUI applications and Remote Desktop?

 

Hi Anders,

Could what you are seeing be because the console hasn't been logged in and no application windows are allowed to be created yet?  Try logging into the actual console of the machine and see if it also works.  I find it hard to believe the remote desktop is significant.

Regardless, its probably best to run this as a Windows service.  You can use something like FireDaemon (http://www.firedaemon.com) to launch any app as a service and it even has an option for "Interact with Desktop".  This lets it run as a desktop and still show the GUI.  We use it and it works good.

Hope this helps..

Jon




From:        Anders Sandvig <[hidden email]>
To:        [hidden email]
Date:        10/27/2010 08:40 AM
Subject:        Issues with VSE GUI applications and Remote Desktop?
Sent by:        Using Visual Smalltalk for Windows/Enterprise <[hidden email]>





I'm wondering, has anyone had any problems with running software
developed with VSE under Windows Remote Desktop?

We have a VSE GUI application running on Windows Server 2003 as a Remote
Desktop console user (mstsc.exe /console). Since the application
requires a GUI (and can't run as a Windows service) we run it as console
user to allow the application to continue running even after the Remote
Desktop/Windows user has logged off.

The VSE application is managed by a continuously running Python script,
which will start and stop the application on demand (using the Python
subprocess module) in addition to monitoring the running VSE process and
restarting it if terminated unexpectedly.

This is all working fine, except the VSE application will only start
when a user is logged in via Remote Desktop and the Remote Desktop
window is the currently active window. Once started, the application
keeps working even if the Remote Desktop user logs off, but if it's then
terminated and started again (via the Python script), the application
hangs on startup. The same problem occurs if the user is logged in via
Remote Desktop but the window is not currently active (i.e. the user
switched to another application).

What I find particularly odd is that the VSE process seems to start OK
(i.e. suprocess.popen() returns a valid Popen object with a valid PID),
but our application is never loaded. However, as soon as a user logs on
to Remote Desktop (switches back to the Remote Desktop window), the
splash screen suddenly appears and the application loads. Apparently, it
does not matter if we do this after a few seconds or several minutes,
the application simply does not load until there is a Remote Desktop
user connected with an active window.

Have any of you experienced any problems similar to this or have any
idea what might be causing it?

I'm thinking the problem might be related to how VSE loads the splash
screen, so maybe disabling the splash screen would help (i.e. if the
splash screen code requires an active desktop window or somethin odd
like that)? I've tried deleting the splash screen image on disk and
replacing it with a 0 byte file, but that just caused the application to
crash on startup. Maybe there is a better way to do this (i.e. one that
actually works)?

Note: I think it's unlikely that the problem is caused by the Python
script, as the start/stop/restart logic is working as expected as long
as a Remote Desktop user is connected with an active window. Everything
also works as expected when running on a local desktop instead of via a
Remote Desktop connection.


Regards,

Anders Sandvig

***           this signature added by listserv             ***
*** Visit  
http://www.listserv.dfn.de/archives/vswe-l.html ***
*** for archive browsing and VSWE-L membership management  ***

*** this signature added by listserv *** *** Visit http://www.listserv.dfn.de/archives/vswe-l.html *** *** for archive browsing and VSWE-L membership management ***


AEB-Fachforum am 3. November 2010
Logistik zum Anfassen. Außenwirtschaft zum Erleben. AEB lädt Sie ein zu Fachvorträgen,
Workshops, Führungen und zum Networken am Flughafen Stuttgart. www.aeb-event.de
*** this signature added by listserv *** *** Visit http://www.listserv.dfn.de/archives/vswe-l.html *** *** for archive browsing and VSWE-L membership management ***
Reply | Threaded
Open this post in threaded view
|

Re: Issues with VSE GUI applications and Remote Desktop?

Anders Sandvig
On Thursday, October 28, 2010 1:56 PM, Möbus. Manfred wrote:

> Not sure if this helps, but maybe related to your situation:
>
> There is CursorManager class>>cursorPosition,
>
> Sometimes the api function GetCursorPos() returns false when the current
> desktop is not visible in the *ordinary* way, e.g. screensaver active, and
> probably also disconnected rdp sessions.
>
> Since it is invoked on many places, this may cause such errors. We have
> patched it long ago to return the point 0@0 if the api function fails (be
> sure to return a point and not nil, because the senders do not check).

Apparently, so have we. I just checked the code, and it has been altered to
return (0@0) instead of self osError when UserLibrary getCursorPos: returns
false.

Thanks for the tip though. :)


Anders

***           this signature added by listserv             ***
*** Visit  http://www.listserv.dfn.de/archives/vswe-l.html ***
*** for archive browsing and VSWE-L membership management  ***