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

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

Moderators: white, Hacker, petermad, Stefan2

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

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

Post by *MVV »

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: 48005
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) »

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
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
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 »

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: 48005
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) »

TC calls FindFirstFileW in a background thread - this shouldn't hang the masin process...
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
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 »

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: 48005
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) »

Could you produce a stack trace with "WhatIsHang", please?
http://www.nirsoft.net/utils/what_is_hang.html
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
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 »

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: 8702
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 »

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: 48005
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) »

Thanks, I will analyze it. Please also send me a report if you can reproduce the original problem.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
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) »

The problem which caused your report should be fixed in Total Commander 9.22 release candidate 1, please test it!

You may still get hangs in other places. If you do, please send me again a hang report.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
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 »

Thank you, I hope it will work fine. :)
Since it is hard to reproduce the bug at any time, testing may have some time, I'll report if I find any hangs.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
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) »

Thanks, that would be nice!
Author of Total Commander
https://www.ghisler.com
Post Reply