RCF::FileDownload with large files (> 2 Gb)
Posted: Wed Feb 12, 2014 8:15 pm
Hello,
We're using RCF::FileDownload to do file transfer, and it appears to work well for our purpose. However, we encounter problems when downloading large files (size > 2 Gb) on Windows (our code is in 64-bit).
The symptom we're seeing is that file transfer stops when the number of bytes transferred is about 2 G.
When the debug build of the program does the transfer, there's an assert in RCF from inside FileIoRequest::doTransfer() as the file becomes larger than 2 Gb.
Looking at the variable values in the debugger, it appears that type casts such as doesn't result in the correct size of the file on Windows when the file is over 2 Gb. More precisely, pos0 is just under 2 Gb while pos1 is a very large number.
We've modified RCF locally to deal with the issue, but we're hoping that there will be an official fix if this is indeed a problem in RCF.
Thanks!
We're using RCF::FileDownload to do file transfer, and it appears to work well for our purpose. However, we encounter problems when downloading large files (size > 2 Gb) on Windows (our code is in 64-bit).
The symptom we're seeing is that file transfer stops when the number of bytes transferred is about 2 G.
When the debug build of the program does the transfer, there's an assert in RCF from inside FileIoRequest::doTransfer() as the file becomes larger than 2 Gb.
Looking at the variable values in the debugger, it appears that type casts such as
Code: Select all
boost::uint64_t pos1 = mFoutPtr->tellp()
We've modified RCF locally to deal with the issue, but we're hoping that there will be an official fix if this is indeed a problem in RCF.
Thanks!