Hi,
I have encountered a resolvable lock scenario by performing the following steps:
1. Compare 2 large files (the size needs to be larger than the data that can be stored in the memory, managed by MaxCompareSizeInMem configuration option)
2. Try to rename any of the larger files while the Compare window is open
3. There will be an error message that there is lock on the file you are trying to rename
4. Without clicking on any of the buttons of the error message dialog, switch to the Compare window and try to close it
5. Nothing happens to the Compare window while the dialog is open, however, if you have clicked on the closing button (X), the window will close if you dismiss the error message by clicking on any of the buttons (OK or Cancel)
What I was expecting to happen is that the Compare window would respond to the closing action without "hanging", independently from the error dialog.
The way it works feels unusual to me, but regardless, this is nothing but a minor inconvenience if anything, so feel free to ignore it if you think it does not deserve any attention.
Compare window: bad "file lock"-scenario
Moderators: petermad, Stefan2, white, Hacker
- ghisler(Author)
- Site Admin
- Posts: 50254
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Lock scenario
This isn't fixable because message boxes are modal, and they use their own message queue. The compare window will close once you close the message box. If this is a problem for you, you need to start the compare window as a separate process via %commander_exe% /S=C name1 name2
Moderator message from: ghisler(Author) » 2025-02-12, 07:47 UTC
Moved to will not be changed.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Compare window: bad "file lock"-scenario
Thank you for the response.
I don't experience the described issue when trying to delete the file instead of renaming, using the same exact steps otherwise.
So in this case I can actually close the Compare window while the message is still displayed.
Should this result in the same behavior as per your explanation?
I don't experience the described issue when trying to delete the file instead of renaming, using the same exact steps otherwise.
So in this case I can actually close the Compare window while the message is still displayed.
Should this result in the same behavior as per your explanation?
- ghisler(Author)
- Site Admin
- Posts: 50254
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Compare window: bad "file lock"-scenario
You also won't experience the problem when using dark mode. Why? In both cases, Total Commander uses its own dialog, not the Windows MessageBox function.
While I could use my own function also in light mode, it has other disadvantages like worse word wrapping/auto-resizing, not being thread-safe (so it has to be called from the main thread via a callback) etc.
While I could use my own function also in light mode, it has other disadvantages like worse word wrapping/auto-resizing, not being thread-safe (so it has to be called from the main thread via a callback) etc.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com