Hang on SHIFT key when showing a tree for one or both panels

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
TWiStErRob
Junior Member
Junior Member
Posts: 16
Joined: 2005-04-04, 13:41 UTC
Location: Hungary
Contact:

Hang on SHIFT key when showing a tree for one or both panels

Post by *TWiStErRob »

Hi!

I know it sounds weird and the repro is not exact, but I can do it any time. And it's annoying, because I often use these combination of keystrokes.
I have Windows 7 32bit, Core 2 Duo, 7.55 beta 3.

Prereq:
Show\Separate tree\One or two for both is on
Left and right panel in full detail view (maybe not needed)
Enter a directory with multiple directories inside on one of the panels. The tree will expand itself.

Repro:
Randomly do the following for about a minute (I know, it's crazy):
1: Shift+f6, Enter
2: Up or Down
3: Go into a directory and back up (to return to the same directory)
Repeat 1,2,3 randomly, have more step ones than the other two, like:
12131122212123112212131222121

TC will freeze/hang when you press shift for the shift+f6 key combo after a while. I did not try doing it slowly, but rather with 3-4 keystrokes / second.

Maybe it will help if you have more directories and be deeper in the tree, I'm not sure.

Attaching Win7 Diagnostic message, I'm not sure if it contains useful info for you.
I also have a dump file created by Windows Task Manager (right click on a process), but it's 90M, 32M zip compressed. I may mail it if needed.

Code: Select all

Description:
  A problem caused this program to stop interacting with Windows.

Problem signature:
  Problem Event Name:	AppHangB1
  Application Name:	TOTALCMD.EXE
  Application Version:	7.5.5.0
  Application Timestamp:	2a425e19
  Hang Signature:	5230
  Hang Type:	4
  OS Version:	6.1.7600.2.0.0.256.48
  Locale ID:	1038
  Additional Hang Signature 1:	5230f1c8c706fa6c5d19f19325d6cf99
  Additional Hang Signature 2:	caa7
  Additional Hang Signature 3:	caa7cadd985295790efb554c9a64e038
  Additional Hang Signature 4:	6dbc
  Additional Hang Signature 5:	6dbc35b24f88878de13bfd7b365e4904
  Additional Hang Signature 6:	7565
  Additional Hang Signature 7:	75653f5f1d462707999b0c026e5dbff5

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have tried that now, but I do not get any hangs. Maybe your virus scanner takes a long time to scan the treeinfo.wc file?

I recommend that you get the free tool "process monitor" from www.sysinternals.com and check where TC hangs.
Author of Total Commander
https://www.ghisler.com
TWiStErRob
Junior Member
Junior Member
Posts: 16
Joined: 2005-04-04, 13:41 UTC
Location: Hungary
Contact:

Post by *TWiStErRob »

I think you meant Process Explorer, because I did not find a way to check the stack with procmon and I knew procexp can do it.

Here are the stacks and infos of the threads while TC was hung (from procexp, totalcmd.exe, right click, properties, threads tab):
http://twisterrob.uw.hu/tchang.zip (I did not find a way to attach the zip file... please someone do so)

Threads 2696 and 2976 were showing activity (Cycles delta) the whole time while I copied/shot the info.
Also Thread 2976's stack was changing constantly back and forth between the two saved ones.

Where are the treeinfo.wc s? I can't find any in root folders as used to.

I have Avira Personal Free, but I don't think it is scanning a file for half an hour (that is long I was waiting for TC to recover now).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, I meant Process Monitor. It shows you which programs access the disk when. You just need to make TC hang, and look what happened in the access list then...

The treeinfo.wc files are stored in the root of each drive, as hidden files - but only if you use the "change directory tree" function. They aren't there if you never used it.
Author of Total Commander
https://www.ghisler.com
TWiStErRob
Junior Member
Junior Member
Posts: 16
Joined: 2005-04-04, 13:41 UTC
Location: Hungary
Contact:

Post by *TWiStErRob »

1. I started procmon and disabled capturing
2. I started TC and set it up
3. I enabled capturing in procmon (ctrl+e)
4. I switched to TC via Alt+Tab
5. I did the repro
6. When TC hung I immediately switched to procmon via Alt+Tab
7. I disabled capturing in procmon (ctrl+e)
8. I saved events to a native file

I see nothing suspicious, maybe you will:
http://twisterrob.uw.hu/tchang_procmon_log.zip: just open the log in procmon.

I did not use Alt+F10, nor Ctrl+F8; I set up to have one tree on the left via Ctrl+Shift+F8.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Apparently there is no hang in the file system. I have now also analyzed your "Process Explorer" data. 2256 is the main thread, the other threads are just waiting.

The strange thing is that the Main thread seems to be showing a MessageBox "No files selected" which is shown only when the cursor is in one of the two main file list panels, not when it's in the tree panel.

It seems that the focus somehow went from the tree to the file lists. Can you confirm that?
Author of Total Commander
https://www.ghisler.com
TWiStErRob
Junior Member
Junior Member
Posts: 16
Joined: 2005-04-04, 13:41 UTC
Location: Hungary
Contact:

Post by *TWiStErRob »

I'm using this layout:

Code: Select all

        left:    right:
tree   detail    detail
The cursor should not exit the panel we're doing the repro in.
The repro steps does not include keypresses which cause the focus to leave the panel. It may be so that I press the Shift or Shift+F6 while TC is getting rid of the textbox for inplace rename, and that time there is no file selected.

I don't switch to the tree on the left of the left panel with detail view. Just operate on one of the panels.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I still cannot reproduce the error. Something must be forcing the cursor out of the tree panel on your system. :(
Author of Total Commander
https://www.ghisler.com
TWiStErRob
Junior Member
Junior Member
Posts: 16
Joined: 2005-04-04, 13:41 UTC
Location: Hungary
Contact:

Post by *TWiStErRob »

I'm not sure you understood the repro. There is no focus on the tree.
The tree just have to be enabled.
Check this image: http://twisterrob.uw.hu/repro.png

Left and right panels both have detailed view + a single tree at left of TC.

I was able to repro this on multiple computers:
Remote virtual machine, Windows 2003 Server
My laptop, Windows XP
My PC, Windows 7
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It really seems that I misunderstood you. I thought that you tried to rename folders within the separate tree with Shift+F6!

However, when I just edit the current path with Shift+F6 and press Enter, I do not get any hangs.

The error which you get occurs in the function which is started when you press F6 instead of Shift+F6. Maybe you pressed F6 before Shift?
Author of Total Commander
https://www.ghisler.com
TWiStErRob
Junior Member
Junior Member
Posts: 16
Joined: 2005-04-04, 13:41 UTC
Location: Hungary
Contact:

Post by *TWiStErRob »

I type too fast so I think I will install a keylogger and check what I did OR try to find an exact slow repro.

I seemed to experience the hang on SHIFT keydown, that's why the topic title...
TWiStErRob
Junior Member
Junior Member
Posts: 16
Joined: 2005-04-04, 13:41 UTC
Location: Hungary
Contact:

Post by *TWiStErRob »

So again the repro, shorter but still not exact.

1. Enable Show\Separate tree\1 (CTRL+SHIFT+F8 ) from menu or with shortcut
DO NOT USE THE MOUSE
2. Go to a directory with many (5+) subdirectories
3. Enter one of the subdirectories
4. Exit that subdirectory (now you're back to dir with many subdirs)
5. Rename a directory with SHIFT+F6, commit with ENTER
6. Navigate with (press) UP and DOWN key once or twice
7. Repeat step 5, 6, 7 until the hang (3-5 was enough for me).

3-5 may be enough for me because I have many extension highlights set (20-30 with 20+ extensions /*.xxx/). However I was able to reproduce it with a cleanly started TCmd /new ini/ (with a separate user which does not started it before).

The hang occurs when I press F6, not SHIFT. I was too quick and could not distinguish before.
SadBunny
Junior Member
Junior Member
Posts: 5
Joined: 2010-05-22, 17:12 UTC
Location: Amsterdam, Holland

Post by *SadBunny »

Hi, long time user, first time caller. I went to read this forum because I just was wondering why an unpacking thread cannot be backgrounded. Will search for that in a minute. But I saw some other threads that interested me, among which this one. I thought 'what the heck, is this guy doing some elaborate joke or is this one of the most obscure bugs that I've ever read about?' So I tried to repro by using the Rob's last posted repro instructions, and very unexpectedly, I'm looking at one long-winded hang!

So it seems I can reproduce! I needed about nine 5-7 repeats the first time. The second attempt was within 3 times. The third in 10 times. But I think I am seeing the point of conflict here and I now can reproduce easily and more exactly, or so it seems. Change TwisterRob's instructions as follows:

So again the repro, longer again, but now maybe a bit more exact.

1. Enable Show\Separate tree\1 (CTRL+SHIFT+F8 ) from menu or with shortcut
DO NOT USE THE MOUSE
2. Go to a directory X with many ('many' as in Veritable Shitload, like 300+, all with some stuff in them) subdirectories. Expand that directory in the tree! But stay in the directory X in the full view panel.
3. From dir X in the full view, rename a directory with SHIFT+F6, commit with ENTER
4. *note the tree refreshing the whole load of directories*
5. QUICKLY (while TC is refreshing the tree view due to the rename, meaning way within a second) cursor to a dir above or below the one you just renamed, and press Shift-F6 to rename that as well. Just do it as if you've done it a million times before and are just purely working from muscle memory.
6. Now a little glitch can happen while cursoring to above and below, namely the cursor highlite bar can disappear if you do it RIGHT before the tree view refreshes again.
7. Now act like a 16-hours-a-day TC user again and react to that from your instinct. If you are like me, you either start incessantly tapping the cursor key until the bar reacts again, and/or you instinctively grab the mouse and click somewhere around where your cursor just was when it disappeared to make it reappear again.
8. Repeat the renaming of folders incessantly, in a few tries it will hit that sweet hang spot. Or at least it did on my system.

Judging from the face that Rob only realized what he was exactly doing after a large number of tries, I suspect Rob is exactly like me and uses TC like a second nature. And judging from the fact that the author is the author, I guess that he knows what I mean as well. What I mean is: just TRY to want to rename 10 fines manually in a repetitive manner and try it fast and automatic... :)

I think the steps of the tree refreshing process coinciding with the file rename actions (cursoring, shift-f6'ing) are causing the problem. I don't know how TC is written but the following test would be interesting: a test version where after a Shift-F6 rename commit with a tree open, the input is blocked until right after the tree refresh is complete. I am willing to bet that the problem won't appear. Not that that should be a definite fix ;) You see, being able to continue working while the tree is waiting for the refresh is a GOOD thing :D Makes us humans subconsciously feel like we're multitasking, is my belief. But then again, I could be wrong about everything I say.

I run Windows 7 Professional 32 bits Dutch (NL). No weird stuff running, not exactly just out of the box but nothing weird. I reproduced it on different harddisks by the way. If you need more intel from me, let me know :) This bug is interesting.
Grandma, what big ears you have! Yes, that's to hear you better!
Grandma, what big eyes you have! Yes, that's to see you better!
Grandma, what a big fat as- Yeah, that's about enough of that!
TWiStErRob
Junior Member
Junior Member
Posts: 16
Joined: 2005-04-04, 13:41 UTC
Location: Hungary
Contact:

Post by *TWiStErRob »

Thanks SadBunny for your confirmation.
You're right I'm kinda using my TC as a shell (there was a time when I actually replaced explorer.exe in registry and started totalcmd.exe instead).

FYI out-of-the box Win7 has such a loaded directory: c:\Windows\winsxs it contains 6677 directories on my system. This maybe a little too much, but I was able to reproduce the bug there also.

Refreshing in background is a great thing (also I would like to take the opportunity to thank you, Christian, for making SHIFT+ALT+ENTER doing the stuff in background), should not be reverted to do it on one thread.
Also it seems that refreshing the tree of a huge directory blocks the user from navigating in the active panel, but this may be a wrong assumption.
Post Reply