Showing results for 
Search instead for 
Did you mean: 

"Format into File" produces Error 1 when writing (appending) to a file that has a size of 4G

I get this error when writing (appending) to a file that has a size of 4G.  The error message says that the origin of the error is "Format Into String".   Actually, the error is produced by "Format Into File" in the false case of "Append to".
It seems to me that there is some outdated 32-bit code in "Format Into File" which is responsible for this error.
The true case of "Append to" contains a workaround that uses "Format Into String" and "Write to Binary File" and does not expose this error.


Append to TextFile.png

Tested with LabVIEW 2011 SP1, 2012 and 2013 SP1.  The behaviour is always the same.

Here is how I tested: "Loop On Append to" runs "Append to" until an error occures. (You will have to abort the looping caller VI if no error occures - which I did at a file size of ~25G).

Loop On Append to TextFile.png

Can anyone put some light on this behaviour?  Thanks for any replies in advance.

Note: Make sure to verify this on a file system that supports files with a size of greater than 4GB.
Note: Do not forget to delete the text file after investigating.

Message 1 of 4

Seems like a bug in Format into File. What happens if you first use Format into String and then simply a File Write primitive? I know that the file I/O functions had some troubles in LabVIEW 8.0 to handle files bigger than 4GB when the file I/O was improved to support < 2GB but AFAIK this was solved in about LabVIEW 8.2 or 8.5.


Maybe something in FormatIntoFile() has been overlooked though, although I would expect FormatIntoFile() to be mostly just a sort wrapper around FormatIntoString() and FileWrite()

Rolf Kalbermatter
Averna BV
0 Kudos
Message 2 of 4

Thanks for the reply, Rolf.   My workaround in the true case (sorry for me just placing the VI snippets here. My attempt to upload a zip containing both VIs was repeatedly rejected Smiley Mad) already contains your proposal (uses "Format Into String" and "Write to Binary File") and it works fine. 

I am with your expectation "Maybe something in FormatIntoFile() has been overlooked ...".

0 Kudos
Message 3 of 4

Thank you for reporting this issue. I created a Bug Report and forwarded it to the Development Team. 


Best Regards




0 Kudos
Message 4 of 4