Page 1 of 1

Bug: Position desync when comparing files.

Posted: 30 Apr 2021 00:17
by rwx
How to reproduce:
1. Open any two different files in HxD x64.
2. Ctrl-K to compare.
3. Press and hold F6 for some time, might need up to a minute or so.
4. Notice that file positions have diverged by 0x20000-1.

Re: Bug: Position desync when comparing files.

Posted: 08 Jun 2021 17:48
by Maƫl
Can you provide example files, so it's easy/reliable to reproduce?

Here it does not happen under Win8.1 and HxD 64 bit.

Re: Bug: Position desync when comparing files.

Posted: 21 Jun 2021 23:50
by rwx
Sorry for the late response.
I totally missed one thing, though, and only now that you couldn't manage to reproduce realized it is important - my keyboard key repeat rate is cranked to its maximum setting. Without it the wait would be proportionately longer. Can you change that and try again? The files don't make much difference, you can take literally any two sufficiently different files (so that you won't run into EOF before the bug triggers). Attached a couple, just in case.
I'm on Windows 7 SP1 x64, but I don't think that matters.
Can only guess without seeing the source, but my conjecture is it's a race condition between some sort of readahead and skipping to the next character in comparison. Does the max buffer constant 0x20000 happen to occur in prefetching code?