home recent topics recent posts search faq  

Huagati Systems Support Forum



register | lost password   open id sign in with Twitter
Messages in this topic - RSS

Home » Huagati DBML/EDMX Tools Support » Addin Causes IDE To Close

Support forum for Huagati DBML/EDMX Tools
11/17/2008 11:18:44 AM

kfehriba
kfehriba
Posts: 1
I recently upgraded to the Nov. 14 release. Now when I try to open a solution the solution begins to open and then the whole IDE closes. If I uninstall the add in the solution opens correctly.

Any help would be appreciated.

Thanks,
Kent
0 permalink
11/17/2008 9:11:39 PM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 331
Hi Kent,

There are a couple of possible causes of this.

Start with checking the Windows event log (application log) for errors related to the crash.

If the event log shows a ".NET Runtime version 2.0.50727.1434 - Fatal Execution Engine Error (79FEC5F0) (80131506)" error then you have encountered a bug in the CLR that unfortunately affects all add-ins based on .net 3.5 / System.Core ver 3.5.x.

Fortunately, there are a bunch of workarounds that usually resolve this error, so if this is the error you are seeing please try the following workarounds:

1) If your project is a website or webapp project, move the reference to System.Core to the top of the list of referenced assemblies in web.config, e.g.:
<compilation debug="false">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="....

2) Delete the .suo (options file) for the solution.

3) Check for ngen images that can not be loaded, and remove them from the ngen cache:

3a) Run "ngen update" from your framework directory:

C:\Windows\Microsoft.NET\Framework\v2.0.50727>ngen update

3b) If it shows any "failed to load" errors, use "ngen /delete" to remove the ngen image of the assembly or assemblies that gave the error. E.g.:

C:\Windows\Microsoft.NET\Framework\v2.0.50727>ngen update
Microsoft (R) CLR Native Image Generator - Version 2.0.50727.3053
Copyright (c) Microsoft Corporation. All rights reserved.
Failed to load dependency Microsoft.VisualStudio.Tools.Applications.Contract of assembly Microsoft.VisualStudio.Tools.Office.ProgrammingModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a because of the following error: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
All compilation targets are up to date.

C:\Windows\Microsoft.NET\Framework\v2.0.50727>ngen /delete Microsoft.VisualStudio.Tools.Office.ProgrammingModel
Microsoft (R) CLR Native Image Generator - Version 2.0.50727.3053
Copyright (c) Microsoft Corporation. All rights reserved.
Uninstalling assembly Microsoft.VisualStudio.Tools.Office.ProgrammingModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

3c) ...and then run "ngen update" again to ensure that all references are ok.

C:\Windows\Microsoft.NET\Framework\v2.0.50727>ngen update
Microsoft (R) CLR Native Image Generator - Version 2.0.50727.3053
Copyright (c) Microsoft Corporation. All rights reserved.
All compilation targets are up to date.
edited by Kristofer on 11/17/2008
0 permalink
11/17/2008 9:20:34 PM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 331
Part 2:

If you're seeing a different error (e.g. 7A035E00) than the one mentioned in Part 1, you may want to try reinstalling .net 3.5 SP1.

If the workarounds above does not solve it, please attach a debugger to VS to extract more exception details. Do the following, with the add-in installed:

1) Start two instances of Visual Studio 2008.

2) Select Tools/Attach to process in the first instance.

3) Select the other Visual Studio instance (devenv.exe) as the process to attach to and click Attach. (see attachment debugVS01.jpg)

4) Select the Output tab and view Debug output (still in instance #1). (see attachment debugVS02.jpg)

5) Switch to instance #2 and reproduce the crash (i.e. load the project where you get the crash).

6) The debug output in instance #1 should now show a bunch of debug info, hopefully also including some clues as to what caused the crash. Please save/copy the debug output text and post here or send as an email to support@huagati.com

0 permalink
2/18/2009 4:18:34 AM

Studix
Studix
Posts: 4
I'm evaluating version 1.62 and I have a similar visual studio crash as reported here. The crash happens when I open an aspx file in a asp.net mvc web application project.

The error in the event viewer is ".NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A035E00) (80131506)".

When I uninstall the addin the problem disappears.

I already tried workarounds 1, 2 and 3 mentioned in this post.

I also attached the debugger. The debugging session stops immediately when I open the aspx file in the other vs instance. The following messages are at the end of the debug output window

'devenv.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mvc\1.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll'
The program '[3300] devenv.exe: T-SQL' has exited with code 0 (0x0).
The program '[3300] devenv.exe: Managed' has exited with code -2146233082 (0x80131506).

Any help would be appreciated.

Thanks
Marco
0 permalink
2/18/2009 4:37:32 AM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 331
Studix wrote:
I'm evaluating version 1.62 and I have a similar visual studio crash as reported here. The crash happens when I open an aspx file in a asp.net mvc web application project.

The error in the event viewer is ".NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A035E00) (80131506)".

When I uninstall the addin the problem disappears.

I already tried workarounds 1, 2 and 3 mentioned in this post.

I also attached the debugger. The debugging session stops immediately when I open the aspx file in the other vs instance. The following messages are at the end of the debug output window

