ThreadFindFirst not always working on reload

This forum contains bug reports from previous beta tests - the issue has remained unresolved, either because it couldn't be reproduced, or couldn't be prevented/fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

ThreadFindFirst not always working on reload

Post by *StatusQuo »

Maybe more a missing feature, but

Code: Select all

[Configuration]
ThreadFindFirst=1
is not always working on reloads, TC still hangs for about 20 seconds here in some situations.

100% reproducible here (today) on XP SP2 + Win2k SP4 this way:
  • have another program active beneath TC
  • open an existing network share \\server\share\dir e.g. in a tab in right panel
  • switch to another program using Alt+Tab
  • switch off or cut connection to the above used share
  • switch back to TC using Alt+Tab
  • if Auto-Refresh is disabled, press Ctrl+R
=> TC hangs for about 20 seconds, then an error dialog is displayed, saying
Access denied on file
\\server\share\dir
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48007
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Only FindFirstFile is called in the background thread. Further calls to FindNextFile etc. are done again in the foreground, for speed reasons. Maybe FindFirstFile succeeds in your case, but FindNextFile fails? I don't think that I can do anything in that situation. But I will try to reproduce the situation in the debugger to check what function is hanging in this case.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48007
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2StatusQuo
Unfortunately I can't reproduce this error so far. How did you cut the connection in step 4? I simply unplugged the LAN cable, but then I get an error immediately when trying to refresh the share...
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2ghisler(Author)
I usually send the remote PC to hibernation
or simply disable the network connection on the target (!) machine
(right-click - disable, in systray or control panel\network connections).
I simply unplugged the LAN cable, but then I get an error immediately
Did you try to do that on the target machine?
I also get the error message immediately, if I disable the network connection of the PC where TC is running on,
but TC hangs if the server/target PC is cut off.
This way the local PC still has access to gateway and DNS server etc., only the server with the share is not reachable.

After some more testing: TC only hangs when it has opened at least one subdir on the share:
  • \\server\share : no problem, TC shows "connecting" dialog.
  • \\server\share\dir : TC hangs until the error message appears.
I hope you can reproduce it this way?


BTW, I have auto-refresh disabled here, so I have to press Ctrl+R for reloading:

Code: Select all

NoReread=AB\:/
noreread2=AB\
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48007
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I tried what you suggested: Hibernating the other PC, and in a second test, unplugging that PC's network cable while it was running.

Unfortunately I couldn't find any problems with ThreadFindFirst: TC locks for about 3 seconds, and then shows the connect dialog.

Did you perhaps switch away from TC while it was hanging? The connect dialog is shown ONLY when TC has the focus.
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

ghisler(Author) wrote:Did you perhaps switch away from TC while it was hanging?
No, after switching back to TC I waited the whole 20 seconds watching the clock to verify it...

I now tested the other INI parameters used here and think I got it - started using TOTALCMD.EXE /i=%temp%\TEST.INI:
This works ("Cancel" dialog after 3 seconds):

Code: Select all

[Configuration]
ThreadFindFirst=1
This does not work (TC hangs for about 20 seconds when trying to reread using Ctrl+R):

Code: Select all

[Configuration]
ThreadFindFirst=1
NoReread=\
BTW, after pressing "OK" button or ESC key in the error dialog, TC hangs for another 20 seconds. :?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48007
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, I have
ThreadFindFirst=1
and
noreread=\IJ

and don't have this problem on XP. :(

Maybe a problem with a background virus scanner trying to scan the inaccessible drive?
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Both virus scanner and personal firewall were deactivated for this test - it's still hanging,
- from W2k SP4 and XP SP2 on different machines in both directions
- using both TC 7.03 and 7.04 Pre
I even tried this from an absolutely fresh install of XP SP2, with nothing else installed but TC 7.03 - with the same result. :(

This is how I connect to the network share in TC:

Code: Select all

net.exe use \\1.2.3.4 password /USER:user
cd \\1.2.3.4\share\subdirectory
If you also did this:
# switch to another program using Alt+Tab
# switch off or cut connection to the above used share
# switch back to TC using Alt+Tab
...then I wonder what is different in our installations... :?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48007
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Do you use XP home or pro? I'm using XP home here.
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

ghisler(Author) wrote:I'm using XP home here.
So do I in these tests.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48007
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have tested on XP Pro too, no problems either. Does it make a difference whether the two directories in TC contain many files or just one?
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

No difference between many files or one, even with empty directories TC behaves the same.

P.S.: Today it's more like 16 seconds.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Post Reply