The Case of the Intermittent (and Annoying) Explorer Hangs

The Case of the Intermittent (and Annoying) Explorer Hangs

  • Comments 3
  • Likes
I have several computers in my home network where each one has a general designated purpose. For example, one is my game machine, another is my home development system, and a third is where I manage my pictures and home videos (and they all double as test systems). I recently started experiencing intermittent temporary Explorer hangs of up to a minute in length on the development system when I opened certain folders and scrolled through their contents. We’ve all experienced Explorer hangs and the first few I wrote off to standard Explorer flakiness. However, after the initial hang I could navigate the folders fine for a while, but a few minutes later I’d experience a long hang again. When I recognized the reliability of the hangs I suspected that something was broken and I decided to investigate.

The first step in my analysis was to attempt to examine the hanging Explorer thread to see if it revealed clues as the cause of the hang. For that I turned to Process Explorer. I opened the process properties dialog for Explorer.exe and clicked on the Threads tab. Then I repeated the step of opening a folder that exhibited the hang effect and noted that one of the threads that executed in response to the action had a start address in a DLL with a promising name: BrowseUI. I double-clicked on the thread to view its stack:



A thread’s stack is a record of functions that have invoked other functions that you read from bottom to top. For example, in this stack the GetPathSpeed function in SHELL32.dll at frame 29 invoked MutlinetGetConnectionPerformanceW in MPR.dll at frame 28. This stack trace proceeds all the way into the kernel, ntkrnlpa.exe, and then into the Mup driver. The calls to SHDefExtractIconW (frame 31), MPR.dll (Multiple Provider Router) and Mup.sys (Multiple UNC Provider driver) told me that Explorer was trying to access a network path to obtain icons for the folder that I had opened. I suspected that the network path in question was not valid and that the apparent hang was a timeout waiting for a remote computer to respond.

My next step was to determine what network path Explorer was trying to access and why it was accessing a network path to get an icon in the first place. I knew that Filemon could tell me the path that was causing problems so I launched it and set a filter so that it would report only errors. The resulting trace looked like this:



Aha! Now I was getting somewhere. The reference to the path on the Development computer resulted in a BAD NETWORK PATH error and for good reason: several days earlier I’d decommissioned that computer.

There was just one question left to answer: where was Explorer getting the path that referenced the decommissioned computer? I knew the answer lay in the Registry and that gave me two options: I could search for the path in Regedit or I could watch for the reference in Regmon. I chose the latter so I started Regmon and set the include filter to “development”. I refreshed a problematic folder and saw this in Regmon’s output:



There was the answer. I have for a long time used an older version of Paint Shop Pro as my picture viewer because it has the features I need and the convenience of the fact that you don’t need run an installer to use it. If you run its executable, Psp.exe, Paint Shop Pro configures its settings automatically and runs correctly even from network shares. That means that I can put it on one system in my network and run it from the others.

The system from which I’d originally run it was the decommissioned computer, Development. Paint Shop creates browse files in the folders you view with its browse functionality and the Regmon trace revealed that it registers an icon for those browse files. Since I hadn’t performed any kind of uninstall the icon for Paint Shop Pro’s browse file type was still registered to the original location of the executable on the missing computer. When Explorer came across one of those browse files it tried to load the icon, and because Explorer is, even today, sadly largely single-threaded, when the network driver waited for the phantom system to respond Explorer’s user interface hung.

Now I was left with fixing the problem. I found after some digging that there is no way to easily manage default icon associations through any supported means in the Explorer UI. I could have hunted down every Paint Shop Pro-related file in Explorer's File Types tab in the Folder Options dialog and deleted the associations, but instead I just manually deleted Paint Shop Pro’s registry keys and browse files from my systems.

Using Process Explorer, Filemon and Regmon I had diagnosed and fixed the problem in about 15 minutes. What’s disturbing to me about this troubleshooting example is that the average user confronted with the same scenario would have had no way of knowing what was causing the hangs or of fixing them. This is just one example of the many types of Windows issues that cause users to complain that their systems slow down over time and that result in a general “I don’t know, just reinstall” mentality. I hope Vista does better.

Update: Here's an article by Larry Seltzer on this blog entry where he points out that some users confronted with this type of problem might suspect malware to be responsible: http://www.eweek.com/article2/0,1895,1855391,00.asp

Originally by Mark Russinovich on 8/28/2005 7:52:00 AM
Migrated from original Sysinternals.com/Blog

# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Do you know if the windows explorer in Vista will be more multi-threaded?

The current version often has me jumping for the command line - which says alot coming from a OS X fanboy :)

