Hi,
TC 9.20b2 x64, Windows 10 x64, but I assume this is not a new behavior in 9.20.
It seems the log gets corrupted when it reaches a certain size, here it is 4 295 006 800 bytes. The entries do not get appended at the end but the first entries get overwritten - looks like an unsigned long integer is used as the position pointer or something like that.
TIA
Roman
Log corruption with log > 4 GB
Moderators: Hacker, petermad, Stefan2, white
Log corruption with log > 4 GB
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Thanks, I can reproduce it. Apparently it's a limitation of SetFilePointer: I call it like this:
SetFilePointer(hFile,0,NULL,FILE_END);
It tells Windows to position the read/write position to the end of the file. However, this fails when the file is > 4GB, although the parameter lpDistanceToMoveHigh is described as optional.
It works when I call it like this:
highPosition=0;
SetFilePointer(hFile,0,&highPosition,FILE_END);
Apparently it's because of this limitation:
SetFilePointer(hFile,0,NULL,FILE_END);
It tells Windows to position the read/write position to the end of the file. However, this fails when the file is > 4GB, although the parameter lpDistanceToMoveHigh is described as optional.
It works when I call it like this:
highPosition=0;
SetFilePointer(hFile,0,&highPosition,FILE_END);
Apparently it's because of this limitation:
If lpDistanceToMoveHigh is NULL and the new file position does not fit in a 32-bit value, the function fails and returns INVALID_SET_FILE_POINTER.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This should be fixed in beta 3, please test it!
Note: Both the normal log and ftp log are affected.
Note: Both the normal log and ftp log are affected.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com