PDA

View Full Version : Installing add-on 1.1.7 causes VS2008 to crash on startup



danielweberdlc
3rd December 2010, 22:25
New machine with a fresh VS2008 installation. After i install 1.1.7 I get an error about a serious error has occured and the IDE needs to close. Note that if I ignore the error i can still use the IDE (the error is not actually breaking anything that I can see).

When I start the IDE with the /log command I see this error:

<entry>
<record>9</record>
<time>2010/12/03 18:30:20.387</time>
<type>Information</type>
<source>Microsoft Visual Studio</source>
<description>Loading UI library</description>
<guid>{DA9FB551-C724-11D0-AE1F-00A0C90FFFC3}</guid>
<path>C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\*\msenvui.dll</path>
</entry>
<entry>
<record>10</record>
<time>2010/12/03 18:30:20.404</time>
<type>Error</type>
<source>Microsoft Visual Studio</source>
<description>Error checking App Path</description>
<hr>80070005 - E_ACCESSDENIED</hr>
</entry>
<entry>
<record>11</record>
<time>2010/12/03 18:30:20.421</time>
<type>Information</type>
<source>Microsoft Visual Studio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{53544C4D-E3F8-4AA0-8195-8A8D16019423}</guid>
</entry>

If i start VS as an administrator the program runs fine. however, I've never had to run as administrator before.

This is on Windows 7.

I've tried installing all the latest patches to VS that I could find. I've reinstalled VS2008. I made sure that MSDN was installed (it wasn't orginally). I made sure there were Qt installations available.

I really feel that this is some kind of protections (UAC?) issue on this new machine, but I haven't been able to figure out what that might be.

Any suggestions?

Timoteo
3rd December 2010, 22:42
Are you certain that you installed SP1 for Visual Studio 2008?

danielweberdlc
3rd December 2010, 23:05
I downloaded and installed VS90sp1-KB945140-ENU from the MSDN site. I can post the output of the installed products listing, if you're interested - it's quite lengthy, though.

I compared a previous (working) installations with what I have. The working version has kb948484 (which doesn't appear anymore on the MS site) and the new one has all the patches in the old one plus kb971091, kb973674 and kb972221, which seem to be related to some security stuff in the ATL code).

The working compiler has a version of 91605-130-1617625-60231.
The new one is 91605-130-1617625-60386.

The system reports .NET 3.5 SP1.
Visual studio reports version 9.0.30729.1 SP

danielweberdlc
7th December 2010, 00:05
I've run process monitor during the crash and it looks like I'm getting ACCESS_DENIED when the add-on tries to open Qt4VSAddin.AddIn for write.

Not sure why this access is failing (or why you would write to this file, for that matter).

I do know it works if you start VS with administrator privileges, something I haven't had to do in the past.

danielweberdlc
7th December 2010, 20:36
I installed another add on (copyAsHtml) in a local folder and it crashed (just itself, luckily) on startup with a security exception attempting to access .NET config files. Again, running as administrator cured the problem.

I can't find anywhere where running as administrator is required for VS2008 (nor can I find on any other machine here that this is the case). I hazily remember something about modifying the UAC for VS, but can't seem to find any link to it now.

I'm about to just give up and run as admin, even though I feel like this shouldn't be required.

Added after 1 18 minutes:

I've discovered how to fix the problem, though I'm not sure why. What i found is that I did not have write access to the .NET 2.0 machine.config file located at C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONF IG. I added my user to the securities group for this file and now all add-ons are loading properly.

I checked my old machine and my user was already added to that file. I'm not sure how/when/why that happens or which installer should be doing this.

I will say that another add-on properly caught the connect exception (which is how I found it). It seems there should be some additional exception handling in the add-on.

I'll leave it to wiser minds than mine to figure out if this is the correct solution...