LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"error 4 occurred at constructor node"

When I run my application I'm getting "error 4 occurred at constructor node".  I don't get the error when I run the vi from my project. 

 

"Possible reason(s):

LabVIEW: End of file encountered."

 

Any ideas?

0 Kudos
Message 1 of 8
(4,798 Views)

Hi, When building executables of LabVIEW VIs you must take several aspects of your code into consideration. One common cause of errors is the use of file paths - because the executable with run in a different location to that of the original VI.

 

Please see this knowledgebase article for more details

 

Why Does My Executable Not Work When Using the Current VI's Path Constant?

 

Other Ideas for trouble shooting,

1) Have you tried a simple VI that lights an LED upon pressing a switch. If this works it confirms you have no issues with LV Runtime engines etc.

2) You could post your code (if its readable and not too big) and we (forum) might be able to suggest other issues.

 

 

Regards,

James

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 8
(4,786 Views)

Are you running the application on the same computer as the development environment? If it's on another machine do you have the right .NET version? Is the assembly you're loading dependent on other assemblies? Are they in a location where the .NET Runtime can find them (http://digital.ni.com/public.nsf/allkb/C4EA5ABBEB67AF7C862573F3004D4421?OpenDocument)?

0 Kudos
Message 3 of 8
(4,773 Views)

The application and final development pc are the same.  However, the initial development pc was different.  And I can run the program from the current pc without issue, but not the application.

0 Kudos
Message 4 of 8
(4,769 Views)

I swapped the location of the application and the problem seems to have gone away. 

 

Thanks for the helpSmiley Happy

0 Kudos
Message 5 of 8
(4,754 Views)

Sorry to jump in so late...

 

Did you have more than 1 dll?  Were they all copied to the appropriate folder?

 

... simply speaking from experience ...

0 Kudos
Message 6 of 8
(4,724 Views)

many dll's.  Honestly, it's a trial and error thing and I avoid switching locations of the executables as much as possible.

0 Kudos
Message 7 of 8
(4,717 Views)

What happened to me was that one of the dll's did not make it to the build folder..

0 Kudos
Message 8 of 8
(4,707 Views)