8/28/2005 8:54:00 AM by Troy Phillips
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I have a similar problem, only a lot worse. I use Windows XP SP2 on my laptop. Sometimes, if I start the machine with no Ethernet connection and later I plug the cable, Windows gets an IP address via DHCP and then Explorer hangs completely (actually, only the component that deals with the taskbar and the system notification area).

The worst part is that if I press Ctrl+Alt+Del and try to open Task Manager, it doesn't work because starting the process involves adding a button to the taskbar for the new window. Since the taskbar is hung, this simply doesn't work.

Even more awkward is that existing applications and the desktop window work just fine. For instance I can right-click "My Computer", select Explore and start a new Explorer window. However, if I try to start new processes that open an application window, they get hung until Explorer snaps out of it.

Another awkward thing is that Explorer de-freezes after some amount of time, but the interval varies (1 - 10 minutes). I haven't had a chance to debug the system since I can't start a debugger on it. Maybe when I have some time I'll install a remote debugger and dig around the issue a bit.

8/28/2005 1:14:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

"The average user confronted with the same scenario would have had no way of knowing what was causing the hangs or of fixing them."

quoted for emphasis :)

8/29/2005 7:34:00 AM by hotbot
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Very interesting. I too experience hangs or delays of many seconds with Explorer. I tried Mark's technique, and found that whenever I right click on a desktop icon, Kodak Imaging is invoked. Is that normal?

8/29/2005 9:55:00 AM by Luigi M Bianchi
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I first read this post this morning, and now this evening, its bold and italisied**** in SharpViewer. Which I take to mean that it has been updated. Is there any way for me to know what changed--was is a typo, or something more important...? I see some bloggers, e.g. Raymond, add a comment [updated ... HH:MM ... why ...].

Thanks for the articles btw. :-)

Alan

8/29/2005 12:36:00 PM by alanjmcf
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I have been a reader of your blog since it launched. It has always been very inciteful. I started haunting your site after your latest book Windows Internals 4th edition which is definitely a must read.

Shaun Bedingfield
blogsb.blogspot.com
shaunbed@houston.rr.com

8/29/2005 1:44:00 PM by Shaun Bedingfield
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I think you can change a default icon association in explorer thus.

Open any folder then select tools -> folder options

Then select file types tab. Find the extension you want to change and click advanced. There is a then a Change Icon button.

HTH

8/29/2005 1:47:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

It has always been very inciteful.

Yes, this site has incited me to riot at the MS offices quite often! ;)

8/29/2005 2:26:00 PM by Kenny
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

"I have been a reader of your blog since it launched. It has always been very inciteful."

I think you mean "insightful" although Windows frustrations have incited me to do many unspeakable things. :)

As for this particular issue, I think you could diagnose it by saying it was a general no-no that the HKCR\*\DefaultIcon\(default) value used a network path. Even if it referenced a valid system, it seems like a Really Bad Idea to run across the network to grab the piddly little icon.

8/29/2005 5:00:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Yeah, there have been many instances when I have had to use a debugger or tools such as Filemon and Regmon to debug wierd issues with my home machine. Recently, on one of my home computers, the Windows update site would error out with an obscure COM error every time. After some easy initial steps (like Googling the error code) failed, I had to attach WinDbg to IE and actually debug what was happening. I stumbled upon a call to CoCreateInstanceEx that was failing (of course, the set of events that led me to set a breakpoint on CoCreateInstanceEx is too long to explain here). I then looked up that CLSID in the registry on another computer (where Windows Update was working fine), found the DLL which hosted that COM object and then registered it on the failing machine. And viola, my Windows Update was working again. How on earth was an average end-user to ever figure this out? And this was an example where the site could very easily have been helpful (because the script knows which CoCreateInstanceEx failed).

8/30/2005 12:29:00 PM by toomuchwin32
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I've been using Filemon for about three years, and never knew where it came from (got it from a friend). After being on your site for about 10 minutes and reading over this post, you people are brilliant!

I admit, at times I have that "Oh well. Format it!" mentality. However, lately I've wanted answers, and I just wanted to thank you for posting the solution to that Explorer hang-up problem.

Good show.

8/30/2005 2:02:00 PM by curtwulf
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

a few days ago I saw this problem of every second spiking, but on the network, this was a machine that had been working fine, we did everything we could think of, up to resetting the tcp protocol, nothing worked.
I wrote a little application to demostrate the behaviour, it just unzips files from a server to the local machine, the application unzips a few files, then takes exactly a second (1000 ms) to unzip the next file, and keeps going like that, the only "solution" was to image one machine that works fine to that machine, then it works ok, so that throws any cable/server/network therories out... any ideas?
I still have the exact same problem in other machines, and it came up again in the same machines that we imaged before, right after a symantect anti-virus update, any ideas where I could be looking at to find the problem?

8/30/2005 2:46:00 PM by BlackTigerX
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Aha!

