1
Vote

Visual Studio crashes while trying to open this file

description

I don't know why this keeps happening, but I was trying to do my homework, and every time I try to open this file, visual studio crashes on me.

I'm using python tools for visual studio 2.0 on visual studio 2013.

file attachments

comments

Zooba wrote Feb 17 at 5:17 PM

I don't see anything obvious in that file that would cause a problem.

If you look in Event Viewer under the Application log, you should be able to find some errors from the .NET Runtime (go ahead and crash VS again, then it'll be near the top). If you can copy/paste the information in there it'll really help us figure out exactly what's going wrong.

the_tyrant wrote Feb 17 at 5:47 PM

Does yours crash too when opening the file?

This is what I got in the logs:
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.Parsing.Ast.ScopeStatement.get_GlobalParent()
   at Microsoft.PythonTools.Analysis.Analyzer.FunctionAnalysisUnit..ctor(Microsoft.PythonTools.Analysis.Values.FunctionInfo, Microsoft.PythonTools.Analysis.AnalysisUnit, Microsoft.PythonTools.Analysis.Analyzer.InterpreterScope)
   at Microsoft.PythonTools.Analysis.Values.FunctionInfo..ctor(Microsoft.PythonTools.Parsing.Ast.FunctionDefinition, Microsoft.PythonTools.Analysis.AnalysisUnit, Microsoft.PythonTools.Analysis.Analyzer.InterpreterScope)
   at Microsoft.PythonTools.Analysis.Analyzer.OverviewWalker.AddFunction(Microsoft.PythonTools.Parsing.Ast.FunctionDefinition, Microsoft.PythonTools.Analysis.AnalysisUnit, Microsoft.PythonTools.Analysis.Analyzer.InterpreterScope)
   at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator.MakeLambdaFunction(Microsoft.PythonTools.Parsing.Ast.LambdaExpression, Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator)
   at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator+<>c__DisplayClassf.<EvaluateLambda>b__e(Microsoft.PythonTools.Parsing.Ast.Node)
   at Microsoft.PythonTools.Analysis.Analyzer.InterpreterScope.GetOrMakeNodeValue(Microsoft.PythonTools.Parsing.Ast.Node, System.Func`2<Microsoft.PythonTools.Parsing.Ast.Node,Microsoft.PythonTools.Analysis.IAnalysisSet>)
   at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateLambda(Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator, Microsoft.PythonTools.Parsing.Ast.Node)
   at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateWorker(Microsoft.PythonTools.Parsing.Ast.Node)
   at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateParenthesis(Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator, Microsoft.PythonTools.Parsing.Ast.Node)
   at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateWorker(Microsoft.PythonTools.Parsing.Ast.Node)
   at Microsoft.PythonTools.Analysis.Analyzer.FunctionAnalysisUnit.AnalyzeDefaultParameters(Microsoft.PythonTools.Analysis.Analyzer.DDG)
   at Microsoft.PythonTools.Analysis.Analyzer.FunctionAnalysisUnit.AnalyzeWorker(Microsoft.PythonTools.Analysis.Analyzer.DDG, System.Threading.CancellationToken)
   at Microsoft.PythonTools.Analysis.Analyzer.DDG.Analyze(Microsoft.PythonTools.Analysis.Deque`1<Microsoft.PythonTools.Analysis.AnalysisUnit>, System.Threading.CancellationToken, System.Action`1<Int32>, Int32)
   at Microsoft.PythonTools.Analysis.PythonAnalyzer.AnalyzeQueuedEntries(System.Threading.CancellationToken)
   at Microsoft.PythonTools.Intellisense.AnalysisQueue+GroupAnalysis.Analyze(System.Threading.CancellationToken)
   at Microsoft.PythonTools.Intellisense.AnalysisQueue.Worker(System.Object)
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart(System.Object)

Zooba wrote Feb 18 at 3:45 PM

It doesn't crash for me, but I don't have all of the libraries that it imports.

We recently released PTVS 2.1 Alpha, which has a number of fixes that may affect this. Could you try that and see if it still occurs? (I think it probably will, but it's worth trying.)

the_tyrant wrote Feb 18 at 6:33 PM

Hmm, well I attached the whole pack for the assignment. But it looks like it is a common issue, I tried importing the files on multiple computers with both visual studio 2013 and 2012, and it crashed every one of them.