LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable builds ok but then crashes immediately when opened

I have a VI that works fine in the development suite, and I also used to be able to build it into an application that worked fine. However, when I tried building an installer and then installing the executable on a target pc, the application crashes immediately when I try to open it. I have tried all sorts of different ways of building the installer, and also simply installing the run-time engine onto the target pc and then opening the executable, but it always crashes when it opens.
In addition to this, the executable no longer runs on the development pc, even though I have not made any changes to the vi, and am building it in exactly the same way - it simply crashes when I try to open it in the same way as on the target pc!
 
If anyone can shed any light on this matter I would be very grateful,
 
mstudio
0 Kudos
Message 1 of 9
(3,302 Views)
Are you using any type of addons or special dlls. If so try adding them to the build.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 9
(3,299 Views)
Before you do the installation build, you create an execution build of the VI. Have you tried running that executable on the development machine and see if it crashes?
0 Kudos
Message 3 of 9
(3,291 Views)

I have tried including everything in the build, but that doesn't seem to help.

And no, the application does not execute on the development machine either, it crashes in the same way as it does on the target pc, although it used to run fine before I tried building an installer.

0 Kudos
Message 4 of 9
(3,271 Views)
It is possible the front panel of your main VI is being removed during the build process. Check the build options that all the necessary front panels that you expect to actually interact with are not set to be removed during the build.
0 Kudos
Message 5 of 9
(3,263 Views)

Thanks for the suggestions, the situation has developed - after making a tiny change to the VI (duplicating some LEDs) and no changes to anything else (including the build specifications) the application now builds and runs again with no problems!

Essentially it seems that if I build my VI in exactly the same way a few times, some of the builds will run, and some of them won't, which seems very strange!

0 Kudos
Message 6 of 9
(3,254 Views)
What it sounds like is that you might have some sort of race condition because of local variables or bad dataflow. Building it or making a few changes will force a recompile and that might be just enough to hide the race condition again. Your description of the problem is lacking some details. Exactly what happens with a 'crash'?
0 Kudos
Message 7 of 9
(3,246 Views)
When I say crash I mean I get the pop-up window saying that the application has encountered a problem and has had to close. Your suggestion of a race condition sounds possible - I'm a bit of a beginner so there probably is some bad dataflow in there. What exactly is a race condition?
 
Thanks
0 Kudos
Message 8 of 9
(3,235 Views)
Race conditions occur when you use local/global variables in a lot of places. Because there is no dataflow, it's possible that a read can occur before you have written to it. Lot's of unexpected things can then happen. Without seeing your program, it's really next to impossible to say what might be causing the error.
0 Kudos
Message 9 of 9
(3,232 Views)