I saw this a few years ago on a Win 2000 pro system. Every time I right-clicked in explorer, it froze. And froze for a while!!

It turns out I had made the mistake of launching Winimage from a UNC pathname at my office network. Well, Winimage likes to add icons to the context menu, and it references those icons by intelligently using the location it launched from. How did I learn this? A packet capture! BTW, I think Winimage is a fine application, please don't get the wrong idea.

So - since then I've been running a full search of the registy for "\\" (without the quotes!) every six months or so, or if explorer is acting up. There are a number of entries that *should* be there, but you will quickly find the annoying entries (like shell extensions and other objects that can hang explorer) that reference UNC pathnames to servers that may no longer exist.

Yet another reason to divide explorer "the shell" from explorer the "file manager".

-Steve
(Account is "shornby" in the Sysinternals forums.)

8/30/2005 9:10:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Good article. Thanks.

8/31/2005 12:10:00 AM by uniware
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I had a problem with XP SP2 with similar roots. When I was logging on I was founding out that process of loading of my desktop was frozen having painted 2 icons. Then nothing happened: 100% Idle... Start-button, taskbar - everything frozen...

After having read this post, I've thought a little bit and found out the problem! Several of the files on my desktop were made in CorelDraw with dynamically drawn icons. Explorer was somehow run before Corel was able to generate this icon and this made impossible painting it. But explorer was waiting and so here we are. One or two times of killing explorer.exe and running it again helped.

After I've removed Corel files from my desktop those things stopped.

May be this story can help someone else.

8/31/2005 3:04:00 AM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

"The average user confronted with the same scenario would have had no way of knowing what was causing the hangs or of fixing them."

But, in all fairness, how many average users will be associating extensions with programs that don't have an installer running on network shares?

8/31/2005 5:36:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Hello,

Same thing happens if you have a UNC mapped drive letter and UNC path is not available and you try to use standard file/open dialog box offered by many applications.

Getting rid of the network mapped drive solves the problem.

-Prasad

9/1/2005 12:40:00 AM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Ditto the dead UNC Mapped drive problem - my vsc++ file open gui has been hanging on its first invocation due to a dead mapped drive.

Thanks for the blog Mark, this has been an annoyance to me for quite some time now (though never enough of an annoyance to interrupt what I was doing to try to fix it.)

It would be nice if these types of network timeouts were configurable, are they? Waiting 30 seconds for a connection on a fast network is a collosal waste of time.

9/2/2005 12:12:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Mark --

Had you considered a registry cleaning tool? I've had good luck with Crap Cleaner (http://www.ccleaner.com/). It is a lightweight temp file / registry cleaning utility. Among other things, it searches for common registry errors like bad class references, dead links, and invalid file paths. It would have spotted your invalid icon paths and allowed you to selectly remove the references one-by-one or all in one shot.

9/2/2005 2:41:00 PM by Dan Sydnes
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

"But, in all fairness, how many average users will be associating extensions with programs that don't have an installer running on network shares?"

Doesn't really matter "how many". It's actually worse if it happens less frequently (because then fewer will know about it and tracking down the cause gets more difficult).

No matter how you spin this, Mark has an excellent point: Explorer utilises too few threads.

The first time I launch Explorer after booting, it spins up my CD drives (I have one CDRW, one DVD and one CD-ROM) looking for icons and stuff. It paints the floppy and hard drive icons (I have three HDs too) and then sits there waiting for the DVD to spin up before it finishes painting.

Why can't explorer fire off the icon fetcher in a seperate thread and let me get on with my clicking? I'm not at all interested in looking at the autoplay icon of the DVD or CD I have inserted!

MS writes some wonderful pieces of software, but I'm convinced they have this one guy circulating the various teams wreaking havoc. He is the one responsible for the single thread lunacy, and I'm 100% sure he is identical to the guy who screwed up Excel's query builder (it won't let you do parameterised queries if it can't show the query in the design view). The same guy I tells you! (I use Excel once a year, so it is really strange that I should hit such issues within five minutes of usage...) That guy may be wearing a dress, but take off the fake hairpiece and you'll see that he is a gremlin in disguise.

--
Rune, http://runesbike.com/

9/3/2005 1:02:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Glad to see I'm not alone in my hatred of Windows Exploder...I love it's nice trick of misreading lock conditions on files I've recently worked with, then preventing me from moving or deleting them until I re-log onto the bloody machine..bernard reagan

9/5/2005 10:32:00 AM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Yep I resolved the similar issue weeks ago: the explorer will pause/suspend when right/double clicking a file/folder on a 2k3 server. This issue does not exist in safe mode

I collected the regmon/filemon log and noticed the suspicious entry under HKCR\Applications which points to an invalid UNC share. Removed this entry and everything works fine ?

