06-27-2024 04:48 AM
Hello friends,
My system ran in the CVI2020 environment and recently I have a problem: after running several tests the system stops responding to pressing buttons or recognizes it very late, 10-20 seconds. As far as I'm concerned, the system is stuck and I can't continue. It should be mentioned that in the background there is a very intensive activity of TCP communication against 3 servers.
Does anyone have an idea what is causing this problem?
thank you
07-04-2024 08:28 AM - edited 07-04-2024 08:43 AM
Hello, it is difficult to address this question as you give very little details on your scenario.
First of all, you should clarify whether the program hang depends on the program itself or from the OS: have you checked the level of activity of you PC? In case it is at 100% or so, is it a general activity or there is one thread or core tied up at full level while the others are at low percentage? Are other programs affected by this delay? And if you stop your program does the activity of the PC falls down or does it remain busy?
Is the program single- or multi-threaded? In the latter case, while the UI is hang are other threads working regularly?
You mention the activity against some TCP server: is this communications working while the application is not responding?
07-07-2024 01:22 AM
Hello Roberto,
Thank you for your response to my question. Below I will try to provide more details:
When the problem occurs all other external applications continue to function. That means everything works in WINDOWS. Furthermore, even in the application that I run, everything works, including the display that continues to show the results of tests that are carried out in the background, and includes TCP communication with several servers that continues to work. What doesn't work is the response to pressing any key, the pressing does not activate the relevant callback. The response comes at the end after a long time (5-20 seconds).
Yossi
07-07-2024 11:29 PM
@NiYossi wrote:
Hello Roberto,
Thank you for your response to my question. Below I will try to provide more details:
When the problem occurs all other external applications continue to function. That means everything works in WINDOWS. Furthermore, even in the application that I run, everything works, including the display that continues to show the results of tests that are carried out in the background, and includes TCP communication with several servers that continues to work. What doesn't work is the response to pressing any key, the pressing does not activate the relevant callback. The response comes at the end after a long time (5-20 seconds).
Yossi
Do you have a way to debug if the program is doing something intensively when it hangs?
07-10-2024 07:57 AM
Hello everyone,
I found the problem that caused the UI to freeze. As I mentioned, there is a lot of TCP activity in the background against 3 servers. The process is opening a connection with a server, sending several messages and then closing the connection. It repeats several times against several servers at the same time. Due to a bug I discovered, one of the connections was not closed and so after a few minutes several connections remained open and new ones were opened. I understand that this is what caused the UI to slow down. From a check with colleagues it turned out that indeed open TCP connections cause the UI to slow down.
After fixing the bug the problem was solved.
Thanks to those who tried to help.