From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible Bug with the CVI menu bar? (CVI 6.0)

I've come across a problem with the menu control in CVI 6.0 that I wonder if there is a fix to. If the mouse cursor is moved across the menu bar area, it can occassionally halt the running program. Moving the cursor off the menu area restarts it from where it was.
It doesn't happen in CVI 5.5 (but the menu behaviour has been changed since then, 5.5 doesn't have the little box highlighting menu items when the cursor moves over it.) It is a big problem for me, since my version of the TestStand Test Executive can possibly halt during testing. (Not a very safe condition!)
I've attached a program that shows the behaviour. Once running, slowly move the cursor back and forth across the menu bar and title bar and the program wil
l sometimes stop (It takes time but it will happen). The program increments the list index and beeps
(sorry about the noise!) but the beep will stop when the program halts (Just to indicate that it's not just Window messages that are stopped.)
If there is already a patch for this, where can I get hold of it?

(The system the program is running on is a 1GHz P4)
0 Kudos
Message 1 of 4
(2,945 Views)
Brian,

I've seen this problem also. It has to do with the menus being handled by Windows and interfacing with the CVI program event handlers. NI knows about the problem and workaround is to schedule your processing loop or any code segment that needs uninterrupted processing in a separate thread function and wait for thread completion for your program to continue. This allows your program to continue even if the user is mousing over the menu but it also still gives you user access. I've attached an example of the problem and of the workaround. Hope this helps.

Ron
Download All
0 Kudos
Message 2 of 4
(2,944 Views)
I am encountering a similar menu bar problem with my application developed with CVI V6. The application starts up normally, but if the mouse is "parked" over the menu bar execution halts in a call to ProcessSystemEvents(). It doesn't matter if the mouse is over an actual menu item or not - as long as it is anywhere in the menu bar execution is suspended. It will stay in this state indefinitely or until the mouse is moved off the menu bar. I'm hoping that some kind of workaround (other than additional multithreading) has been developed in the more than two years since this was originally reported.

- dale
0 Kudos
Message 3 of 4
(2,906 Views)
Yes, this was a bug with CVI 6.0. It was fixed in the next version of CVI (7.0).

Sorry for the inconvenience.

Luis
NI
0 Kudos
Message 4 of 4
(2,875 Views)