09-30-2011 08:50 AM
We had an issue with an executable delivered to our customer. When they started the executable, it displayed an error message, not the exact words, but something like 'Cannot load the front panel of ... Mean.vi'.
We have updated the executables a few times, but this is the first time that we have this type of error message. I had no clue what was wrong until I opened the source code and found this 'Mean.vi'. Somehow, it showed that this VI was locked, and I have to click 'unlock' to set it free. After that, I recompiled the executable and everything back to work again.
I am totally confused. Anyone knows how or this is happening?
Thanks.
09-30-2011 08:59 AM - edited 09-30-2011 08:59 AM
Mean.vi is a standard VI that ships with LabVIEW. It is not locked for "no reason". There was a recent discussion on problems with executables and the Mean VI over at lava: http://lavag.org/topic/14912-probelm-with-the-meanvi/
09-30-2011 09:06 AM
That was what happened to my code, and it is about this 'Mean.vi' again, but he did not say whether it was locked. He simply replaced it.
So, still, I cannot find a reason why it is 'locked', or in his case, why it cannot be loaded from the executables.
09-30-2011 09:14 AM
It's locked because, as I said, this is a standard VI that ships with LabVIEW and NI doesn't want people to make accidental changes to VIs from vi.lib. The issue that you are encountering is not limited to the Mean VI. It's been seen in other cases as well. I can tell you that I have built applications that use the Mean VI and never had a problem. And I never unlocked the VI. The "unlocking" that you did may have been a fluke. This is an extremely annoying problem, and unfortunately, there is very little feedback from the development environment and the Run-Time engine that can be used by the programmer to figure out what's wrong.
09-30-2011 11:57 AM
The weird thing is that it is not happening evey time. Like I said, I have updated the code multiple times, but only this time it cannot load 'Mean.vi'. So it must be something I did to cause the vi to be locked before I knew it. I am trying to find out the reason.
10-03-2011 02:11 PM - edited 10-03-2011 02:11 PM
Hi MengHuiHanTang,
In order to clarify it would help to have some more details on your problem. It is only happening on the computer of a single customer or all computers that the executable is run on? What version of Labview are you using to compile this program? What version of the Labview Run-Time Environment is the customer that is having the problem using?
10-03-2011 02:22 PM
We are using Labview 2011 SP1. The customer does not have LabVIEW, but a 2011 run time engine 64 bit is installed on each computer. This issue took place in one of the two computers that were loaded and set up identically. And this is the first time ever that it happened. I mean we have compiled the code many times and updated the executables multiple times without any issue. So I am thinking it must be something that I did differently the last time I updated and compiled the code.
What happened was, when I started the source code project, navigated to this 'Mean.vi', an error window poped up saying this VI has been locked, Do you want to unlock? Click 'Unclock', the front panel loaded fine. After recompiling the code, everything back to work.
10-03-2011 04:05 PM
It is definitely possible that something may have been modified in the last build that caused it to happen. However, it should not require the VI to be unlocked enless it thinks the VI is being modified. You could optionally try deleting the VI from the project then adding it again to remove and then re-establish any dependencies. Otherwise if the code is now functioning it should be alright to leave the VI unlocked for your build.