[xplorer˛] — Divide and conquer
home » blog » 19 July 2009
 

Most of the programs you install of any decent complexity will expand the windows shell in some way. Programs may add commands in the shell context menu (which appears when you select some items in xplorer˛ then right-click on them), add a preview handler to generate thumbnails for the documents managed by the application, insert a custom page to property sheets of files showing e.g. ID3 tags (property sheet handler), add extra columns for the detailed shell view (column handler) etc.

Most of the times these shell extensions are a great advantage for the desktop user. New file types may be added and behave like the native file types. The down side of this open architecture is that any Jack, Joe and Mary can write their own shell extension without completing their high school elementary computer programming course; instead of improving the user experience they just increase the frustration causing system crashes, because they are badly written. Innocent bystanders like xplorer˛, that integrate all extension DLLs, end up paying the price as we have seen in an earlier article.

A particularly nagging kind of shell extension is one written in an old version of Delphi programming language (there are quite a few of them) that cause xplorer˛ to crash on exit with or without funny messages. Sometimes the culprit DLL can be identified by the crash location address. At other times the crash comes really late and not even the advanced crash minidump information can pinpoint the culprit — and we don't know which shell extension to uninstall or disable to fix the problem.

Nirsoft publish a free tool called ShellExView that can help in these situations. This tool can list all the registered shell extensions on your system and allows you to disable some of them. As you can see from the picture on the right, there are quite a few of them active on your system. All we need to do is to locate the bad extension and disable it, but how?

A naive approach would be to take each extension in turn, disable it, check if the xplorer˛ crash problem goes away, then repeat until you find the responsible DLL. But that will take too much time and effort. We need a little help from ancient greece.

Divide and conquer began as a method for strategic and political control but the principle comes handy for search problems like ours. The idea is to split the list of shell extensions in two equal parts, disable all extensions in the first group and check the results: if the crash problem goes away then the problematic DLL is in group A (since we have disabled it). If the crash is still there then the problem is somewhere in group B. Either way, with a single stability test we have eliminated half of the shell extensions.

Preparing for the next stage, first we reenable all shell extensions in group A. Then we take the latest suspect group (either A or B), split it in half (divide) and repeat the procedure (conquer). This strategy shines in large lists. If we have 1000 items to check we only need 10 tests. It is the same kind of trick that cost the poor chinese emperor his kingdom.

So using the nirsoft tool to disable shell extensions en masse, we can quickly home in on the rogue shell extension and disable it permanently (or uninstall it), reclaiming our system's stability. To make our life easier, we can sort the shell extension list by Company then concentrate on those shell extensions published by 3rd parties — it is unlikely that default extensions supplied by microsoft will cause crashes!

Post a comment on this topic

 

 

What would you like to do next?

Reclaim control of your files!
  • browse
  • preview
  • manage
  • locate
  • organize
Download xplorer2 free trial
"This powerhouse file manager beats the pants off Microsoft's built-in utility..."

download.com
© 2002—2009 Nikos Bozinis, all rights reserved