tl;dr: In 2 of 10 Cases, the CustomerNumber seems to be going lost but the Window is not “detecting” this a behaving as if the CustomerNumber is there.
We are having an Issue with Clients working on a Windows Terminal Server 2016 Standard 64bit’s with a 32Bit Xojo Made Application.
In my App the User can create multiple Instances of a Window. The Window is not Implicit Instanciated, i open it with:
Dim w As New WindowName
w.CustomerNumber = StringVar
w.Show
i also tried a Global Property in a Module WindowXYZ(-1) As WindowName and the Code:
Dim w As New WindowName
WindowXYZ.Append(w)
w.CustomerNumber = StringVar
w.Show
and i tried both without the w.Show and also as Implicit Instanciated Window.
Approx. 250ms after the Window has been created, a Timer runs which verifies
if self.CustomerNumber.Trim<>"" and if this is FALSE,
the Window should write a Message into a Textfield in this window and it should report the Issue to our Database (works fine in all other situations since 5 years) and disable a “Save Button”.
If CustomerNumber.Trim<>"" is True, it will display the CustomerNumber in the Window.Title.
Because i can’t remote debug this (Connecting via Internet to Terminal Server via Tunnel and something is preventing the Remote Debugger to detect the IDE…) i am now totally lost on what’s causing this issue.
Any Ideas anyone?
BTW: I should mention that this issue NEVER occurrs when the App is running locally on a Machine and NOT on a Terminal Server.
Done by standard and the strange part is, the Code does not trigger any issue at this point.
CustomerNumber must be = “” to see thing happen like they do on the Client Screen, but the Code clearly shows a CustomerNumber and lines like “If CustomerNumber.Trim=”“” or “If CustomerNumber.Trim.Len=0” are passing fine (because the CustomerNumber is there).
BTW: CustomerNumber is delivered by a mySQL Database and can never be “”, but i check it for safety reasons.
BTW: I use the System.Log Function (and for this the Eventviewer on Windows) because the Issue seems not to occurr even if i run the Debugger (+Client/App) right on the Server. But the error looks somewhat random and i can’t be sure …
My app loads uppon opening a Window, the previous used position and dimension of the window from a configuration file.
This works fine on standard Windows Desktop Systems, but fails on the Terminal Server (a rights issue or maybe a locked file issue…).
Because this is not a critical section of my App, an unhandled exception in such a situation is just reported to the System Log and then discarded by the App, so it can continue it’s work. But in this specific Window, i tried to “soon” to load the configuration and following code was not executed.
My Quick&Dirty fix is now to use a Try…Catch block when my Prefs.Class tries to read/write values to the Config.File.
Time is currently very rare and my Boss is fine with this solution…