"File(s) modified, recompare?" dialog appears twic

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

"File(s) modified, recompare?" dialog appears twic

Post by *MarcinW »

"File(s) modified, recompare?" dialog appears twice

In some cases the "File(s) modified, recompare?" dialog appears twice. Steps to reproduce:

1. Compare files "a.txt" and "b.txt". "Compare contents" window appears.
2. Switch to the main window of TCMD and modify "a.txt".
3. Switch to the "Compare contents" window. The "File(s) modified, recompare?" dialog appears. DON'T CLOSE this dialog.
2. Switch to the main window of TCMD and modify "a.txt" again or "b.txt" (EDITED HERE).
4. Switch to the "Compare contents" window. After closing the "File(s) modified, recompare?" dialog, it appears again.

Regards!
Last edited by MarcinW on 2012-01-24, 16:50 UTC, edited 1 time in total.
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

Confirmed in TC8.0 beta 17a (both 32 and 64b versions).
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Well, you modify twice - its seems reasonable to get a warning twice ;-)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

2petermad
Well, you get two warnings regardless of how many times you modify the file (more than once of course), so it is unintuitive at least. And if you click in both warnings on Yes, those files are re-compared twice - after one comparison finishes the next one starts. This is unnecessary and with big files also rather slow. My point is there shouldn't be two warnings in the first place.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Petermad, you are of course right, however, there are two aspects:

- it may be simply annoying
- it's potentially dangerous from a programmer's point of view - it's called "orphan instance" - a programmer is expecting to have only one dialog instance at a time, so he declares some kind of a global variable for it. Doing so, he may unintentionally overwrite a handle (pointer) to the first dialog object during creation of the second dialog object - so the first object will never be released.
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

it's potentially dangerous from a programmer's point of view - it's called "orphan instance"
Sure, but maybe that is the downside of the Compare by Content window being non-modal.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, not really a bug, but I will suppress the second dialog anyway.
Author of Total Commander
https://www.ghisler.com
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

Fixed in beta 18.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Fixed in beta 18.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply