Very specific problem when changing attributes
Moderators: Hacker, petermad, Stefan2, white
Very specific problem when changing attributes
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.
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.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Very specific problem when changing attributes
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: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
Code: Select all
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
"NoFileFolderConnection"=hex:01,00,00,00
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Very specific problem when changing attributes
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).
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).
- ghisler(Author)
- Site Admin
- Posts: 50471
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Very specific problem when changing attributes
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
https://www.ghisler.com
Re: Very specific problem when changing attributes
What OS did you test under?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.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Very specific problem when changing attributes
Confirmed the problem under W10 shown in my signature.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.
Looks like the checksum doesn't help in this case.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Very specific problem when changing attributes
2ghisler(Author)
I just found another set of files with the same behaviour: http://madsenworld.dk/tcmd/attribtest2.zipApparently you found such a rare case where the checksums are the same, but the content is different.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Very specific problem when changing attributes
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.
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.
Re: Very specific problem when changing attributes
MVV,

Roman
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.When I press F2, the panel flashes, but is not updated properly.

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.
Re: Very specific problem when changing attributes
2Hacker
As I wrote:
As I wrote:
2Hacker9. Click F2 and or Ctrl+R to reread the panel - no change.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Very specific problem when changing attributes
Hacker,
Nope, both F2 and Ctrl+R are unable to refresh until directory contents changed or I re-enter directory.
Nope, both F2 and Ctrl+R are unable to refresh until directory contents changed or I re-enter directory.
Re: Very specific problem when changing attributes
petermad,
Yes, that's why I asked MVV, hoping perhaps he could reproduce what noone else could.
MVV,
Thanks.
Roman
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.
- ghisler(Author)
- Site Admin
- Posts: 50471
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Very specific problem when changing attributes
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
https://www.ghisler.com
Re: Very specific problem when changing attributes
This problem still exist in TC 9.5b4
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar