Very specific problem when changing attributes

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Very specific problem when changing attributes

Post by *petermad »

I have stumbled over a very peculiar problem setting file attributes for 2 specific files.

I can reproduce the bug under Windows XP, 7 and 8.1 but NOT under Windows 10 on local harddisks (but on Network shares and USB-sticks)

To reproduce, download this file http://madsenworld.dk/tcmd/attribtest.zip and unpack it to a directory.

1. Set the file panel to Full View and mark both of the two files kbenhavn.gif and kbenhavn.htm
2. Open the Change Attributes dialog, click in the "a Archive" box and click OK to clear the archive attributes.
3. Notice that the "a" attributes does NOT change.
4. Click F2 and or Ctrl+R to reread the panel - no change.
5. Leave the directory and re-enter it - now the "a" attributes are cleared.
6. Mark the two files kbenhavn.gif and kbenhavn.htm again
7. Open the Change Attributes dialog, click twice in the "a Archive" box and click OK to set the archive attributes.
8. Notice that the "a" attributes does NOT change.
9. Click F2 and or Ctrl+R to reread the panel - no change.
10. Leave the directory and re-enter it - now the "a" attributes are set.

Change the name or extension of one of the files and perform the test - now everything works as expected.
Change the date or time (just 2 tenth of a second is enough) of the original files - everything works as expected.
Change the content of one of the files and reset the date to the original - everything works as expected.

So it is a mix of these particular filenames, whit these particular dates and content that is the essential for this bug to appear.
The bug does not occur when settng the attribute for each file individually.

The bug occurs in both 32-bit and 64-bit TC and it is also present way back in TC 8.52a and it is present in both panels.
I can reproduce the bug both on FAT and NTFS formatted drives.
Last edited by petermad on 2018-12-20, 02:09 UTC, edited 1 time in total.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Dalai
Power Member
Power Member
Posts: 9352
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Very specific problem when changing attributes

Post by *Dalai »

I can confirm this behavior (tested only TC 8.52a on Win7). Maybe this has something to do with the "Manipulate connected files as a unit" setting in TweakUI (which is only available on XP and earlier). The setting is saved in the registry:

Code: Select all

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
"NoFileFolderConnection"=hex:01,00,00,00
OTOH the setting's name suggests only connections of files and folders. Hm.

Furthermore, when the archive attribute is removed from the files, and you extract them again from the archive (overwriting the existing files), the same issue occurs, i.e. leaving and re-entering the directory is necessary to see the change in attributes. Adding another file to the directory and including that in the selection and attribute change doesn't reveal the issue.

You've found a really strange one :).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Very specific problem when changing attributes

Post by *MVV »

I can't confirm, both files have unchecked A attribute when I unset it in Attributes dialog.

AFAIK mentioned "Manipulate connected files as a unit" option only affects special "<html file name w/o extension> Files" folder near the html file, not such single image files... And usually I disable it on my machines because I don't like such side effects. But on this machine it is enabled (I haven't noticed it yet because I don't use Explorer and don't save web pages with contents in a folder, I prefer MHT format).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Very specific problem when changing attributes

Post by *ghisler(Author) »

TC uses a checksum to decide whether a directory content has changed or not - if the checksum is unchanged, the directory will not be refreshed. This is necessary to avoid constant flashing when switching back to TC. Apparently you found such a rare case where the checksums are the same, but the content is different.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Very specific problem when changing attributes

Post by *petermad »

MVV wrote: 2018-12-20, 04:43 UTC I can't confirm, both files have unchecked A attribute when I unset it in Attributes dialog.
What OS did you test under?
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Very specific problem when changing attributes

Post by *Horst.Epp »

ghisler(Author) wrote: 2018-12-20, 10:59 UTC TC uses a checksum to decide whether a directory content has changed or not - if the checksum is unchanged, the directory will not be refreshed. This is necessary to avoid constant flashing when switching back to TC. Apparently you found such a rare case where the checksums are the same, but the content is different.
Confirmed the problem under W10 shown in my signature.
Looks like the checksum doesn't help in this case.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Very specific problem when changing attributes

Post by *petermad »

2ghisler(Author)
Apparently you found such a rare case where the checksums are the same, but the content is different.
I just found another set of files with the same behaviour: http://madsenworld.dk/tcmd/attribtest2.zip
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Very specific problem when changing attributes

Post by *MVV »

ghisler(Author),
What kind of hash does TC use for such case? And what data fields does it hash?

And why it can cause the bug on one Windows or installation but not in some other one?

I can't reproduce the bug with the first set but I can reproduce it with the second set!

When I press F2, the panel flashes, but is not updated properly. It is a bug definitely. I would understand if lazy update could really reduce flashes... And, I think that TC shouldn't do a lazy refresh on cm_RereadSource, direct user command should be processed thoroughly.
User avatar
Hacker
Moderator
Moderator
Posts: 13040
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Very specific problem when changing attributes

Post by *Hacker »

MVV,
When I press F2, the panel flashes, but is not updated properly.
Just by chance, does it refresh properly when using Ctrl-R? A long time ago, completely unrelated to this topic, in one folder I could reliably reproduce no refresh on F2 but a normal refresh on Ctrl-R, while Christian confirmed they were doing the same. :?

Roman
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.
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Very specific problem when changing attributes

Post by *petermad »

2Hacker
As I wrote:
9. Click F2 and or Ctrl+R to reread the panel - no change.
2Hacker
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Very specific problem when changing attributes

Post by *MVV »

Hacker,
Nope, both F2 and Ctrl+R are unable to refresh until directory contents changed or I re-enter directory.
User avatar
Hacker
Moderator
Moderator
Posts: 13040
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Very specific problem when changing attributes

Post by *Hacker »

petermad,
Yes, that's why I asked MVV, hoping perhaps he could reproduce what noone else could.

MVV,
Thanks.

Roman
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.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Very specific problem when changing attributes

Post by *ghisler(Author) »

I'm using some sort of CRC-32 function. I will check why it's not detecting the attribute change.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Very specific problem when changing attributes

Post by *petermad »

This problem still exist in TC 9.5b4
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply