EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Error while writing file (4gb temp filestream)

Posted: 05/01/2012 14:53:00
by Everett Bell (Standard support level)
Joined: 02/26/2010
Posts: 8

We're using TElPGPWriter to encrypt multiple files in one pass. I have a case where a single source file over 4GB is generating this exception on the call to EncryptFiles:

SBTar.EElTarError occurred
Message="Error while writing file"
at SBTar.TElTarWriter.AddFile(Stream Stream, String FileName, DateTime Date, Int32 Mode)
at SBPGP.TElPGPWriter.PackFilesToTar(TElStringList SourceFileNames, ArrayList SourceStreams, Boolean& DisposeStream)
at SBPGP.TElPGPWriter.EncryptFiles(TElStringList SourceFileNames, ArrayList SourceStreams, String ADestFileName, Stream ADestStream)
at ...

This occurs when the file stream passed to OnTemporaryStream reaches ~4GB.


pgpWriter.EncryptFiles(sourceFileList, sourceFileStreams, aPackagePart.DestFilename, null);

void pgpWriter_OnTemporaryStream(object Sender, ref Stream Stream, ref bool FreeOnFinish)
            if (File.Exists(_tempFilename))

            FileStream tempFileStream = new FileStream(_tempFilename, FileMode.Create, FileAccess.ReadWrite, FileShare.None, 0x40000);

            Stream = tempFileStream;
            FreeOnFi nish = true;

Version 9.2.215. Does anyone know if 4GB is a hard limit on the internal TAR used when encrypting multiple files, or know of another cause for this?


(I have more code/info available but keep getting a 502 server error when trying to submit a longer post; let me know if anyone needs more.)
Posted: 05/01/2012 23:56:57
by Eugene Mayevski (Team)

The filesize field in the TAR header record is 64-bit which implies support for 64-bit files.

I've moved the question to HelpDesk for investigation by developers.

Sincerely yours
Eugene Mayevski
Posted: 05/01/2012 23:59:25
by Everett Bell (Standard support level)
Joined: 02/26/2010
Posts: 8

Thanks. The file system is NTFS, by the way.



Topic viewed 637 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!