01-04-2010 11:25 AM
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?
01-04-2010 11:31 AM
Even curiouser - changing the "Advanced" build option "Use LabVIEW 8.x file layout" seems to fix the issue...
01-04-2010 11:39 AM
01-04-2010 11:58 AM
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.
01-04-2010 12:02 PM
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.
01-04-2010 12:12 PM
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
01-04-2010 12:50 PM
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).
01-04-2010 12:51 PM
01-04-2010 01:54 PM
01-15-2010 01:41 PM