Title: ArgumentNullException in GetConstantValueAsString crashes process · Issue #353 · microsoft/python-language-server · GitHub
Open Graph Title: ArgumentNullException in GetConstantValueAsString crashes process · Issue #353 · microsoft/python-language-server
X Title: ArgumentNullException in GetConstantValueAsString crashes process · Issue #353 · microsoft/python-language-server
Description: Having exactly this in a file causes the language server to crash until VSC gives up trying to restart it: from typing import TypeVar def cla _ = TypeVar() Found while making minimal examples for generics. Assertion Failed System.Argumen...
Open Graph Description: Having exactly this in a file causes the language server to crash until VSC gives up trying to restart it: from typing import TypeVar def cla _ = TypeVar() Found while making minimal examples for g...
X Description: Having exactly this in a file causes the language server to crash until VSC gives up trying to restart it: from typing import TypeVar def cla _ = TypeVar() Found while making minimal examples for g...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/353
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ArgumentNullException in GetConstantValueAsString crashes process","articleBody":"Having exactly this in a file causes the language server to crash until VSC gives up trying to restart it:\r\n\r\n```python\r\nfrom typing import TypeVar\r\n\r\ndef cla\r\n\r\n_ = TypeVar()\r\n```\r\n\r\nFound while making minimal examples for generics.\r\n\r\n```\r\nAssertion Failed\r\nSystem.ArgumentNullException: Value cannot be null.\r\nParameter name: source\r\n at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)\r\n at Microsoft.PythonTools.Analysis.AnalysisValueSetExtensions.GetConstantValueAsString(IAnalysisSet values) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\AnalysisValueSetExtensions.cs:line 246\r\n at Microsoft.PythonTools.Analysis.Values.TypingModuleInfo.\u003c\u003ec__DisplayClass6_0.\u003cNewType_Call\u003eb__0(Node n) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Values\\TypingModuleInfo.cs:line 56\r\n at Microsoft.PythonTools.Analysis.Analyzer.InterpreterScope.GetOrMakeNodeValue(Node node, NodeValueKind kind, Func`2 maker) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Analyzer\\InterpreterScope.cs:line 381\r\n at Microsoft.PythonTools.Analysis.Values.TypingModuleInfo.NewType_Call(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Values\\TypingModuleInfo.cs:line 55\r\n at Microsoft.PythonTools.Analysis.Values.SpecializedCallable.Call(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Values\\SpecializedCallable.cs:line 49\r\n at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateCall(ExpressionEvaluator ee, Node node) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Analyzer\\ExpressionEvaluator.cs:line 378\r\n at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateWorker(Node node) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Analyzer\\ExpressionEvaluator.cs:line 211\r\n at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator.Evaluate(Expression node) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Analyzer\\ExpressionEvaluator.cs:line 55\r\n at Microsoft.PythonTools.Analysis.Analyzer.DDG.Walk(AssignmentStatement node) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Analyzer\\DDG.cs:line 137\r\n at Microsoft.PythonTools.Parsing.Ast.AssignmentStatement.Walk(PythonWalker walker) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Parsing\\Ast\\AssignmentStatement.cs:line 41\r\n at Microsoft.PythonTools.Analysis.Analyzer.DDG.Walk(SuiteStatement node) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Analyzer\\DDG.cs:line 665\r\n at Microsoft.PythonTools.Parsing.Ast.SuiteStatement.Walk(PythonWalker walker) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Parsing\\Ast\\SuiteStatement.cs:line 34\r\n at Microsoft.PythonTools.Parsing.Ast.PythonAst.Walk(PythonWalker walker) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Parsing\\Ast\\PythonAst.cs:line 92\r\n at Microsoft.PythonTools.Analysis.AnalysisUnit.AnalyzeWorker(DDG ddg, CancellationToken cancel) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\AnalysisUnit.cs:line 154\r\n at Microsoft.PythonTools.Analysis.AnalysisUnit.Analyze(DDG ddg, CancellationToken cancel) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\AnalysisUnit.cs:line 139\r\n at Microsoft.PythonTools.Analysis.Analyzer.DDG.Analyze(Deque`1 queue, CancellationToken cancel, Action`1 reportQueueSize, Int32 reportQueueInterval) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Analyzer\\DDG.cs:line 75\r\n at Microsoft.PythonTools.Analysis.PythonAnalyzer.AnalyzeQueuedEntries(CancellationToken cancel) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\PythonAnalyzer.cs:line 907\r\n at Microsoft.PythonTools.Intellisense.AnalysisQueue.GroupAnalysis.Analyze(CancellationToken cancel) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Intellisense\\AnalysisQueue.cs:line 229\r\n at Microsoft.PythonTools.Intellisense.AnalysisQueue.HandleAnalyzable(IAnalyzable item, AnalysisPriority priority, CancellationToken cancellationToken) in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Intellisense\\AnalysisQueue.cs:line 152\r\n at Microsoft.PythonTools.Intellisense.AnalysisQueue.ConsumerLoop() in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Intellisense\\AnalysisQueue.cs:line 64\r\n\r\n at Microsoft.Python.LanguageServer.Implementation.Server.Analysis_UnhandledException(Object sender, UnhandledExceptionEventArgs e) in C:\\Users\\jabaile\\python-language-server\\src\\LanguageServer\\Impl\\Implementation\\Server.cs:line 116\r\n at Microsoft.PythonTools.Intellisense.AnalysisQueue.ConsumerLoop() in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Intellisense\\AnalysisQueue.cs:line 64\r\n at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()\r\n at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)\r\n at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)\r\n at System.Threading.Tasks.Task`1.TrySetResult(TResult result)\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(TResult result)\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)\r\n at Microsoft.PythonTools.Intellisense.AnalysisQueue.ConsumeAsync() in C:\\Users\\jabaile\\python-language-server\\src\\Analysis\\Engine\\Impl\\Intellisense\\AnalysisQueue.cs:line 89\r\n at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()\r\n at System.Threading.ThreadPoolWorkQueue.Dispatch()\r\n```","author":{"url":"https://github.com/jakebailey","@type":"Person","name":"jakebailey"},"datePublished":"2018-11-06T21:01:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/353/python-language-server/issues/353"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8fb8e30e-6718-e656-7254-0e87b8c3212c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ECEA:2E6A7A:33ADE:46FE6:6A4E20F4 |
| html-safe-nonce | cf030226daa8d360c42eeccd596d2e8ae6b32551a69eea395c627216267b02dc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0VBOjJFNkE3QTozM0FERTo0NkZFNjo2QTRFMjBGNCIsInZpc2l0b3JfaWQiOiI1MDUxNDEzNzc4NTIxNzkyNzU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cba22b3bc86b300ca66ea26eb26fd7bdd95ec796379f933828e2fa72889f6ecb |
| hovercard-subject-tag | issue:378031475 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/python-language-server/353/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4919d0d7880865fb74fddc3ff7355c9725dac53b3c94fc8852d3d76ef885006b/microsoft/python-language-server/issues/353 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4919d0d7880865fb74fddc3ff7355c9725dac53b3c94fc8852d3d76ef885006b/microsoft/python-language-server/issues/353 |
| og:image:alt | Having exactly this in a file causes the language server to crash until VSC gives up trying to restart it: from typing import TypeVar def cla _ = TypeVar() Found while making minimal examples for g... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jakebailey |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 145901977 |
| octolytics-dimension-repository_nwo | microsoft/python-language-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145901977 |
| octolytics-dimension-repository_network_root_nwo | microsoft/python-language-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5fe497b4815fcce3df76c0e246faa739a82c3124 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width