Watchdirs is buggy in right panel when same folder is shown

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Watchdirs is buggy in right panel when same folder is shown

Post by *Samuel »

I show the same folder in the 2 panels and use "watchdirs=3". I delete the output (18 Textfiles - 350KB together) of a program and start it. There should be some file create messages and afterwards size / date messages, because the individual files grow in size. (there should be around 500 individual file size / date messages)

The left panel is updated correctly, but on the right panel some files are not shown (around 7 of 18 ). If I change the left folder to another one, the right panel is properly updated.

BTW: Could not reproduce with a quick ahk like:

Code: Select all

FileDelete,*.tmp
sleep,2000

loop,20
{
 FileAppend,Text,File %A_Index%.tmp
}
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm not aware of any such problem, but I will test it.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, it seems that I found the problem now! :)

What happens is the following: Total Commander is listening for file system events with function WaitForMultipleObjects, where the dir in the left panel is the first object, and the dir in the second panel is the second objects. Now when BOTH sides have an event, Windows just reports that the first side has one - TC reads only the left side events until there are no more, and then starts with the right side events.

It seems that when there are many 100s of events, some internal Windows queue seems to get full, so events are lost. I changed this now to always check also the right side when WaitForMultipleObjects signals a left side event. This way it seems that no more events are lost.

Here is the batch file with which I could reproduce the problem (name it e.g. makefile.bat):

Code: Select all

FOR /L %%d IN (0,1,1000) DO echo . > %%d
Author of Total Commander
https://www.ghisler.com
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

I can happily confirm the fix in TC 7.5 rc2.
Thank you.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
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