Debugging shell-extension that causes windows to freeze

3

For some time now, I have been living with and working around an annoying problem in Windows XP whereby any time I open a file dialog (Open/Save) in any program, not long afterwards, that program will hang (the GUI will completely freeze and “ghosts”).

I have done extensive tests and can confirm 100% that it is file dialogs that are the problem. directory-selection dialogs do not cause the problem.

The obvious explanation is that some shell-extension is misbehaving, but I am having difficulty determining which one.

I tried using ShellExView and Autoruns to disable shell-extensions, but that did not help, especially since there are 333 items in ShellExView and 154 items in Autoruns, so disabling and rebooting for each one would be a nightmare (particularly because even though the problem is consistent, it is not immediately reproducible; I have to just kind of wait for it hang some—random?—time after).

Does anybody know of a way to find out what shell-extensions would specifically affect file dialogs?


(No, there are no network-mapped drives.)

Synetech

Posted 2012-07-22T01:37:28.230

Reputation: 63 242

have you tried AutoRuns? http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx Explorer tab...

– Logman – 2012-07-22T02:00:24.253

Yes, with the same results. – Synetech – 2012-07-22T02:04:43.670

Have you tried running Process Monitor to watch a known-offender? Is the hanging permanent, or does it time out and return to normal after x seconds or minutes? – None – 2012-07-22T02:07:00.940

They stay hung forever. Process Monitor only works on SP2+ (and is also very sluggish and cluttered as well). I’ll try FileMon/RegMon (since I can’t remember if I already tired them). The problem is that the hang happens after a while, so it is difficult to figure out a good set of filters. – Synetech – 2012-07-22T02:08:43.387

I tried FileMon and saw several references to shell-extensions (and repeated references to a mysterious, nonexistent journal.exe). I don’t believe that journal.exe has anything to do with, though I am trying to figure out where that comes from and eliminate it. Rather, I am going to try disabling the shell-extensions that were listed because there are much fewer (5) than the full list that ShellExView and Autoruns give. – Synetech – 2012-07-22T03:25:09.500

Answers

1

I know it's not a quick process, but disabling extensions and then re-enabling them is really the best solution. Any of the shell extensions may be interacting in an unexpected way with the file dialog.

You don't have to test them one by one. Using a "binary search" will reduce your number of necessary explorer restarts to 9 in the worst case (assuming that just one extension is causing your problem).

  1. Disable half of the extensions (~166).
  2. Terminate explorer and then restart it.
    • If the problem is gone, re-enable half of the disabled extensions (~84).
    • If the problem is still present, disable half of the enabled extensions (~84) and re-enable the previous group of disabled extensions (~166).
  3. Repeat from step 2.

To terminate explorer gracefully do one of the following:

  • log off
  • XP specific: bring up the shutdown dialog, press and hold ctrl-alt-shift and then click the "cancel" button.
  • Win7 specific: ctrl-alt-right-click the start menu (not the start button) and select exit

As long as you test half of the remaining group of extensions at a time, you will narrow down the field very quickly. The possibilities drop from 333, to 166, to 84, 42, 24, 12, 6, 3, 2, to 1 and then hopefully that last one is your culprit. Along the way it may become obvious which ones are more likely to cause problems and you can switch from a 50/50 strategy to 60/40 or 80/20 if you're really feeling confident.

edit: I should mention that I found this question because I was attempting to debug a network drive slowness issue caused by a shell extension. I used this exact process to find the cause. Only took about 15 minutes.

Jimbo

Posted 2012-07-22T01:37:28.230

Reputation: 21

Actually, I didn’t use a strict binary search (ah, high-school, how I miss ye) with exactly half at a time, but I did try something effect. The problem is that like you said, it could be two or more extensions interacting which means that disabling any one individually may or may not fix it which greatly complicates things. ☺ +1 for the binary search though; for anyone having an issue that isn’t an interaction, it certainly can help. – Synetech – 2013-04-05T16:25:03.907

What was the cause, if you don't mind my asking? – Jimbo – 2013-04-05T21:16:46.920

In my case? I’m not sure. I can check tomorrow when I use my XP system, but if I recall correctly, it was two or three extensions that when all enabled, would cause the issue, but disabling some of them would remove the problem. I recall that a big issue was that some of the extensions in question had multiple hooks and/or files which greatly complicated matters since disabling an extension might require disabling multiple hooks/files or disabling a single hook/file would leave an extension only partially functional/broken, not to mention confusing which hook(s) were responsible. :-/ – Synetech – 2013-04-05T21:22:50.047