Similar issue found on google afterwards
Right-click is extremely slow only when Network is enabled
http://windowsxp.mvps.org/rcdelay.htm

Thank you very much for developing those great troubleshooting tools. I don’t know how we can proceed if there is no regmon/filemon in the world……

9/6/2005 10:32:00 AM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I saw a similar issue with shortcuts. I had a few where I customized the icon to one on a network share. The company is rearranging some servers and domains and the icons resided in one of the moved locations. Right now they are accessible by either address, just slower on the old one. These shortcuts were in the links toolbar folder which I happened to have displayed in both explorers and the desktop taskbar.

Another I saw recently was explorer webview thumbnails causing filelocks. The files were large tiff files 200 MB to over 1 GB. The Kodak imaging was upgraded and had registered as an explorer thumbnail handler for tiff files amoungst others. If a tiff file was selected, it could not be renamed, deleted, etc. until the thumbnail was created. It takes a while to generate thumbnails on such large files.

Other possible delays can come from displaying alot of metadata fields in mouseover tooltips or in the detail view.

9/6/2005 8:19:00 PM by Scott H.
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

After installing SP2 for XP, I also had this problem with hangs when right clicking or deleting.

My normal reaction in earlier Windows incarnations, had been to re-install, but this time I didn't want to spend the time for a system re-install.

After some regmon and filemon research (debugging is not my, hmm, specialty), I stumbpled upon a great tool: Shell Extensions Manager on http://www.nirsoft.net/utils/shexview.html , which showed me all the installed shell extensions.

Felling lucky, I decided to disable all non-MS Context Menu Handlers. That solved the problem. Then I started re-enabeling them one-by-one, until the hang reappeared (and the faulty part thus was identified). Problem solved.

Sorry to mention other tools on Marks Blog - but this was the one time when Sysinternals, didn't provide the answer :)

9/7/2005 8:22:00 AM by Henrik
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Actually, Autoruns would have also allowed you to disable context menu handlers.

9/7/2005 8:29:00 AM by Mark Russinovich
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Note to those mentioning locked files requiring a reboot should take a look at Handle.exe which can be used to find who has a lock on a file and convince it to let go.

9/7/2005 9:34:00 PM by Wes
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

IF Explorer was multi-threaded and patched with a rootkit it would be impossible to control. It would be nice if there was a complete set of binaries that replace windows to
allow alternate shells, which is all Explorer is.

9/9/2005 3:02:00 PM by Kiernan Holland
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

IF Explorer was multi-threaded and patched with a rootkit it would be impossible to control. It would be nice if there was a complete set of binaries that replace windows to
allow alternate shells, which is all Explorer is.

9/9/2005 3:03:00 PM by Kiernan Holland
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Thanks Mark - I had exactly the same probem with PSP6 so this really helped me.

Here are several other Explorer "features" that I find particularly annoying:

Paint the Window

Explorer should leverage multiple execution threads: one for updating the on-screen UI, and however many threads are necessary to query DVDs, network shares, etc. The on-screen display should always display valid and timely status information. IT SHOULD NEVER SIMPLY HANG, REFUSE TO REPAINT ITSELF, TIMEOUT, KILL THE RESPONSIVENESS OF THE START MENU ETC.

This is most annoying when using a wireless laptop for similar device whose network connectectivity is a bit tenuous.

Highlight the Drop Target

One more Explorer nit pick: During a right-click drag-and-drop of an resource into an Explorer-displayed folder, moving the cursor over folders in the Explorer window highlights the folder directly under the mouse cursor. However, once the right mouse button is released Explorer erases the highlight on the target folder and re-highlights the folder previously selected in Explorer. This is really annoying because release of the right mouse button pops open a Copy/Move/Cancel context menu. But what is the target folder for the Copy/Move/Cancel? Explorer has erased the highlight so you're never really sure you have selected the correct target folder for the Copy/Move and there's no way to determine this without actually performing the operation, or starting over (paying extremely close attention).

---

It's been ten years since Windows 95 has been released. Time for a speedy and responsive Windows Explorer! (and this goes for all the filesystem-related common control dialogs as well).

- Thanks Mark
Chris

9/13/2005 6:38:00 AM by Chris Russell
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Annoymous: "...The worst part is that if I press Ctrl+Alt+Del and try to open Task Manager, it doesn't work because starting the process involves adding a button to the taskbar for the new window. Since the taskbar is hung, this simply doesn't work..."

You can also get to Task Manager by pressing [CTRL]+[SHIFT]+[ESC]ape - 99% of the time this works. In newer versions of Windows to get the taskbar back again if it is missing fire up Taskman via [CTRL]+[SHIFT]+[ESC] and then select File, New Task (Run), type in "explorer" [ENTER].

