LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filename too long in build

So I just tried a build in 2009 and got a curious error:

 

Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:

Error 6 occurred at Create Folder in Create Directory Recursive.vi->AB_Destination.lvclass:Create_Destination.vi->AB_Build.lvclass:Create_Destinations.vi->AB_Application.lvclass:Create_Destinations.vi->AB_Build.lvclass:Build.vi->AB_Application.lvclass:Build.vi->AB_EXE.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller

Possible reason(s):

LabVIEW:  Generic file I/O error.
=========================
NI-488:  I/O operation aborted.

C:\Projects\VI Engineering\Software Products\1-09-xxxxx - VI Engineering - Hardware Explorer\Engineering\5 - Release\Executable\VIE Hardware Explorer\VIE Hardware Explorer.exe\LabVIEW 2009\user.lib\_VIE Internal Reuse Library\_vie_lib_dialog_&_user_interface.llb

Due to operating system limitations, LabVIEW cannot create the folder because its complete path contains too many characters.

The files that it's complaining about are going to be inside the exe, so why is it an issue?  Surely the filename length check should stop at "C:\Projects\VI Engineering\Software Products\1-09-xxxxx - VI Engineering - Hardware Explorer\Engineering\5 - Release\Executable\VIE Hardware Explorer\VIE Hardware Explorer.exe", which is well under the Windows filename length limit, right?





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 1 of 26
(6,423 Views)

Even curiouser - changing the "Advanced" build option "Use LabVIEW 8.x file layout" seems to fix the issue...





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 2 of 26
(6,419 Views)
This is a known issue with Windows95 😉
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 26
(6,417 Views)

The app builder in 2009 builds the EXE as a ZIP which maintains the folder hierarchy internally (which you can actually see in the message) and acts as a virtual folder, so the file name length limitation applies. This also explains why it doesn't happen if you use the 8.x switch.

 

Another place where you should be careful is if you strip a path in a loop until you reach a folder. Because the folder hierarchy is maintained inside the EXE, it means that the strip will most likely end while still inside the EXE.


___________________
Try to take over the world!
0 Kudos
Message 4 of 26
(6,397 Views)

P.S. I'm not sure if this limitation applies once you build the actual EXE, but one way of working around it during the build is to direct the build to a folder like c:\build.


___________________
Try to take over the world!
0 Kudos
Message 5 of 26
(6,392 Views)

To further what Tst said, during the build process Application Builder literally creates a folder containing your VIs in the final EXE layout before zipping this folder into the EXE. (if you have a look at your destination folder during the build process, you will see it), hence why the restriction holds even though the final path inside the EXE is not a problem.

 

The reason 8.x layout doesn't have this issue is that the intermediate step for 8.x EXE's is to create a LLB instead of a physical folder.

 

Shaun 

0 Kudos
Message 6 of 26
(6,377 Views)

I understand why this is happening (LabVIEW is struggling with the filename length limitof temporary files during it's build) - but I still think that has nothing to do with me - shouldn't it just build somewhere further toward the root (in, say, a temporary location?  These files are, afterall, temporary).





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 7 of 26
(6,364 Views)
Cross-posted here.




Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 8 of 26
(6,363 Views)
The issue with saving the "temporary" files in a shallow directory structure (C:\temp for example) is that this causes problems when files are located at destinations external to the application. For example, take a sub VI located the default support directory referenced by a VI that is in an EXE. When all the links are updated, if the temporary location is not relative to these destinations, LabVIEW may end up searching for the VI. If the files are all kept in directories relative to the destination location, this is not an issue.
George M
National Instruments
0 Kudos
Message 9 of 26
(6,338 Views)
I still stand by the comment that this is a bug.  The build fails.  Yes, there are workarounds, but the users should have to use them - the builder should know that there's going to be an issue during the build and change it's behaviour to fix it.




Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 10 of 26
(6,196 Views)