'devenv.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mvc\1.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll'
The program '[3300] devenv.exe: T-SQL' has exited with code 0 (0x0).
The program '[3300] devenv.exe: Managed' has exited with code -2146233082 (0x80131506).

Any help would be appreciated.

Thanks
Marco


Hi Marco,

Take a look at these two threads and see if any of the workarounds mentioned there helps:
http://stackoverflow.com/questions/134131/asp-net-mvc-ctp5-crashing-ide
http://forums.asp.net/t/1313452.aspx

Best regards,
Kristofer
0 permalink
2/19/2009 2:44:11 AM

Studix
Studix
Posts: 4
Hi Kristoffer
The only workaround that worked for me is to open aspx files with "open with" and then select sourcecode editor. I can work like that temporary.

Does Huagati Systems attend to this issue? We really want to by some licenses for the tools, but the crashing problem prohibit that.

Thanks
Marco
0 permalink
2/19/2009 3:11:40 AM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 331
Studix wrote:
Hi Kristoffer
The only workaround that worked for me is to open aspx files with "open with" and then select sourcecode editor. I can work like that temporary.

Does Huagati Systems attend to this issue? We really want to by some licenses for the tools, but the crashing problem prohibit that.

Thanks
Marco


Hi Marco,

We're actively looking for new workarounds in addition to the ones above. In addition to the workarounds mentioned above, reinstalling .net 3.5 SP1 has also helped in a few cases.

Unfortunately these issues affect all third party tools that use/rely on .net 3.5; Jetbrains' Resharper, Ankh, even Microsoft's own PowerCommands are all (or have been) affected and so far all that exist are the workarounds mentioned above. Jetbrains even went as far as removing the dependencies on .net 3.5 from Resharper while waiting for a hotfix from Microsoft. Unfortunately we have a bit too much .net 3.5 code in this add-in to be able to remove all references to .net 3.5. So far Microsoft have closed all reports on the issue. Unfortunately it is a bit random in nature; it can occur on one machine for one project while the machine next to it will load the same project just fine or the same machine can load another project without any trouble; that makes it trickier to troubleshoot/reproduce.

Can you see if it behaves the same if you a) create a new MVC project and b) if you open the same project on another machine?
0 permalink
2/19/2009 5:44:49 AM

Studix
Studix
Posts: 4
Kristoffer
It behaves differently in different MVC projects and different machines.

This workaround works on my machine:

