LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

RunUserInterface freezes randomly

The context:
I have built 2 applications using Labwindow/CVI in 2 Visual C++ 6.0 projects.

The first program is in charge of acquiring an analog signal and of putting this acquired signal in a bloc of shared memory.

The second program reads the shared memory and displays it in its interface.

The problem:
The problem is that this 2 programs freeze after a random couple of minutes. Sometime after 2 minutes, sometime after 4 hours, sometime only one application freezes, sometime the 2 freeze.

Each time, CPU usage raises to 100%. If I break the program (in debug mode), I see that it is the main thread (in RunUserInterface()) which is the crazy one.

The infos:
- I use several threads that are not created using a Labwindow/CVI function call (like all multithread function calls).
- In these threads, I call functions to set display infos (SetCtrlAttribute and SetCtrlValue).
- I use a timer to read IO (sometime it takes a long time).
- I have not tested the release mode.

The question:
Do you know an issue that explain why RunUSerInterface becomes crazy?
0 Kudos
Message 1 of 4
(3,379 Views)

Hello,

the following document can help you to understand the behaviour of the RunUserInsterface() fonction.

Why Does a CVI Application Use So Much Processor Time?

 
hope this helps
 
Alexandre D
0 Kudos
Message 2 of 4
(3,347 Views)
Thanks for you reply.

The "normal" CPU usage of my application is under 8% on my old AMD-K6II 500MHz.

It is not a problem for me if this valeur increases.

But the application freezes completely. There is no interface refresh, no timer event...

Do you think that, if I use ProcessSystemEvents() like in the example, I can have more control on the event loop system of CVI?

PS: I use Labwindows/CVI version 6.0.0 (105)
0 Kudos
Message 3 of 4
(3,336 Views)
Just a correction to my precedent message:

The timer events effectively occure. But the interface doesn't refresh at all.
0 Kudos
Message 4 of 4
(3,330 Views)