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

10

4

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...

deepc

Posted 2010-12-13T23:50:43.160

Reputation: 633

Actually I had exactly such a problem in Win7/64bit in the fall of 2010, and it was resolved some time in early 2011. Bug in windows in the thumbnail generation. – Warren P – 2013-01-02T21:33:16.767

Thanks, Warren. That would explain why I did not see it anymore. – deepc – 2013-01-04T12:59:58.210

It started working after I right clicked on Notepad++ and clicked "Edit with Notepad++". I don't know if that's an end-all solution, but it worked for me! ymmv – CodyBugstein – 2014-05-12T10:32:21.703

Answers

0

I asked about this problem in 2010 - just tried it again and it works now. I don't have the faintest why. Maybe some Windows update solved it. Or I uninstalled something during the last 12+ months...

This is not really answering the question but I am not sure how to deal with it now that the problem is gone. I suppose it would not be correct to keep it unanswered.

deepc

Posted 2010-12-13T23:50:43.160

Reputation: 633

I have this problem too, and one of the answers on this post is actually a solution: http://superuser.com/questions/221720/why-does-notepad-crash-on-desktop-files-in-the-save-as-dialog/709142#709142

– payo – 2014-05-08T19:19:38.313

6

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.

dabbl0r

Posted 2010-12-13T23:50:43.160

Reputation: 61

3The stupid program peeks into "Favorites", and if they are disabled, it goes boom! Microsoft botched it up again... – dabbl0r – 2013-01-31T20:41:51.477

2Coincidentally, I had removed libraries and the other not so useful stuff from explorer as well. Maybe not with that procedure but probably in a similar way (I don't remember). Two things should be noted though: 1. It currently works even though this stuff is still hidden. 2. This is not about notepad, the problem existed in every application using the standard file dialogs. – deepc – 2013-02-17T00:30:21.840

'Added' Favorites back into the registry and things are working again

– Umber Ferrule – 2013-11-13T11:08:29.833

3

Sounds to me like the previous save-as path (or a network drive) are the hold-up. It wants to render the path it's at and can't because an entry probably either offline or unavailable.

I wish i remembered where notepad stored it's last save path, but the location escapes me. I would try either waiting it out or looking online for the last save location and change it. See if that resolves the issue.

EDIT

Looking in to the COMCTL32.dll it appears it may be loading a thumbnail from a file in the select file dialog that is crashing. Anything in your My Documents (or where ever you've previously saved to) folder that thumbnail generation would bomb out on? You may have the folder size small in normal file explorer (wouldn't generate a thumb) then larger int he save-as dialog which would invoke it. (I can't image it's using the TaskDialog or Drag and Drop abilities)

Brad Christie

Posted 2010-12-13T23:50:43.160

Reputation: 226

Thanks but this is about something else. I removed every icon including the recycle bin from the desktop. Problem occurs again with "new text document". Then I moved the file to a folder on the temp drive. Worked there. That also rules out the previous save-path. Note that the problem occurs for wordpad and emeditor, too. It is not specific to notepad. – deepc – 2010-12-23T21:28:27.630

That makes me more inclined to believe it's something explorer related not application (something regarding either the "SaveFileDialog", "OpenFileDialog", or the way explorer renders the destination path itself). – Brad Christie – 2010-12-24T04:29:48.657

definitely. I just used notepad as a simple example. By the way, the problem remains. I have learned to live with the "handicap" (had to learn). – deepc – 2011-02-26T21:07:22.027

2

I had a similar problem. I also happen to have Notepad++ installed (although I never really converted over to it and still use plain vanilla Notepad) and what I did was I opened the file in Notepad++ then tried the Save As and it worked fine. I was then able to manipulate the file with Notepad. Not sure what caused the problem in the first place though

Ken

Posted 2010-12-13T23:50:43.160

Reputation: 21

I did not try with Notepad but with a bunch of other programs. The problem is related to the open/save standard dialogs which are common to all programs. – deepc – 2012-03-19T00:05:28.377

2

I have been having this problem for over a year. I attempted the solution specified above to modify Explorer>Tools>Folder Options>Navigation pane, but it did not work. So I went through every tab in the Folder Options dialog (General, View, and Search tabs) and reset everything using the Reset Defaults on every tab. It works now.

As a consequence though, my Windows Explorer default view is different. I can no longer access the Folder Options dialog from Windows Explorer, but I can still find it in Control Panel.

Thanks,

Dan

Posted 2010-12-13T23:50:43.160

Reputation: 21

1

The problem exists in a dll shared by multiple programs (comctl32.dll) which is the common dialog control, used to display the usual "FileOpen" and "FileSave" dialogs which ressembles an Explorer window browsing a folder. If there is a shortcut to an offline network location it may freeze applications, including Explorer itself. If there is some file that causes applications to crash upon browsing a directory then this is another cause. If this is the case, it could be caused by eg. a malformed image/thumbnail, malformed document (.RTF,.DOC,.PPS,.XLS,etc), bad coded codecs that are loaded to render video thumbnails, etc, etc.

Also remember that the "Desktop" is a special system folder, which has a registered CLSID and a related module (dll) which will be loaded when the directory is browsed. This DLL may have dependencies, either native or third parties. If any of these modules (dlls) contains a bug it can causes applications that loads it to crash.

You should reproduce this in an environment without any third parties softwares installed. If the problem exists then it is a bug in the Operating system itself and Microsoft should be contacted and bug reported. If the bug exists in another software, then the responsible module (DLL) should be identified and bug reported to the vendor.

helper

Posted 2010-12-13T23:50:43.160

Reputation: 11

All true - please note that the problem did not occur with a new user on the same OS installation. That could of course be related to a number of different factors, e.g. different save-as history. Other than that it is difficult (for me) to exactly pinpoint the culprit. However, I repeated the steps now after over a year and now it works just fine. Case closed with unknown self-healing solution I guess. – deepc – 2012-03-19T00:12:47.433

1

Do the following:

  1. Go to File Explorer, open Tools → Folder Options then check "Show All Folders".

  2. Open Notepad → Save as → Dialogue box appears with no crash! Save file in a location/folder that isn't normally hidden (e.g. My documents)

  3. Once complete, go back to File Explorer, Tools → Folder Options and hide folders.

If Notepad still crashes, you probably saved the file to a hidden location in step 2.

user294694

Posted 2010-12-13T23:50:43.160

Reputation: 11

0

Restarting explorer.exe worked for me.

1) Go to Task Manager

2) Kill explorer.exe

[steps only needed if explorer.exe doesn't auto relaunch]

3) Windows Key + R to open run dialog

4) Run explorer.exe

Kelvin Wang

Posted 2010-12-13T23:50:43.160

Reputation: 1

0

Found the solution !

In Windows Explorer goto EXTRAS - FOLDER OPTIONS - make sure that SHOW ALL FOLDERS is checked. Then everything works fine again. When unchecked the problem comes again. Why don´t know.

rolfrio

Posted 2010-12-13T23:50:43.160

Reputation: 1

0

This worked for me:

  1. Open Windows Explorer
  2. Go to Desktop
  3. Right-click on desktop and select New -> Text Document
  4. Enter any name for it
  5. Open it so that Notepad opens up (if another file is associated to the .txt extension, then Right-click and select Open With -> Notepad
  6. Type anything
  7. Save the file

Now try again opening Notepad and saving anything.

Percy Vega

Posted 2010-12-13T23:50:43.160

Reputation: 101