Search

There was a problem sending the command to the program. by Shrinker

Closed
as Deferred Help for as Deferred

3
0
Sign in
to vote
Type: Bug
ID: 601871
Opened: 9/19/2010 2:32:04 PM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
I am using VS as my default text editor. Text files are syntax-highlighted with C#.
Every now and then when I open a text file (spawning a new first instance of VS), an error message pops up in Windows Explorer (a modal message dialog), and VS does not load the file but starts in its default configuration (I configured it to do nothing, not even show the start page).
Details (expand)

Visual Studio/Silverlight/Tooling version

Visual Studio 2010

What category (if any) best represents this feedback?

Reliability

Steps to reproduce

I found no criteria to reproduce it reliably, but it happens often enough for me when working with different text files. VS 2010 needs more time for startup, so this could be a timeout or something.

Product Language

English

Operating System

Windows 7

Operating System Language

English (US)

Actual results

Every now and then (about a quarter of all times, I think), an error message dialog pops up in Windows Explorer, and the text file is not loaded in VS.

Expected results

The text file should always be loaded in VS, not causing the error message dialog to pop up in Windows Explorer.
File Attachments
File Name Submitted By Submitted On File Size  
therewasaproblem2.jpg 9/19/2010 69 KB
therewasaproblem.jpg 9/19/2010 240 KB
Sign in to post a comment.
Posted by Gigaplex on 1/6/2011 at 2:42 AM
I am also seeing this with Visual Studio 2010 on Windows 7 Ultimate x64. UAC is enabled, VS is launched as regular user.
Posted by Tad Marshall on 11/15/2010 at 7:15 PM
This is copied from a post I just made to social.msdn.com, which may be relevant.

Copied from http://social.msdn.microsoft.com/Forums/en/setupprerelease/thread/2377974e-522b-49f8-bf41-cca895a61cce :

This is an odd one. I have Visual Studio (s) 2003, 2005 and 2008 installed on Windows 7 Ultimate x64, and they all behave or misbehave slightly differently.

BUT (!) I have a reproducible way to repair (and break again) the (bad) behavior with VS 2008 on my machine, so I'll call it good for now.

I have UAC turned off and I'm logged into an account with Administrator privileges and both Explorer and VS 2008 run at High (elevated) Integrity according to Process Explorer (and VS 2008 shows "(Administrator)" in the caption bar). VS 2008 is a trial version installed two days ago and patched with SP1 and Windows Update, and I'm current on Windows Update.

On *my* machine (likely different from your machine), I had "garbage" values in an Explorer subkey named DDECache. Comparing the values there with the ones for VS 2003 and 2005, I tried copying the values from those keys (which were the same) into the VS 2008 key. Lo and behold, that fixed it ... I could then double click on a .c or .h file and it would open in VS 2008, regardless of whether or not VS 2008 was already open (see additional details below).

Based on the "garbage" I had seen in the key earlier, I took a guess for how to "break" it again, and I was right. Here's how to break it (which is doubtless how I broke it before). Open a single instance of VS 2008. Click on Tools\Options to bring up the Options dialog. With the dialog open, switch to an Explorer window and double-click on a supported file type like .c or .h . Note that you get a *second* instance of VS 2008, which correctly opens your file (if this was working before this exercise). Close both VS 2008 instances, and double-click your file again. On my machine, I get a beep and an error dialog -- "There was a problem sending the command to the program." VS 2008 is now open, but didn't load the file. Leaving VS 2008 running and dismissing the dialog, I can then double-click on the same file and it will work this time. So, it works if VS 2008 is already running, but not if it isn't. Looking at the registry key, it is now clobbered (again).

The good values for the registry are:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\DDECache]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\DDECache\VisualStudio.9.0]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\DDECache\VisualStudio.9.0\system]
"ProcessName"="devenv.exe"
"WindowName"="DDEHandler"
"WindowClassName"="DDEHandler"

The "clobbered" values that I produce using the steps above are:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\DDECache\VisualStudio.9.0]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\DDECache\VisualStudio.9.0\system]
"ProcessName"="devenv.exe"
"WindowName"="Microsoft Visual Studio (Administrator)"
"WindowClassName"="wndclass_desked_gsk"


This is apparently a funky enough problem that *my* fix might not have anything to do with *your* problem, but this is what I'm seeing on my machine. I don't know whether it is 64-bit Windows Explorer on Windows 7 or Visual Studio Professional 2008 that is misbehaving, or perhaps both, but perhaps the folks on the shell team could work with the folks on the VS IDE team and decide what should be fixed to make this problem go away.

As additional evidence that either party could be at fault, I see similar WindowName and WindowClassName registry values for WinWord, and its WindowClassName is "OpusApp" (sounds good) but its WindowName is some .doc file I last opened two months ago. This shell launching stuff is complicated, to say the least.
Posted by Microsoft on 9/19/2010 at 5:03 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.