Bug 277553 - Okteta has a 2GB file size limit
Summary: Okteta has a 2GB file size limit
Status: RESOLVED DUPLICATE of bug 182577
Alias: None
Product: okteta
Classification: Unclassified
Component: general (show other bugs)
Version: 0.6.2
Platform: Unlisted Binaries Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Friedrich W. H. Kossebau
Depends on:
Reported: 2011-07-11 14:47 UTC by Daniel Thaler
Modified: 2011-07-11 20:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Thaler 2011-07-11 14:47:41 UTC
Version:           0.6.2 (using KDE 4.6.3) 
OS:                Linux

I tried to load a 2.5Gb data file with okteta.
This failed with the message "There is not enough working memory to load this file", which was clearly wrong (the machine has 16GB).

From a brief look at the okteta code, it appears that a QByteArray is allocated for the file data in bytearrayrawfileloadthread.cpp and resized to the file size.
Unfortunately this cannot work for large files, because the parameter to QByteArray::resize() is an int.

Reproducible: Didn't try

Steps to Reproduce:
Try to load any file with a size greater than 2^31 bytes

Expected Results:  
The file should be loaded
Comment 1 Friedrich W. H. Kossebau 2011-07-11 18:42:14 UTC
Thanks for the report. Issue is known, the lack of proper support for very large files is pretty high on the TODO list, but not so straightforward solvable, so sadly might take some more time until I/someone finds the time for it (should not be done by loading/copying them completely into the working memory). Will mark this report as duplicate of the general bug for this issue.

Will fix the error message though, you are right in that it is wrong in the reason it gives.

*** This bug has been marked as a duplicate of bug 182577 ***
Comment 2 Friedrich W. H. Kossebau 2011-07-11 20:07:03 UTC
SVN commit 1241220 by kossebau:

Fixed: on 32-bit systems give the right reason why files > 2 GiB cannot be loaded

CCBUG: 277553

 M  +15 -2     bytearrayrawfileloadthread.cpp  
 M  +15 -2     bytearrayrawfilereloadthread.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=1241220