[9.21a] TC hangs for a while if remote PC disconnected

Please report only one bug per message!

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8198
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

[9.21a] TC hangs for a while if remote PC disconnected

Post by *MVV » 2019-01-31, 06:27 UTC

I think there is a something that I've reported in the past, but the problem remains.
I have opened some shared folders from different virtual PCs, and these may be inavailable or go to sleep, so connection may be lost. When I switch to a tab with such disconnected share (or activate TC with such share in current tab, or close current tab and another tab with such share becomes active), TC tries to restore connection, takes some time to show me login/password window, I press Cancel because all I want at this time is to open some other directory, but this one just bothers me instead, and TC hangs for a minute or two, if I click its window it becomes a ghost window, and I only have to wait or kill it and restart in order to open required folder faster. Most often such situation happens in the morning when virtual PCs are still idle.
It seems that there is a logic that handles such remote connections that is still not in background, so it would be great to finally move it into background. All logic that requests some tab contents should be in the background to avoid freezing entire TC window, and any tab should be closable (in such case awaiting thread should be stopped in the background).

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36782
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.21a] TC hangs for a while if remote PC disconnected

Post by *ghisler(Author) » 2019-01-31, 11:10 UTC

Unfortunately I do not have this problem. TC should show a "connecting" dialog after about 5 seconds. Could you check with process monitor from sysinternals where it hangs?
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8198
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [9.21a] TC hangs for a while if remote PC disconnected

Post by *MVV » 2019-02-01, 06:16 UTC

Yes, indeed it shows Connecting dialog, but it blocks TC window so I can't switch to another tab and open desired folder w/o waiting, and when I cancel connecting, it hangs.

I've checked with Process Monitor, after cancelling Connecting dialog TC have spent 34 seconds in CreateFile on remote folder (within FindFirstFileW call according to the stack) with DISCONNECTED result code, and there was no way to prevent it, TC had a ghost window. According to the list of threads FindFirstFileW happens in main TC thread (start address is the entry point).


Having separate threads for different tabs at least for non-local locations would improve overall stability very much. And, it would be nice to have Connecting dialog locking only its tab, not entire TC.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36782
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.21a] TC hangs for a while if remote PC disconnected

Post by *ghisler(Author) » 2019-02-04, 15:02 UTC

TC calls FindFirstFileW in a background thread - this shouldn't hang the masin process...
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8198
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [9.21a] TC hangs for a while if remote PC disconnected

Post by *MVV » 2019-02-05, 05:39 UTC

But for some strange reason it freezes it, and it looks like it calls it from main thread...

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36782
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.21a] TC hangs for a while if remote PC disconnected

Post by *ghisler(Author) » 2019-02-07, 11:03 UTC

Could you produce a stack trace with "WhatIsHang", please?
http://www.nirsoft.net/utils/what_is_hang.html
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8198
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [9.21a] TC hangs for a while if remote PC disconnected

Post by *MVV » 2019-02-11, 05:52 UTC

Unfortunately it isn't easy to reproduce it at any time, I've just tried but with no luck. I'll try to get such trace when this will happen again.

User avatar
MVV
Power Member
Power Member
Posts: 8198
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [9.21a] TC hangs for a while if remote PC disconnected

Post by *MVV » 2019-02-13, 05:31 UTC

I've sent you some kind of hang report to support email, please check it. In the morning, I've checked all tabs with remote shares and found one that displayed a Connecting dialog but when I've cancelled it, TC have hung for 20-30 seconds with a ghost window.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36782
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.21a] TC hangs for a while if remote PC disconnected

Post by *ghisler(Author) » 2019-02-14, 11:04 UTC

Thanks, I will analyze it. Please also send me a report if you can reproduce the original problem.
Author of Total Commander
http://www.ghisler.com

Post Reply