LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 1160 illegal menu

I am trying to debug this vi. It runs and gives me a menubar in the main program, but when I build an exe the menu stops responding. The vi I have attached generates an error of 1160, which I found to be an illegal menu. What is illegal about it and how do I legalize it?
 
Tay
0 Kudos
Message 1 of 7
(3,844 Views)

How is this menu VI called in the main application?  Whenever I hear that something stops working when an application is turned into an .exe, it makes me think of the issues with the reference paths to VI's being different in .exe files as compared to the development environment.  There have been numerous message threads about this issue.

Here is one such thread.  It is about a .dll not working.  But the principle about the VI file path is there.

Message 2 of 7
(3,835 Views)
I'll post back tomorrow on this, when I have a chance to investigate this possibility.

Tay
0 Kudos
Message 3 of 7
(3,830 Views)
Ok, have it working!

I didn't have all of the vi's in the same llb prior to the build. I thought the program would suck the scattered one or two from their other locations.

Thanks for the lead!

But it still doesn't explain the error code, which occurs even though the program works.

Tay
0 Kudos
Message 4 of 7
(3,806 Views)
I am not able to reproduce your error by running your VI in LabVIEW 8.21 or 8.5.  Must it be in an executable to give you the error?
Message 5 of 7
(3,782 Views)
I am using 7.1. It shows up during 'highlight mode' or if I have a probe on the 'error out' wires. I didin't get any error with the executable; the program would simply ignore my menu selections and run in a slightly fater way, and accept no further input.

I have attached a screen shot of the vi running in highlight mode. I can't really provide the parent program to help with this, unfortunately. But it is running now at least. The question is at this point more of a curiosity for me. The error shows on the 'error out' line all the way across the program starting at the 'delete menu items' function, until it comes out of the for loop at the right, when it has somehow become 'ok'.

Tay

Message Edited by slipstick on 08-27-2007 09:35 PM

0 Kudos
Message 6 of 7
(3,772 Views)

I know why it comes out okay in the end.

The for loop does autoindexing.  Since the input array is empty, it runs 0 times.  So the error coming into the loop never passes through the wire to the exit of the loop, because that wire doesn't execute.  So the default value of the exit terminal runs, which is a "No error" value.

Now that doesn't explain the initial 1160 error occurring right at the delete menu items function.  So the question is what is wrong with the menu reference coming in.  Put a probe on the wire between the control and delete menu items function.  Also put a probe in the main VI wherever the menu reference gets passed into the sub-VI.  See if that sheds any light.  When I ran a sample VI to see what the probe shows, I saw a 8 or 9 digit decimal number.  And that number increased with each time I started the VI.

Also try a Get Menu Info right before deleting and look at an indicator of its output.  See if that function generates an error since that function is just looking at data rather than taking the action of deleting it.

Message Edited by Ravens Fan on 08-27-2007 11:04 PM

0 Kudos
Message 7 of 7
(3,761 Views)