9/13/2005 11:57:00 AM by Richard L. James
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Processor Exploer helped me solve a process problem I was having. If it hadn't I would have needed to configure a new computer today.

We have a studio for recording audio. A few months ago we bought a Dell Dimension 8400 to use as the primary audio production machine. We have had continual problems with it. At irregular intervals it begins introducing pops and clicks into the audio files. Not acceptable.

There are a few of us who could troubleshoot it but they were all working on client projects and so fixing the Dell fell to me.

We had called Dell to get some support but their idea was to selectively turn off services and see what the problem was. I basically started out doing that on my own to see what I could find out.

After a bit of troubleshooting, it became obvious that when the audio was distorted, the CPU utilization would be operating at 50-60%. This is a 3.2 GHz machine with 2 Gigs of Ram and Sata hard drives. It would be recording fine at 5-6% and then the system utilization would greatly increase. I tried two audio programs and couldn't find a consistant pattern for the CPU utilization.

Then I remembered a Mark's article which I had read last week.

I downloaded Process Explorer and finally found that the CPU was being used by Deferrred Procedure Calls.

A bit more googling and I found a forum discussion on the Sysinternal site.

It appears that the Dell Dimension 8400 with a GeFroce 6800 graphics card can't work together. Since I need the computer right away, I went out and bought an ATI based card and what do you know, no more high utilization.

Now I just have to see what Dell is going to do about it.

9/14/2005 4:56:00 AM by Peter Hoven
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Nice article. Had the same problem once. Now I know where to look.

Why Oh Who isn´t it possible to modify the network timeout value in these cases? It would help to get rid of the simptoms.

9/18/2005 5:11:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

The same problem is with Shell Extensions.

I had installed PGP. It added an entry to a context menu for folders with option to encrypt or decrypt the folder. And it registered a service, PGPServ.exe. When I was tuning my system, I turned off some of services I didn't use. Because I hardly ever used PGP, I simply changed the PGP service to run manually instead of automatically. After some time I realized, that when I clicked with RMB on a folder, explorer hanged (it got up after some timeout, but long enough for me to restart the process). Explorer tried to show the context menu but it couldn't, because it needed some information from the service that wasn't running. I consider it as a PGP bug but anyway, explorer would behave better if it ran the context menu in a separate thread.

9/19/2005 7:41:00 AM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

By the way, I tried your Autoruns to remove registry keys responsible for context menus of PGP (version 8). It found two keys (Autoruns -> Explorer [with the option to hide Microsoft signed entries]), so I removed them, but the context menu was still there. I found many more registry keys with PGP entries responsible for shell extensions (and the context menu). I'm not a registry expert and I didn't want to leave registry incoherent, so I reinstalled PGP.

9/19/2005 5:39:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Mark, thanks for providing the inspiration to tackle one of my own Windows annoyances (see http://www.codeproject.com/system/NoDeleteDelay.asp). Your writing (both code and words) continues to be an invaluable resource for those of us who like to tinker under Windows' hood.

Take care,
Dan Farino

9/29/2005 10:41:00 PM by Dan Farino
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I have just installed Windows XP SP2 and it has taken-out my C: drive icon.

No other problems..........so far

Can anyone offer advise as to how I may get the C: drive icon to return to normal?

10/4/2005 6:39:00 AM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Excellent troubleshooting! I enjoyed reading that, and thanks to your tools I understand how to approach a similar issue if I encounter it down the road. Thanks. But speaking of the IE hang, this is the very reason I found your site as I googled on a similar problem I too am having. For some oddball reason, in the last few weeks my IE hangs when I click on ordinary links. Next time it happens though, I know what actiona to take thanks to your post.

10/4/2005 1:58:00 PM by Jim
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I'm going to quote a previous poster because it's something I've thought so many times myself:

"Explorer should leverage multiple execution threads: one for updating the on-screen UI, and however many threads are necessary to query DVDs, network shares, etc. The on-screen display should always display valid and timely status information. IT SHOULD NEVER SIMPLY HANG, REFUSE TO REPAINT ITSELF, TIMEOUT, KILL THE RESPONSIVENESS OF THE START MENU ETC."

It's just so frustrating! Explorer.exe is 10 years old, why is it still such an immature product?

Question: Is there a decent replacement for explorer.exe which is virtually the same but multithreaded?

10/6/2005 1:37:00 AM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Great article Mark.

On Windows 98SE (with IE6 SP1 installed), there is an Explorer "hang bug" when deleting either a really large file or many small files (100 or more).
This "hang" has also been traced back to the Browseui.dll installed by IE6 SP1.

The only known fix for this hang bug, is to replace IE6 SP1's BROWSELC.DLL & BROWSEUI.DLL (in the System folder) with IE5.5 SP2's versions.
To keep IE6 SP1 fully functional, you can place it's versions of BROWSELC.DLL & BROWSEUI.DLL in the Internet Explorer folder... IE6 SP1 will use those and Explorer.exe will use IE5.5 SP2's from the System folder.

What a pain this whole procedure is though.

Any ideas on another way to implement this fix, Mark?

Any help would be greatly appreciated. :)

