From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

After running successfully, my AppBuiolder exe fails with missing subvi error.

I have five exes made with AppBuilder that run on 60 cloned machines used in a university physics lab.  The exes, aliases and ini files were all copied to one directory having one subdirectory 'data' where I copied lvanlys.dll and lvdaq.dll.  The exes will work fine for a while, but about once a week one or two will fail to load with missing subvi errors as if the dlls are inaccessible.  The dll's seem fine, but it would seem either the exe or the dll's (or a registry entry) changes in some way to create the problem.  In fact, running chkdsk---with fix file system errors set---fixes the problem.  What is changing and what is chkkdsk fixing?  I have included on the lvproj files for one of the projects.  I just started using project files and left all setting as near the default values as I could.
0 Kudos
Message 1 of 12
(3,456 Views)

Hey Deserio,

 

Chkdsk is a command-line tool that checks volumes for problems. It can repair issues relating to bad sectors, lost clusters, cross-linked files, and directory errors. More information for it can be found here.  It seems like it is fixing a directory error for "missing" dlls. One of my questions would be why you are copying the lvdaq.dll and the lvanlys.dll into your 'data' subdirectory? Shouldn't it be under the vi.lib\Daq file already?

 

Regards,

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 2 of 12
(3,433 Views)

Hi Andrew,


Thanks so much for looking into this oddball behavior.


Because of our site license, I actually do have the full LabVIEW devolopment system installed on these machines.  In any case, for the exes I thought I should stick with the directory structure from the AppBuilder which I assumed built the exes with the dlls expected to be found in a 'data' subdirectory in the exe's home directory.  By the way, after another exe failed to load yesterday, I tried running the exe's original source vi (also on these machines) directly under the LabVIEW development system and again, the lvanlys subvis came up as missing and the program still failed to load.  And in this case it would have been looking in the normal NI LabVIEW directory locations for the dlls.  So then I logged off and back on as an administrator and I could run the exe or the source code without a problem. Keep in mind these points.  1) The exe's run fine for a while (under a user account) and only fail to load randomly at a low rate.  (I am almost certain the failure happens in response to running at least some of those exes.)  2) After I find one fails to load, they all fail to load.  3) After running chkdsk (with only automatically fix file system errors checked, not attempt recovery of bad sectors) the exes run fine again.  So what is changing and what is chkdsk fixing?

 

Regards,

Bob

0 Kudos
Message 3 of 12
(3,420 Views)

Hi Bob,

 

Could you describe what these exe's are doing in your system. It is odd that you could run them under adminstrator and not under your normal user account. Is there a firewall that could possibly be stopping one of your executables from functioning properly?

 

Regards,

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 4 of 12
(3,405 Views)

The programs take data from an PCI-MIO-E4 multifunction DAQ board that students use with a homemade interface box to take data in the lab.  The 'DCMeter' program, for example, reads five analog inputs, averages out noise, and displays the readings continuously.  A 'Stopwatch' program times TTL transitions from photogate sensors.  Another times echos from a sonic motion transducer while reading analog signals from a force sensor.  I have included the source code and exe for the DCMeter program  But remember that the problem is intermittent and goes away after running chkdsk.  P.S. The gif is really an exe, which I could not get through the submission process.

Download All
0 Kudos
Message 5 of 12
(3,395 Views)

Hi Bob,

 

Chkdsk is a windows tool that preforms error checking on hard drives and fixes any problems that it finds.

 

Microsoft TechNet: Chkdsk

 

Could you give a specific screenshot of when the error occurs, showing the missing subvi errors. Also, does this happen on a few computers or is it random among the 60 computers that these "fail to loads" happen. If its one computer it may be that it just has a corrupted hard drive, but if its more than one computer, it may mean that something in the architcture or something in one of the vi's are causing a hard drive corruption.

 

Regards,

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 6 of 12
(3,377 Views)

Andrew,

 

First as to the randomness.  It seems to be totally random. It has happened on about 25 or 30 of the 60 machines.  I have not kept good enough records, but I will start today so that I can verify whether it has ever happened on the same computer twice.  It just happened this Monday morning and so I played a bit with it.   Unfortunately, I don't have any software on the machines to capture windows, but the way it fails is first with one-button (OK) individual dialog boxes with the following messages:

 

LabVIEW: Resource not found

An error occurred loading VI 'AI Buffer Read (scaled array).vi'.

LabVIEW load error 3: Could not load front panel.

 

After hitting the OK button, this repeats for a bunch of other vis such as AI Control, DIO Port write,...

Then after all OK buttons have been hit, the main vi's front panel comes up with one large dialog box overlaying it having one line for each vi that failed. Each line reads:

 

Missing subVI DIO Port config.vi in Transient.VI

...

...

 

The vi's run arrow is disabled, which the exe normally doesn't show as it is set to "run when opened" under normal operation.

 

So then I stayed in the student user account and tried running the source vi (located in a different directory) under the LabVIEW Professional Developement system.  When I attempt to load the main vi, here are the new error messages:

 

Error loading "C:\Program Files\National Instruments\labVIEW 8.5\vi'lib\DAQ\lvdaq.dll".

A dynamic link library (DLL) initialization routine failed.

 

And this repeats for a bunch of vis.  Then I logged off and back on as an administrator and all problems disappear.  Everything loads and runs fine.  Then I run chkdsk with fix file system errors checked and then everything works fine, even as a student user.

 

Regards,

Bob

 

 

 

 

0 Kudos
Message 7 of 12
(3,347 Views)

Hey Bob,

 

For your error "LabVIEW load error 3: Could not load front panel." , could you look at and follow through this knowledge base article.  That should take care of that issue. It seems that your lvdaq.dll is coming from the traditional daq hardware not being installed, which can be found here.  It would be interesting to see, if you correct these two issues, what errors that then occur, if any.

 

Regards,

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 8 of 12
(3,339 Views)

Andrew,

 

I have both traditional DAQ and DAQmx software installed.  The DAQ board I'm using---a PCI-MIO-E4---is on all the machines and works fine.  Is there more than one version of lvdaq.dll?  I assumed that the one that the AppBuilder saved in the build directory was always the same file and the same as the one in the LV DAQ directory.  I don't need any of the front panels of the vis that are reported as having the "Error code 3"so why should I tell AppBuilder to include them?  Also rememeber, the program typically runs fine and only fails, as described previously, on occasion   Thus any problem that would cause the exe to always fail can't be "the" problem, can it?

 

Regards,

Bob

0 Kudos
Message 9 of 12
(3,324 Views)

Hi Bob,

 

What OS are you using on these computers? Are they all the same OS? What user permissions do you have these computers set up for? Is it possible that one of the users doesn't have the same permission and is making the system act this way? I also think that we need to change the permission of all the computers so that labview can see the lvanlys.dll and lvdaq.dll on each computer instead of trying to find them in the directory. I think this was cuased by a permission error, because you were unable to see them  when you were logged in as a user, but you could run the exe as an administrator. 

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 10 of 12
(3,286 Views)