LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Bad panel handle errors

While debugging my LabWindows application it invariably pops-up with "Library function error (return value == -4 (0xfffffffc)), Panel, pop-up, or menu bar handle is invalid" even though the handles ARE valid when viewed in watch. It doesn't happen in the same place or on the same line of code. It's as if the panel control (or debugger) starts forgetting handles when jumping between panels.
0 Kudos
Message 1 of 2
(2,996 Views)
JMR,

A panel handle is just a number held in a variable that identify a specific panel loaded into memory. The error should only appear when you discard a panel and then try to reference it again, or when you use the panel handle in a function with a control not contained in that panel.

The first thing here is to make sure that the value of the handle does not changes for any other reason that a LoadPanel or a DiscardPanel, you can use something like DebugPrintf("%d\n", panelHandle) all over that part that generates the error. If you know that the value of the handle is not changing then you may want to reinstall the CVI run-Time Engine; you can find it in http://www.ni.com/downloads/

I hope this information helps, let me know if you have any question or mo
re information on what is going on.

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(2,996 Views)