10/6/2005 1:35:00 PM by SCoooBY
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

High CPU load (explorer.exe) when you right-click on a file, but no high CPU load if you left-click before on this file?

Until now I found no solution for me.

Jens

10/11/2005 7:33:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I received the uninstall link from Sony. It claims to have removed the rootkit. It did leave MediaJam on my computer. I am unsatisfied with the removal and will reformat my computer.

I will never purchase another Sony product. If they can not be trusted with a simple cd I can't imagine trusting them for anything else.

11/7/2005 3:47:00 PM by Diane S
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Hey Guys,
if ur context menu is hanging after u right-clicked, u shoult try ShellExView (http://www.nirsoft.net/utils/shexview.html) sort for "Type" and look for "Context Menu". Disabling some entries might help.

Does anyone know how to change the above described network timeout?

11/13/2005 7:21:00 AM by DietrichBubenheim
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Yes, I have seen explorer hang also and to solve this problem I simply run the Windows Tuning Utility (click Start, 'Shutdown', and then choose 'Restart' froom the drop-down). After that the system ran well for sometime.

12/1/2005 6:39:00 AM by scotty
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

You mean Explorer isn't malware?

12/16/2005 1:24:00 PM by Andrew
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

It would be really useful to have a utility that displays the timeouts and their paths.

BTW if MS-Word takes forever to open a file it can be because it's waiting to open a template on a nonexistent network path. Fortunately this can be changed in the file's settings.

2/26/2006 11:25:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

just had this problem creep in a few weeks ago.. been driving me crazy -- right click any file and it'd instantly hand.

grabbed the shell app -- and narrowed it down to divx's encoder program - which i never use (buggy as heck) and forgot about.

disabled it, and the problems gone.

thanks folks.

3/29/2006 10:06:00 AM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

"Explorer is, even today, sadly largely single-threaded" (Mark)

"Do you know if the windows explorer in Vista will be more multi-threaded?" (Troy Philips)


Windows Vista's Explorer is going to continue to be single-threaded. Microsoft has bigger fish to fry:

http://cubicspot.blogspot.com/2006/04/windows-vista-delayed-to-2007-and.html

http://cubicspot.blogspot.com/2006/03/security-is-simple.html

4/19/2006 11:16:00 AM by Thomas Hruska
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

To the person talking about alternate shells...

Explorer can indeed be replaced, it is well documented on the Microsoft site, and if you prefer black box or whatever, you'll find many replacement shells if you do a search for "windows shell" in google.

The shell is specified in a well documented registry entry, just as on Linux it is specified in a well known script file. It isn't some great unknown mystery, Microsoft even documents how to cooperate with installers, etc. and many of the shells are very viable.

5/12/2006 5:25:00 PM by Dave Bacher
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

What a Godsend!

I had been stuck for three days on a machine that would not run explorer.exe (which meant no desktop and no start bar). I downloaded filemon, debugview and regmon, intending to debug like you did here. regmon found the culprit. It was "Image File Execution Options\explorer.exe\debugger" in the registry. I would never have known that otherwise. THANK YOU SO MUCH for these great tools!!

6/16/2006 11:39:00 AM by Tom
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Make sure you don't have any unreachable entries in you PATH in the Environment Variables. fx a pointer to a domain controller, which is not available when you're not connected to a corporate network

6/29/2006 5:15:00 AM by Flemming Jul
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Hehe ... I had exactly the same problem around the same time last year after uninstalling PSP and found the exact same problem.

However, I couldn't have done it without the tools you made - Filemon and Regmon :)

6/30/2006 5:33:00 PM by Velouria
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Dear all,
I had the same problem and I wish to get some answer here. Reinstall my os is the only way I haven't try.

When I open "my document" it takes unusualy long for explorer to open it. Then I follow the same procedures using process explorer, filemon and regmon.Mine is a little different where there are hundreds of list like this:
explorer.exe:760 IRP_MJ_CREATE C:\Documents and Settings\bl408\My Documents\My Pictures\:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA NOT FOUND

May I know what should I do in next to get my windows explorer back to normal? I wonder if the explorer is trying to locate those files which cannot be found and take up so many time for doing that.

Thank you
Simon

7/4/2006 1:25:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

This is a terrifically helpful article!

My problem turns out to have a different cause, but similar symptom and I follwed Mark's instructions for diagnosis.

My Explorer isn't exactly "hang", but rather consumes 100% CPU for a long time (a few minutes) whenever I try to expand a folder on the left-hand-side pane of tree view.

Using Mark Russinovich's ProcessExplorer, the stack trace is:

ntkrnlpa.exe!KiDispatchInterrupt+0x7f
zipfldr.dll+0x100e6
zipfldr.dll+0x1029f
zipfldr.dll+0xaaab
zipfldr.dll+0x7c0e
zipfldr.dll+0x8117
SHELL32.dll!SHGetFileInfoW+0x3e38
SHDOCVW.dll+0xcf0c5
SHDOCVW.dll!Ordinal211+0xf1ad
SHDOCVW.dll!Ordinal211+0x14abc
SHDOCVW.dll!Ordinal211+0x157fd
SHDOCVW.dll!Ordinal211+0x1671f
comctl32.dll!RemoveWindowSubclass+0x17e
comctl32.dll!DefSubclassProc+0xa9
USER32.dll!GetDC+0x6d
USER32.dll!GetDC+0x14f
USER32.dll!GetWindowLongW+0x127
USER32.dll!DispatchMessageW+0xf
BROWSEUI.dll!DllCanUnloadNow+0x13554
BROWSEUI.dll!Ordinal138+0x7a2a
BROWSEUI.dll!Ordinal138+0x7b9d
kernel32.dll!GetModuleFileNameA+0x1b4


I gathered that it means the Explorer is trying to display a ZIP file as a folder node in the left-hand-side tree pane, and in doing so, it needs to somehow unzip or at least inspect the file first. Well, that zip file is 100's of MB large and contains tens of thousands of subfolders and files. No wonder CPU is at 100% for a long time.

Then, using ShellExView (http://www.nirsoft.net/utils/shexview.html) suggested by DietrichBubenheim, I tracked down the culprit for calling C:\WINDOWS\System32\zipfldr.dll. It is the "CompressedFolder" shell extention from MicroSoft for handling "Shell Folder".

Disabling that Shell Extension did the trick. Now, my ZIP files are no longer displayed as an expandable folder (i.e., no longer with a little plus (+) sign next to the folder icon) any more in Explorer's tree view. But that suits me fine. And the annonying 100%-CPU-for-minutes problem disappeared.

Thanks you all for these wonderful tools.

7/12/2006 3:28:00 PM by Vincent Yin
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

This is a terrifically helpful article!

My problem turns out to have a different cause, but similar symptom and I follwed Mark's instructions for diagnosis.

My Explorer isn't exactly "hang", but rather consumes 100% CPU for a long time (a few minutes) whenever I try to expand a folder on the left-hand-side pane of tree view.

Using Mark Russinovich's ProcessExplorer, the stack trace is:

ntkrnlpa.exe!KiDispatchInterrupt+0x7f
zipfldr.dll+0x100e6
zipfldr.dll+0x1029f
zipfldr.dll+0xaaab
zipfldr.dll+0x7c0e
zipfldr.dll+0x8117
SHELL32.dll!SHGetFileInfoW+0x3e38
SHDOCVW.dll+0xcf0c5
SHDOCVW.dll!Ordinal211+0xf1ad
SHDOCVW.dll!Ordinal211+0x14abc
SHDOCVW.dll!Ordinal211+0x157fd
SHDOCVW.dll!Ordinal211+0x1671f
comctl32.dll!RemoveWindowSubclass+0x17e
comctl32.dll!DefSubclassProc+0xa9
USER32.dll!GetDC+0x6d
USER32.dll!GetDC+0x14f
USER32.dll!GetWindowLongW+0x127
USER32.dll!DispatchMessageW+0xf
BROWSEUI.dll!DllCanUnloadNow+0x13554
BROWSEUI.dll!Ordinal138+0x7a2a
BROWSEUI.dll!Ordinal138+0x7b9d
kernel32.dll!GetModuleFileNameA+0x1b4


I gathered that it means the Explorer is trying to display a ZIP file as a folder node in the left-hand-side tree pane, and in doing so, it needs to somehow unzip or at least inspect the file first. Well, that zip file is 100's of MB large and contains tens of thousands of subfolders and files. No wonder CPU is at 100% for a long time.

Then, using ShellExView (http://www.nirsoft.net/utils/shexview.html) suggested by DietrichBubenheim, I tracked down the culprit for calling C:\WINDOWS\System32\zipfldr.dll. It is the "CompressedFolder" shell extention from MicroSoft for handling "Shell Folder".

Disabling that Shell Extension did the trick. Now, my ZIP files are no longer displayed as an expandable folder (i.e., no longer with a little plus (+) sign next to the folder icon) any more in Explorer's tree view. But that suits me fine. And the annonying 100%-CPU-for-minutes problem disappeared.

Thanks you all for these wonderful tools.

7/12/2006 3:32:00 PM by Vincent Yin
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Great Info! My computer was slow while starting, taking up 100% of system resources between explorer, msnmsgr, and svchost for 10-15 minutes. Found out there was numerous entries of F-Prot. Once that realtime protection was uninstalled, everything worked fine.

7/19/2006 4:26:00 PM by funkypc
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Vincent: thanks for posting your solution....I was just faced with the same problem and was able to solve it with ShellExView!

7/20/2006 12:11:00 AM by Eric
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I had a similar issue with explorer and was able to resolve it using FileMon after reading your article. Thanks.

8/1/2006 1:43:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

I had a similar problem with the favorites of Windows/Internet explorer. I had bookmarked several network locations with UNC paths (\\server\share\...) and some of them were very slow or unaccessible. Windows Explorer was getting painfully slow to use on this PC and I had no idea why. Even browsing local folders was slow, for example sometimes I had to wait 1-2 seconds to just open a folder with 2-3 files in it. Deleting the favorites solved it.

8/21/2006 5:48:00 AM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

So - since then I've been running a full search of the registy for "\\" (without the quotes!) every six months or so, or if explorer is acting up.





Holy craip! That worked like a charm... if I run offline from the domain and try to open php files for editing, explorer hangs.

... not anymore!

Right on!

8/27/2006 5:13:00 PM by Anonymous
# re: The Case of the Intermittent (and Annoying) Explorer Hangs

Great tools! THANX! %)

all theese topics do not helps me - in my 2003 problem with second-level context menues...
open with > (must be next menu)
but hungs about 1 min...

most context handlers is disabled, but...

9/24/2006 11:40:00 AM by Anonymous
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • <p>PingBack from <a rel="nofollow" target="_new" href="http://dertompson.com/index.php/2007/07/11/problem-of-periodical-windows-explorer-hangs/">http://dertompson.com/index.php/2007/07/11/problem-of-periodical-windows-explorer-hangs/</a></p>

  • <p>I don't normally put my 10 cents worth into blogs... cuz I'm too busy programming, but I have a piece of insider knowledge from some of the code I have been working on, and lets face it Mark Russinovich is one of the top programmers I have ever come across. &nbsp;I have been building a 'Windows Explorer' style file browser - initially it was a dialog box for some of my other projects, and at some point of mental instability I decided to make it a fully fledged version (alot faster and cooler gui and... well I don't want to yank my own chain here) segway back into my observation - I have noticed the lack of threads used to render the shellfolder icons in windows explorer, this behavior can be observed or reproduced by opening a large directory in the list pane (ie 'C:\Windows\system32 or C:\Windows\i386) and then violently scrolling down to the bottom or scrolling around. &nbsp;You will notice that the display will seize up momentarily as it tries to fill in the icons (this blocking is caused because it is on the main thread). &nbsp;You should be aware that the listview is using callbacks to get its display data. I solved this problem by filling in the text data on the main thread and launching many threads in the callback proc to deal with the icons. &nbsp;And voila the listview scrolls like a banshee no delays, way less clunky, way faster! The little icons filling themselves in in their own time (quite quickly with 8 threads nibbling at them) now all was fine and dandy until I realized that my prog was crashing quite often after I did this, and after some analysis I found that it was usually .msc files causing the crash (something to do with 16bit old crap), it was quite intermittent but was the cause. &nbsp;I then tried to remedy this and found that if I put a mutex in SHGetFileInfo and the Ishellfolder GetIconOf functions that this problem went away. &nbsp;This slowed down the rendering of the icons significantly because the mutex only lets the function occur in a serial manner (and this is the main an slowest function while retrieving icons) instead of happening in a threaded, overlapped manner. &nbsp;So I have a hypotheses that MS in their ultimate wisdom never even bothered to thread these functions because they are not thread safe. &nbsp; However they can be successfully threaded with the appropriate mutexes - which is still much faster and better. &nbsp;BTW if you are interested windows explorer is filled with bugs, mem leaks, inconsistent behaviors, you can make it crash left right and center just by doing certain things - not just from malformed third party shell extensions. &nbsp;A pretty poor production for the most important flagship product for the entire windows product line! Maybe windows should spend their time making what they have better and more efficient, and yes! debugging their bugs. Nah... why pull out the floorboards because their rotten when you can just nail some boards onto the side of the sh*t mansion on an angle and then paint them cool colors to make them look like they are OK.</p>

  • <p>Thanks, I learned a lot here from the blogger and all the responses. I found another case -- do you know when you click the START button it displays icons for frequent or recently used applications? One of those had a UNC path in it. &nbsp;arrgh! &nbsp;I like the idea of scanning the registry for &quot;\\&quot;, it seems to be a simple solution if you know what you are doing.</p>