1

Resolved

Create virtual environment crashes VS 2010

description

VS 2010 Integrated Shell
Enthought Python 2.7 (free)
easy_install virtualenv
easy_install pip
PTVS 2.0 alpha

Create a new python project in the default projects folder.
Click on Virtual Environments->Create Virtual Env...
Accept default name

You'll get a Object not set to a reference of an object message box. This is followed by a VS has encountered a problem and needs to close dialog.

comments

huguesv wrote Mar 5 at 7:16 PM

Log Name: Application
Source: .NET Runtime
Date: 3/5/2013 12:11:47 PM
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: huguestestwin7
Description:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at Microsoft.PythonTools.Project.PythonProjectNode+VirtualEnvRequestHandler.CreateVirtualEnvOutputDataReceived(System.Object, System.Diagnostics.DataReceivedEventArgs)
at System.Diagnostics.Process.OutputReadNotifyUser(System.String)
at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
at System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder()
at System.Diagnostics.AsyncStreamReader.ReadBuffer(System.IAsyncResult)
at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessageSink)
at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.DoAsyncCall()
at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-03-05T20:11:47.000000000Z" />
<EventRecordID>799</EventRecordID>
<Channel>Application</Channel>
<Computer>huguestestwin7</Computer>
<Security />
</System>
<EventData>
<Data>Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at Microsoft.PythonTools.Project.PythonProjectNode+VirtualEnvRequestHandler.CreateVirtualEnvOutputDataReceived(System.Object, System.Diagnostics.DataReceivedEventArgs)
at System.Diagnostics.Process.OutputReadNotifyUser(System.String)
at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
at System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder()
at System.Diagnostics.AsyncStreamReader.ReadBuffer(System.IAsyncResult)
at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessageSink)
at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.DoAsyncCall()
at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
</Data>
</EventData>
</Event>

huguesv wrote Mar 5 at 9:33 PM

Reproduced in VS 2010 Pro as well. Cannot reproduce in VS 2012 integrated shell. So it appears to be a 2010 only bug.