I have been working on an application and found that when connecting remotely via TeamViewer and Radmin, the application freezes.
When it freezes, there are no exceptions, the ui is unresponsive and the process DOES NOT hang in resource monitor or process explorer.
Some basic specs for the application: Connects to 2 COM ports. One for input, one for output. The output COM also requires a keep alive signal every 5 seconds. There are 4 background worker threads running various tasks from UI updates to speech output as well as handling the data input. The UI displays data in real time from 3 separate data sources. Two are the COM ports, one is MS SQL.
RDP does not hang the application at all.
Any ideas on what may be causing this?
It is running on .NET 4.5.1 built in VS Ultimate 2013 with SQL 2012 backend.
I have tried changing between 64-bit and 32-bit without any progress as well.
EDIT Responses to fsintegral.
- All loops in the application do end but are called very often. Each timer has a 1.5 - 5 second repeat and there are times that the process within the timer takes more than the tick time. The timers all call to a Background Worker and check for .isBusy before starting the process to avoid overlap.
The timers are intended to run endlessly but this is different than an infinite loop.
Is there a way to check for invisible dialog boxes? I don't believe any exist but I would like to know how to make sure.
I have spent a good chunk of time optimizing data load times per background worker and gotten each process down to less than a second for data load. There are two things that cause one of the processes to run longer. One of them is speaking an alert using SpeachSynth and can take up to 60 seconds per block of code. The other is e-mail, which I have put into an async process to keep it from hanging the application if there is a timeout. But, the application hangs even when these two items are not being processed.
Cascading events. Would this be events triggered by other events? IF so, the application does not utilize this type of action. The application does however call to about 15 separate modules from at least one of the Background Workers. I don't believe this is too high of a number but let me know if it is. I can post some pseudo code if it this is a concern.
Application.Sleep() is not used but Application.DoEvents() is when waiting for a certain amount of time to pass.
IEDim startTime As Date = Now Dim timePassed As TimeSpan = Now - startTime Do Until timePassed.TotalSeconds > 5 timePassed = Now - startTime Application.DoEvents() Loop
The main reason for the vagueness is that I was hoping this issue was known with TeamViewer or Radmin based on the types of items in the application. IE SQL version, COM ports and BW.
Thank you ahead of time.