App developed in TD 5.2 on Terminal Service

Discussion forum about all things Team Developer 5.x and 6.x
Giorgio Bravi
Italy
Posts: 59
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

App developed in TD 5.2 on Terminal Service

Post by Giorgio Bravi » 13 Feb 2020, 08:57

Hello to all
I have a problem that I have been investigating for some time without result and that concerns the applications developed in CTD 5.2 and executed in the Terminal Service (RDP) environment.
If the user who is using the application closes the session (Repote Desktop) without first closing the application, when the user reopens the session the application remains frozen for a few minutes and then continues to function correctly.
This only happens with systems from Windows Server 2008 R2 onwards and only after one of the updates from Microsoft.
Has anyone noticed the same behavior?
Thanks in advance.

Giorgio

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2924
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: App developed in TD 5.2 on Terminal Service

Post by Dave Rabelink » 13 Feb 2020, 11:08

Does the application have open database handles?

Could it be that when the session goes to "sleep" the currently opened handle is disconnected and on resume it needs to reestablish the connection (which could take time) ?
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Giorgio Bravi
Italy
Posts: 59
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: App developed in TD 5.2 on Terminal Service

Post by Giorgio Bravi » 13 Feb 2020, 16:02

Yes, there are database connections that remain open.
The strange thing is that this only happens after applying the MS patch on the operating system. Before this everything is ok and if the application is run on previous relearse (for example Windows Serve 2008 not R2) everything works regularly without waiting times.
But this must be investigated.
I will try with an application without open DB connections.

Thank you for suggestion.

Giorgio

Giorgio Bravi
Italy
Posts: 59
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: App developed in TD 5.2 on Terminal Service

Post by Giorgio Bravi » 14 Feb 2020, 09:34

It just doesn't seem to be a problem with open handles.
I created from scratch a simple application MDI whith a menu that open empty forms with no action and the problem looks the same.
The waiting time seems to increase based on how many forms I open inside the MDI.
GDI problem?

Giorgio Bravi
Italy
Posts: 59
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: App developed in TD 5.2 on Terminal Service

Post by Giorgio Bravi » 14 Feb 2020, 09:42

The same application compiled with TD 7.x works perfectly.
I wish I could afford a general update (we are working on it) but we are talking about an ERP with more than 800 forms, a very articulated class framework and currently installed (and customized) in more than 600 companies. The process will take a long time ... and in the meantime other companies will update the server's operating system.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2924
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: App developed in TD 5.2 on Terminal Service

Post by Dave Rabelink » 17 Feb 2020, 06:32

Some things you might consider checking or testing out. (All using the simple test application without any business logic etc, only bare GUI).

- See if there is a difference when the application does not have a MDI. So only forms and also having only dialogs.
- Could the TD theme make a difference? Best option to use the Native WinXP theme first to check
- Create a timer on one of the forms. Display a counter on a field every second or so. Does the GUI update (is the timer executed/processed)?
- Any lines in the Windows log which has any reference to the application?
- While the application is running, run alongside ProcMon (process monitor) and perform the logoff logon. Does the ProcMon show any actions while the application is frozen?
(maybe you detect a repeating action or a single action which times out)
- Is the application running at 100% CPU when it is frozen?
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Giorgio Bravi
Italy
Posts: 59
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: App developed in TD 5.2 on Terminal Service

Post by Giorgio Bravi » 21 Feb 2020, 09:17

Resume of the tests

-No difference with/without MDI
-Native XP Theme only gain 1 second to unfreeze ( it seems )
-No actions on timer
-No trace of events in windows
-No actions on ProcMon
-CPU is 0%

The same behavior not only with Windows Server but also if I access a PC with Windows 10 in remote desktop.
I think the only possible solution is to intercept (I don't know if possible) the closure of the remote desktop and terminate the application with a warning, thus avoiding leaving it in an active state.
....Or speed up the transition to version 7.x
Anyway thanks for the advice

gigit
Italy
Posts: 152
Joined: 14 Jun 2017, 15:04
Location: Italy

Re: App developed in TD 5.2 on Terminal Service

Post by gigit » 04 Jul 2020, 07:44

or you can test some way if the application is used aand close it automatically after a certain time. so the user have to reopen it.

pascmeul
Belgium
Posts: 15
Joined: 09 Oct 2017, 08:50
Location: Oostkamp, Belgium

Re: App developed in TD 5.2 on Terminal Service

Post by pascmeul » 06 Jul 2020, 06:50

Hi,

we had the same issue with TD 5.2 and RDP and VMware. TD5.2 also froze on changing screen resolution.
We upgrade to TD6.3.9. Issues were solved.

Giorgio Bravi
Italy
Posts: 59
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: App developed in TD 5.2 on Terminal Service

Post by Giorgio Bravi » 07 Jul 2020, 17:01

I confirm that the problem is not present in TD7.x
We are migrating our products in 7.3 and everything seems to be ok.

Giorgio Bravi
Italy
Posts: 59
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: App developed in TD 5.2 on Terminal Service

Post by Giorgio Bravi » 31 Jul 2020, 10:29

Just to provide a sample for the problem, this is a basic application.
  • Compile (exe) in TD5.2
    Executed in a Terminal service session on a >Win2008 server
    Disconnect TS Session leaving the application running
    Reconnect to TS and.... see what happens : sleeping for more than 30 minutes on a 2019 server
It seems that changin the colors from 32 to 8bit the waiting time is smaller ( but it is unwatchable )

The same application in the same situation run like a charm in TS until Win 2008
You do not have the required permissions to view the files attached to this post.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests