Windows – Why does notepad crash on desktop files in the save-as dialog

crashdesktopnotepadwindows 7

Here's a puzzling problem – maybe somebody has an idea. Right now I am out of ideas.

On Win7 64bit, the following crashes Notepad:

  1. On Desktop, right click, select "New | Text Document". This creates "New Text Document.txt".
  2. Right click on that file, select "Edit". This opens notepad with the empty file.
  3. Select "File | Save as": Notepad crashes and Win7 reports that "Notepad has stopped working".

Now, move the file to c:\temp and repeat steps 2 and 3: no crash this time and the save-as dialog appears normally. I can create similar steps for the "open" dialog.

Things I have tried:

  • Safe mode – does not work, same problem
  • Create a new user and try again logged in as that user – no crash
  • Name file differently, or create elsewhere and then move to desktop – same problem
  • Use Wordpad instead – same problem
  • Review shell extensions with ShellExView – nothing extraordinary here
  • Stare at the event log entries for each of the crashes. Does not enlighten me.
  • At time of crash look at the process explorer stack view. Hangs at a function "TaskDialog".
  • sfc.exe /scannow repaired some files but the problem persists.

This is how the event log entries look like:

Log Name:      Application
Source:        Application Error
Date:          14.12.2010 00:33:48
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Description:
Faulting application name: NOTEPAD.EXE, version: 6.1.7600.16385, time stamp: 0x4a5bc9b3
Faulting module name: COMCTL32.dll, version: 6.10.7600.16661, time stamp: 0x4c6f6e4b
Exception code: 0xc000041d
Fault offset: 0x00000000000db770
Faulting process id: 0x198
Faulting application start time: 0x01cb9b1e140ab92a
Faulting application path: C:\Windows\system32\NOTEPAD.EXE
Faulting module path: C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16661_none_fa62ad231704eab7\COMCTL32.dll

What else should I try, short of dumping my user and starting over with a new profile? Thanks…

Best Answer

I encountered this erroneous behaviour today doing a test installation (W7x64u sp1). I was able to narrow down the culprit, however ymmv, please check for yourself.

In order to tidy the view in Windows Explorer, i.e. hiding Libraries, Favorites, Home Group, Logged In User, I refered to this procedure with the support of SetAcl to do it per command line. So far this seemed to work fine for me.

Now I noticed that in each newly created user account (no matter whether Administrator or not) Notepad crashes when trying to open or save a file. This does not happen in the default Administrator account used for installation. I don't have an explanation for this, but I assume that Notepad's "last file location" points to these Favorites or Library...space that's hidden (yet not removed) by Vishal's procedure.

This tweak has been postponed after all local accounts had been created on the machine. There might be some sort of Registry value to tell Notepad not to look in any M$ botched location, I don't know.