LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an exe fails - no error message

I have a simple vi I wrote and have been trying to build into an executable.  Occasionally I am successful.  (~15% of the time.)  Usually I get the following dialog box, which obviously isn't much help.  The build log is equally useless to me--under the [ERROR] section it simply says, "Code:0."

 

I haven't been able to figure out why it's successful sometimes and not others.  The only thing I've been able to nail down is that if I create a new build spec it will build successfully on the first attempt.  Subsequent attempts usually fail.

 

Any ideas?

 

ButtonBeater_BD.png

0 Kudos
Message 1 of 12
(3,976 Views)
What is your lv version?
0 Kudos
Message 2 of 12
(3,956 Views)
Also, how simple is simple?  Does this happen whenever you build an executable or is it only with this project?
Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 3 of 12
(3,939 Views)

Labview 9.0.1 running on Windows 7.

 

 

The main part of the executable is a single event producer/consumer vi that controls the switches on an external relay box.  The build imports a class and library I wrote to wrap the native dll.  Total of ~15 vis, not including whatever LV threw in there.  Executable size was 200-400 kb; don't remember exactly.

 

This vi and executable is part of a larger project I am working on.  There is lots of other stuff in the project that is not included in the build.  I have not tried building any other vis or building executables with a different project.  When I first noticed this happening it seemed to occur only if I didn't delete the executable in the build directory before running the build.  After a while it just quit working altogether.

0 Kudos
Message 4 of 12
(3,921 Views)

"When I first noticed this happening it seemed to occur only if I didn't delete the executable in the build directory before running the build."

 

Does this mean that you have the folder containing a previously built version of the executable open when you are getting this error?  Does this behavior change is you don't have that folder open?

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 5 of 12
(3,883 Views)

After opening up my project this morning, here are a few things I did and the results:

 

Launch build from the project window (PW) - Success

Launch build from the PW - Success

Launch build from the PW - Success

Open folder showing the build directory

Launch build from the PW - Success

Launch build from the build properties dialog box (BPDB) - Success

Preview build in the BPDB

Launch build from the BPDB - Success

Manually delete built files from the build directory (I leave the directory there with an associated dll and the build log file.)

Launch build from the PW - Fail (Same missing error)

 

After that it seems to fail whenever I have a folder open to the build directory and work if the folder points to something other than the build directory.  The build looks like it goes through the entire process, creating the .exe folder and saving all the files to it.  It deletes them when the "Building application..." step fails.

0 Kudos
Message 6 of 12
(3,866 Views)

Ha, This one may be too easy.

 

I found this one when I was running the .exe at the same time as trying to compile another.

It was locked by windws.

Write protected file(s) may also cause this.

 

 

iTm - Senior Systems Engineer
uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT
0 Kudos
Message 7 of 12
(3,858 Views)

Timmar wrote:

Ha, This one may be too easy.


Nope, the exe isn't running while I'm building and having a windows explorer window open to the build directory doesn't affect the write protection status of any of my source vis.

0 Kudos
Message 8 of 12
(3,839 Views)

THe next time it starts to give you trouble, try a reboot.

 

I am chasing what may be a bug with LV caching files and casuing problems durring builds. I'm curious if you are facing the same issue.

 

Ben

 

No, nobody else belives me on that one yet either. Smiley Sad

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 12
(3,836 Views)

I'm running 9.0.1 on Win7 (32-bit), and seeing EXACTLY the same problem as Daklu.  If the build folder is open when I start the build, the build fails with no error message.  If I close the folder first, no problems.  It's very repeatable.

 

JasonP - CLD

0 Kudos
Message 10 of 12
(3,779 Views)