10-29-2011 03:44 PM
Hey Everyone,
I am having some problems with an application that I am trying to build into an executable. As of right now it looks like everything is building without errors, but when I go to run the executable I get a weird Error 1 coming from one of LabVIEW's built in libraries. I tried doing some remote debugging, but I don't see the error crop up in my code anywhere, so I'm kind of confused as to what is going on.
The error doesn't crop up until after I click on a button that loads a VI into a subpanel (The subpanel even loads the correct VI). I also don't get any errors when I run the VI in the development environment.
I have attached a picture of what the error says.
Thanks in advance for the help.
Ryan
Solved! Go to Solution.
10-29-2011 05:18 PM
I just want to add that it looks like I'm having trouble referencing files within th executable file structure also. One of the first things my code does when the application is started is reinitialize all controls to their default value. I was having the hardest time finding the path constant that pointed to the executable path, so finally I tried hardcoding a relative path from the build directory, and I was getting errors from that too. Is this something I'm not allowed to do in a standalone application? It works just fine in the development environment.
10-29-2011 06:53 PM
I assume you are aware if these specific path differences between executable and development system.
If you are referencing internal files, It might also be if interest to know if you use LabVIEW 8.x file layout when building the application.
What is your OS?
10-29-2011 06:54 PM
Your error message indicates that the error is coming from the VI that writes to a configuration file, and not anything to do with subpanels or reinitializing values. You're probably updating a configuration file with some values or something. You don't show your actual code that does this, but if I had to hazad a guess I'd ask are you aware of this: Why Does My Executable Not Work When Using the Current VI's Path Constant?
As for your question about the application path: http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/app_appdir_path/
10-30-2011 01:13 PM
@smercurio_fc wrote:
Your error message indicates that the error is coming from the VI that writes to a configuration file
Thank you very much! I did realize that the file paths were a little different, but the biggest thing that was causing problems is not all of the files I needed got moved over to the build folder. There was a calibration file for one of the sensors I am using and a config file that got left behind. One of the last things my application does before it closes is write information to a config file. Well that error was masking all of the other errors relating to the calibration file (which is used pretty early on in the application), so I was beginning to think something was majorly messed up.
Thanks for clearing that up for me.
Best Regards,
Ryan