2Gb File limit?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

2Gb File limit?

Andi Thomas
I have some text file processing stuff that works just fine until the file
size exceeds 2Gb, then it chokes on a "unable to coerce an integer" type
error (I don't have then exact message in front of me). But its the
#nextLine method that ultimately dies when it tries to set the file
#position:.

 From what I can figure out this appears to be a Windows API limitation that
affects certain file operations. The drive is either FAT32 or NTFS so it
theoretically supports 4Gb file sizes.  Indeed the file does exist and is
2.4Gb in size.

Am I just being unreasonable expecting to be able to process such a large
file, or is this a VM limitation (the thing that chokes seems to be a
primitive), or just a Windows "feature"?

If there's a work around or fix or something, any help would be greatly
appreciated.

- Andi

BTW:  I love Dolphin, and can't wait for D5 - every release is like a new
girlfriend (or fresh dry powder for the snowboarders amongst you).


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.333 / Virus Database: 187 - Release Date: 08-Mar-2002


Reply | Threaded
Open this post in threaded view
|

Re: 2Gb File limit?

Blair McGlashan
"Andi Thomas" <[hidden email]> wrote in message
news:a7ophe$n7tsc$[hidden email]...
> I have some text file processing stuff that works just fine until the file
> size exceeds 2Gb, then it chokes on a "unable to coerce an integer" type
> error (I don't have then exact message in front of me). But its the
> #nextLine method that ultimately dies when it tries to set the file
> #position:.
>
> From what I can figure out this appears to be a Windows API limitation
that
> affects certain file operations. The drive is either FAT32 or NTFS so it
> theoretically supports 4Gb file sizes.  Indeed the file does exist and is
> 2.4Gb in size.
>...

One place where this limitation exists is in the Dolphin File class (there
may be other places) - if you look at the File>>seek:sense: method you will
see that it calls the Kernel32 SetFilePointer() API. This API call can cope
with positions of up to 64 bits, but Dolphin only uses passes the lower
32-bits, even though the integer position could theoretically be a
LargerInteger of any size. This could easily be patched with a little
masking and shifting to break larger integers into two, but I haven't time
to post an immediate patch as it would need to be tested. I'll raise a bug
report though.

Thanks for the bug report (and the encouragement :-)).

Regards

Blair