LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

tooltip.fp problem

I have CVI 5.5. I am having a problem with the tooltip.fp downloaded from this site. I got the instrument from this zip file:
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/dfd062d0bcdebc1786256a48005fd4b3/$FILE/ToolTip.zip

The zip file includes a sample project, it works fine. But when I try to put tooltips in my project, I get errors - "NON_FATAL RUNTIME ERROR - Panel, pop-up, or menu bar handle is invalid" - in tooltip.c, the source code for the instrument. The error happens as soon as the panel is displayed, then they occur continuously unitl the project is stopped. I cannot find any compiler or runtime setting which is different on my project vs. the sample.
0 Kudos
Message 1 of 8
(4,098 Views)
This error is pretty common and means that the control constant passed to a user interface function is not a valid control for that function call. You could be sending in an invalid constant to one of the tooltip functions. There is really no way for me to know what is causing this without seeing your code. You have the source code for the tooltip.fp so it should be pretty easy to debug on your end. Just add the tooltip.c file to your project and then debug it. When you get the error, it should break in the tooltip.c file and show you exactly where the error occurred. Then you can look at the call stack and see where it happened in your program and look at the values of the variables and constants you are sending in to the functions.

Good luck,


Chris Matthews
National Instruments
Message 2 of 8
(4,098 Views)
Actually, I also am getting this exact same problem. HOWEVER, only
when I am "debugging" the program. If I run it standalone, the error
does not occur. And that is the _dbg.exe version or the standard .exe
version. Either run standalone works fine. It is really quite
repeatable and given that it does work standalone, it is hard to see
how the value passed could be wrong.

I used example6 from the tutorial as a basis.

Is there a way to fix this? I don't want to give up the ability to
debug in CVI just to get tooltips.

I am running version 6.0 of CVI, by the way.

Thanks for your help on this.

- Harold

Chris Matthews wrote in message news:<506500000005000000794F0000-1005954886000@exchange.ni.com>...
> This error is pretty common and means t
hat the control constant passed
> to a user interface function is not a valid control for that function
> call. You could be sending in an invalid constant to one of the
> tooltip functions. There is really no way for me to know what is
> causing this without seeing your code. You have the source code for
> the tooltip.fp so it should be pretty easy to debug on your end. Just
> add the tooltip.c file to your project and then debug it. When you
> get the error, it should break in the tooltip.c file and show you
> exactly where the error occurred. Then you can look at the call stack
> and see where it happened in your program and look at the values of
> the variables and constants you are sending in to the functions.
>
> Good luck,
>
> Chris Matthews
> National Instruments
0 Kudos
Message 3 of 8
(4,098 Views)
Yea, it's a NON FATAL RUNTIME ERROR. That means it's still an error, but it won't stop the program, that's why you won't see it outside of debugging. I would still try and fix it though. It will most likely cause a misbehavior in your program.

Chris Matthews
National Instruments
0 Kudos
Message 4 of 8
(4,098 Views)
Chris Matthews wrote in message news:<50650000000500000053500000-1005954886000@exchange.ni.com>...

Yes, you are correct. I have located the errors (several) in the
tooltip source code and I would like to be able to send you the new
version so that the version on the NI site could be updated. How do I
do that?

The errors I found were:

- allocating storage in a header file (poor practice)
- using variables without checking that they are valid (2 instances),
which is where the runtime non-fatal errors were coming from
- Typos in the .sub file that made the function panel interface
useless

-- Harold

> Yea, it's a NON FATAL RUNTIME ERROR. That means it's still an error,
> but it won't stop the program, that's why y
ou won't see it outside of
> debugging. I would still try and fix it though. It will most likely
> cause a misbehavior in your program.
>
> Chris Matthews
> National Instruments
0 Kudos
Message 5 of 8
(4,098 Views)
Send it to me and I'll take care of it. chris.matthews@ni.com
0 Kudos
Message 6 of 8
(4,098 Views)
Chris,
I am also getting same error. Can you please send me updated tooltip.c source code? The one I downloaded from NI sites gives error as mentioned by others.
Regards
Niranjan
0 Kudos
Message 7 of 8
(4,098 Views)
I am also getting these errors in my application written with version 5.5 of LabWindows. In my case it seems to happen as I jump back an forth between panels. It's like the UIR functions forget the panel handles for some on the controls when I go back into a panel. As long as I stay on the one panel all the controls work fine, but if I discard that panel and load/display another then go back and re-display that first panel again some (not all) of the controls quit working and give that error. I'm using the literal #define macros for the panel and control written by UIR in these calls and their values look right when I view them in debug, and as I said they all worked just fine in the initial displayed panel.
0 Kudos
Message 8 of 8
(4,098 Views)