Creating IronPython project causes crash

Mar 3 at 12:13 PM
I have both VS2010, and VS2012 shells installed. Whenever I try to create an IronPython project, or switch to IronPython debugging, visual studio will CTD. It does this for both VS2010, and VS2012.

It says "Visual studio has stopped working" and crashes. I'm pretty sure it used to work on this PC. If I go into Tools -> Options ->Python Tools, interpreter options, I can set up an IronPython Interpreter, and that appears to work just fine.

Any thoughts on how I might solve this would be greatly appreciated.
Coordinator
Mar 4 at 6:25 PM
Could you have a look inside your event log to see if there is any more information on the error (such as a call stack)?

Also, if you've sent the crash reports in we may also be able to look at those - there may be IDs in the event log which will help us find yours.

Otherwise, uninstalling and reinstalling PTVS would be the first suggestion.
Coordinator
Mar 4 at 6:26 PM
On rereading, I see that you said you set up an IronPython interpreter manually. Normally we should detect IronPython automatically; did you install it from the packages on their site or was it part of another application?
Mar 4 at 6:59 PM
It auto detected them, but it would crash every time I tried to create an IronPython project, or try to switch the project to start with IronPython. I manually created an intrpreter after that, and was able to switch the project to it, but still can't "create" an IronPython project without crashing. I'm not able to access the PC with the problem at the moment, but I did send the crash report in.

It also appears that with the manual interpreter, the intellisense for .NET objects does not appear to work.

I've tried uninstalling/reinstalling PTVS, the shells, and so far no luck.

This is only happening on my Home PC, the one at work is working just fine.
Mar 4 at 10:53 PM
Edited Mar 4 at 10:59 PM
This is the event log.

Log Name: Application
Source: Application Error
Date: 3/3/2013 1:52:34 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: DadNMom-PC
Description:
Faulting application name: devenv.exe, version: 11.0.50727.1, time stamp: 0x5011ecaa
Faulting module name: clr.dll, version: 4.0.30319.18034, time stamp: 0x50b5a8bb
Exception code: 0xc0000005
Fault offset: 0x00002dd8
Faulting process id: 0xef0
Faulting application start time: 0x01ce18489fed3c62
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: e41bbca0-843b-11e2-a654-e89a8fac543d
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-03-03T19:52:34.000000000Z" />
<EventRecordID>77986</EventRecordID>
<Channel>Application</Channel>
<Computer>DadNMom-PC</Computer>
<Security />
</System>
<EventData>
<Data>devenv.exe</Data>
<Data>11.0.50727.1</Data>
<Data>5011ecaa</Data>
<Data>clr.dll</Data>
<Data>4.0.30319.18034</Data>
<Data>50b5a8bb</Data>
<Data>c0000005</Data>
<Data>00002dd8</Data>
<Data>ef0</Data>
<Data>01ce18489fed3c62</Data>
<Data>C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe</Data>
<Data>C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll</Data>
<Data>e41bbca0-843b-11e2-a654-e89a8fac543d</Data>
</EventData>
</Event>

More...

Log Name: Application
Source: .NET Runtime
Date: 3/3/2013 1:52:34 PM
Event ID: 1023
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: DadNMom-PC
Description:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 64BB2DD8 (64BB0000) with exit code 80131506.

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1023</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-03-03T19:52:34.000000000Z" />
<EventRecordID>77985</EventRecordID>
<Channel>Application</Channel>
<Computer>DadNMom-PC</Computer>
<Security />
</System>
<EventData>
<Data>Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 64BB2DD8 (64BB0000) with exit code 80131506.
</Data>
</EventData>
</Event>
Coordinator
Mar 4 at 11:54 PM
Thanks for that. I found the report and there's definitely a problem loading IronPython. Are you able to start the IronPython console directly? It may help to uninstall and reinstall IronPython. If that doesn't help, I'll ask around here to find out what else we can try. It's very rare to see a crash like this inside clr.dll.
Mar 5 at 1:13 AM
Edited Mar 5 at 1:16 AM
I could start the console directly using ipy.exe

So, I uninstalled IronPython, 2012 integrated shell, 2012 isolated shell, PTVS.
Then I installed in this order.
Iron Python,
Isolated shell
Integrated shell
PTVS

All appears to be working now.

Thanks much!
Coordinator
Mar 5 at 3:18 PM
Good to hear!
Mar 10 at 8:02 PM
Edited Mar 10 at 8:26 PM
OK, I'm still having issues with this.

I'm randomly having the same issue, and when I uninstall Ironpython, and reinstall it, things start working again. Any thoughts would be greatly appreciated. It's getting annoying.

Edit to add additional information.

There are times where it's a little different, but that seems to depend on weather the interactive window was/is open.
When it was open, I started VS in safemode, and got this entry on the interactive window.

<entry>
<record>54</record>
<time>2013/03/10 19:56:31.866</time>
<type>Error</type>
<source>VisualStudio</source>
<description>Construction of frame content failed.&#x000D;&#x000A;Frame identifier: ST:1:0:{5adb6033-611f-4d39-a193-57a717115c0f}&#x000D;&#x000A;Frame caption: IronPython 2.7 Interactive&#x000D;&#x000A;Exception details:&#x000D;&#x000A;System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid&amp; packageGuid, Int32 reason, Guid&amp; context)&#x000D;&#x000A;   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()&#x000D;&#x000A;   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()</description>
</entry>

While in safe mode, if I close the interactive window, and restart Visual Studio, I can then open visual studio, but I get the same crash whenever I try to open an existing IronPython project, or start a new IronPython project.
Coordinator
Mar 11 at 5:34 PM
I suspect something is messing up your IronPython install, but it's hard to tell what exactly. What we probably need to see here is where the 1st exception is coming from which is causing this. Can you launch 2 copies of Visual Studio, and to Debug->Attach to Process and attach to the other one? You'll need to configure VS so that "Just my Code" is disabled in Tools->Options-Debugging->Enable just my Code and then make sure in Debug->Exceptions that breaking on thrown CLR exceptions is enabled (both of these options should be set in the VS you do the attach from).

Then open a IronPython project or interactive window and hopefully you'll break into the VS doing the debugging with a stack trace and exception. If you can send that back to us it might be obvious what the issue is.
Mar 25 at 2:31 PM
Just wanted to update this.

I don't know what I did for sure (I uninstalled various other programs), but I no longer appear to be having this problem.

Thanks for all the help.