1. Open solution with a mvc project in it that never crashes if you open a aspx file (if you don't have one, just great a new one)
2. Open an aspx file
3. Open your solution in the same visual studio instance.

Strange, but it works for me.
0 permalink
2/19/2009 7:24:38 AM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 331
Studix wrote:
Kristoffer
It behaves differently in different MVC projects and different machines.

This workaround works on my machine:

1. Open solution with a mvc project in it that never crashes if you open a aspx file (if you don't have one, just great a new one)
2. Open an aspx file
3. Open your solution in the same visual studio instance.

Strange, but it works for me.


Strange at a first glance, but at the same time not that strange - it is affected the load order of the .net framework assemblies.

Can you try installing this update [removed] and see if that helps? (This update does explicit assembly loading of System.Core and some other .net framework 3.5 dlls during VS startup so it may help.)
edited by Kristofer on 8/26/2009
0 permalink
2/20/2009 2:40:19 AM

Studix
Studix
Posts: 4
Hi Kristoffer
I tested your fix, but the problem remains. Some crash as with 1.62.


Marco
0 permalink
2/20/2009 2:50:48 AM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 331
Studix wrote:
I tested your fix, but the problem remains. Some crash as with 1.62.


Hi Marco,

Thanks for testing and sorry to hear it didn't work.

Take a look at this SO thread, the workaround at the end (by Steve Mason) is worth trying:
http://stackoverflow.com/questions/500696/why-does-visual-studio-crash-opening-aspx-with-mvc-rc1#565860

Also, this blog post offers some advice:
http://darrell.mozingo.net/2009/01/28/aspnet-mvc-rc-1-visual-studio-crash/

And this blog post indicates that a CLR fix is in the works:
http://blogs.msdn.com/jnak/archive/2009/02/15/potential-crash-in-vs-when-using-the-mvc-rc-on-windows-azure.aspx ( "We gave a repro to the CLR team and they indicated that the crash is due to a known issue in the CLR that affects more than just this scenario. A patch (from the CLR team) is in the works and I'll post when it becomes available." )

Best regards,
Kristofer

edit: added link to msdn blog entry
edited by Kristofer on 2/22/2009
0 permalink
2/23/2009 3:01:25 AM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 331
I have set up a system where I am able to reproduce this (or a very similar) issue and did some troubleshooting. The outcome is a new add-in that changes the load order of assemblies in VS2008. It solved the VS-crash-problem on my repro system and may or may not solve it on other systems; further testing by affected users is required to confirm this.

The new add-in can be downloaded from http://www.huagati.com/ProjectLoader/download/HuagatiProjectLoader.zip (note: it is a separate download; not included in the DBML/EDMX Tools add-in)

It does not yet have an installer but installation is straightforward; download the file and unzip it into your Visual Studio 2008 add-in directory; typically located at \Users\[username]\Documents\Visual Studio 2008\Addins on Windows Vista, or \Documents And Settings\[username]\My Documents\Visual Studio 2008\Addins on Windows XP. You may need to mark the dll as trusted by clicking the "Unblock" button in the file properties dialog after unzipping.

If you try it out; please report back here if the new add-in solves (or does not solve) the problem for you.

For more details, read here: http://www.huagati.com/ProjectLoader/

.
edited by Kristofer on 2/26/2009
0 permalink
2/26/2009 4:57:24 AM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 331
Microsoft has a patch (MSKB #963676) that fixes CLR bugs that affect VS2008 SP1 stability, i.e. the problem described above.

I have tried it out on my repro machine and after a first round of tests it appears to have the desired effect (i.e. VS is now [a lot more] stable).

See http://blogs.msdn.com/jnak/archive/2009/02/26/fix-available-asp-net-mvc-rc-crash-in-a-windows-azure-cloud-service-project.aspx

.
edited by Kristofer on 2/27/2009
0 permalink
3/10/2009 7:10:15 AM

djmitic
djmitic
Posts: 3
Hi all,

I had the following error on VS2008 SP1, Vista Ultimate x64:
.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (704A5E00) (80131506)

Just wanted to let you know that the above mentioned patch (Windows6.0-KB963676-x64) worked for me.

The tool is just great, keep up the good work.

Thanks
0 permalink
3/12/2009 1:55:26 PM

mkamoski
mkamoski
Posts: 46
All --

I am not sure if this applies or is redundant, (and I do suspect that this is a bug in VS.NET and not in Huagati), but, just in case...
...I have noted that my VS.NET IDE 2008 Standard, fully patched, sometimes crashes at startup for ASP.NET web site projects...
...it starts to load and then it "blinks out" and is gone, no process running in Task Manager, just gone...
...and when that happens, I have found the following workaround works...
...delete the contents of the "bin" in that application (except for the ".refresh" files) and try to open the SLN file again...
...and I have also found that this happens less often if all files were closed in the VS.NET IDE before I closed the Solution and exited the IDE last time it was open...
...so, I now always make it a point to close all files before I exit the VS.NET IDE and I get fewer crashes...
...also note that after I apply my workaround (above) the VS.IDE has sets >Tools, >Options, >ProjectsAndSolutions, >TrackActiveItemInSolutionExplorer=False, even though I always have it set to True... so it changes that because it cannot open the files that were open last time the IDE was closed, for some unknown reason or bug....
...HTH.

-- Mark Kamoski
edited by mkamoski on 3/12/2009
0 permalink
3/12/2009 8:32:57 PM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 331
mkamoski wrote:
All --

I am not sure if this applies or is redundant, (and I do suspect that this is a bug in VS.NET and not in Huagati), but, just in case...
...I have noted that my VS.NET IDE 2008 Standard, fully patched, sometimes crashes at startup for ASP.NET web site projects...
...it starts to load and then it "blinks out" and is gone, no process running in Task Manager, just gone...
...and when that happens, I have found the following workaround works...
...delete the contents of the "bin" in that application (except for the ".refresh" files) and try to open the SLN file again...
...and I have also found that this happens less often if all files were closed in the VS.NET IDE before I closed the Solution and exited the IDE last time it was open...
...so, I now always make it a point to close all files before I exit the VS.NET IDE and I get fewer crashes...
...also note that after I apply my workaround (above) the VS.IDE has sets >Tools, >Options, >ProjectsAndSolutions, >TrackActiveItemInSolutionExplorer=False, even though I always have it set to True... so it changes that because it cannot open the files that were open last time the IDE was closed, for some unknown reason or bug....
...HTH.

-- Mark Kamoski
edited by mkamoski on 3/12/2009


Hi Mark,

Try the MS CLR patch ( http://blogs.msdn.com/jnak/archive/2009/02/26/fix-available-asp-net-mvc-rc-crash-in-a-windows-azure-cloud-service-project.aspx ).

If that doesn't work, try "ngen /delete *". This will remove all ngen images from the ngen cache so can have a small performance impact but normally that is not noticeable on a dev machine.

If none of the above work, try the assembly loader add-in ( http://www.huagati.com/ProjectLoader/download/HuagatiProjectLoader.zip )

Best regards,
Kristofer

.
edited by Kristofer on 3/12/2009
0 permalink
3/17/2009 7:46:07 AM

mkamoski
mkamoski
Posts: 46
All --

This is some feedback of my investigation here of this issue, to give some details regarding what did (and what did not) work for us here.

First, I will say that as of now the problem is solved.

We tried the MS KB patch and it did not work.

We next tried the ProjectLoader and it did work. (Kris you are awesome.)

That's about it.

HTH.

Thank you.

-- Mark Kamoski
0 permalink

Home » Huagati DBML/EDMX Tools Support » Addin Causes IDE To Close





Powered by Jitbit Forum 7.1.0.0 © 2006-2011 Jitbit Software