Bug: Position desync when comparing files.

Bug reports concerning HxD.
Post Reply
rwx
Posts: 2
Joined: 30 Apr 2021 00:16

Bug: Position desync when comparing files.

Post by rwx »

How to reproduce:
1. Open any two different files in HxD 2.5.0.0 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.
Maël
Site Admin
Posts: 1355
Joined: 12 Mar 2005 14:15

Re: Bug: Position desync when comparing files.

Post 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 2.5.0.0 64 bit.
rwx
Posts: 2
Joined: 30 Apr 2021 00:16

Re: Bug: Position desync when comparing files.

Post 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?
Attachments
piece1.h
(256 KiB) Downloaded 1 time
piece2.h
(256 KiB) Downloaded 1 time
Post Reply