LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI appication hangs occationaly

I have written one CVI application on Win XP, My application hangs occationaly.
My application contions table control and displaying data on each cell which is received from data socket.
Can somebogy help me to solve this problem..
0 Kudos
Message 1 of 7
(3,946 Views)

Hello Gajanan,

First which version of CVI are you using? If you set a breakpoint in your code and step through it, are you able to isolate where the program hangs? I wasn't able to reproduce this problem in CVI 7.1, so first I would suggest installing the latest runtime engine and see if this helps the situation. Then, if the problem still occurs, I would check to see if the table updating code works correct with the datasocket code commented out, and vice versa. Finally, are you able to reproduce this behavior on another machine?

Thanks, and let me know how this goes.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 7
(3,925 Views)
Hello Wendy,
Thanks for your reply, Actully I am using CVI 7.1. Appication hangs means Its locks up user Interface, Only through task manager I can stop the application. Its very difficult me to find out very exactly problem occurs since this problem comes some time and some time its work fine. Specially application locks up when I pass many events like clicking on table, scroll up and down etc.
Anyway I will try with latest engine and let you know,
Once again thanks
Gajanan
0 Kudos
Message 3 of 7
(3,914 Views)
One simple thing you can do, for first, is to insert

ProcessSystemEvents();

into the main loops in your application, it is a function to capture different events, including CLOSE buttons, and so on...

Bye!

graziano
0 Kudos
Message 4 of 7
(3,908 Views)
Hello Gajanan,

In order to address the situation, we have to be able to reproduce the problem. Do you have a test application or a set of steps that reproduces the issue? If so, could you post it on this forum?

Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 5 of 7
(3,890 Views)
Hello Wendy,
I am writing test application to get this problem, Once this is completed I will post it,

Thanks
Gajanan
0 Kudos
Message 6 of 7
(3,869 Views)
Hi Wendy,
My problem is solved by calling following function in the main function,
CA_InitActiveXThreadStyleForCurrentThread (0, COINIT_APARTMENTTHREADED);
Initially callback function were running in the system thread. But I am not able to understand why user Interface is locking when data socket callback function are running in system thread !

Thank You
Gajanan
0 Kudos
Message 7 of 7
(3,837 Views)