Euphoria
Ticket #825:
Writing large files fails (truncated) on Windows
-
Reported by
CoJaBo2
Dec 01, 2012
See- Simplified test case: http://openeuphoria.org/pastey/174.wc
http://openeuphoria.org/forum/119970.wc?last_id=0
File size should be 9294967000, but it stalls at approximately 4G; any additional data written is lost-
00:59 < any33068445> results for wtest.tmp:
01:00 < any33068445> size on disk : 4.00 GB (4,294,971,392 bytes)
01:00 < any33068445> Size : 4.00 GB (4,294,971,096 bytes)
01:01 < any33068445> dosbox:
01:01 < any33068445> D:\ngrams>dir wtest.tmp
01:01 < any33068445> Directory of D:\ngrams
01:01 < any33068445> 11/30/2012 11:58 PM 4,294,971,096 wtest.tmp
01:01 < any33068445> 1 File(s) 4,294,971,096 bytes
01:01 < any33068445> 2^32 = 4,294,967,296
It works for me on 4.0.4 on 32-bit Linux; looks like its specific to Windows versions of Eu.
It happens, on Windows with both:
Euphoria Interpreter v4.0.4
Windows, Using Managed Memory
Revision Date: 2012-04-02, Id: 11a49820121f
01:07 < any33068445> Euphoria Interpreter v4.1.0 development
01:07 < any33068445> 32-bit Windows, Using System Memory
01:07 < any33068445> Revision Date: 2012-11-25 16:54:04, Id: 5878:b2a53838e01f
Details
1. Comment by petelomax
Dec 01, 2012
Look for calls to SetFilePointer, check the third parameter is not NULL. If that call is buried inside clib you may need to call it directly. HTH.
2. Comment by CoJaBo2
Dec 02, 2012
This does not affect v4.1.0, only 4.0.4; was going by a report on IRC which was evidently not correct.
3. Comment by useless_
Dec 02, 2012
Nevermind that i had added :
ADDED part 3: eui.exe and euiw.exe on the Nov28 build of v4.1.0 work properly.
to my Euphorum post, and had said the cure to the bug was to use the Nov28 build of v4.1.0.
4. Comment by jimcbrown
Dec 02, 2012
It's necessary to update the ticket with that information. If it's not directly in a ticket, it's more likely to be forgotten.
5. Comment by CoJaBo2
Dec 02, 2012
This now appears to be a result of disk corruption; it works for me in 4.0.4 and 4.0.5, unless_ can't reproduce it either (and it sometimes seems to be creating files of negative sizes).
6. Comment by useless_
Dec 03, 2012
See my post in Euphorum.