-
Notifications
You must be signed in to change notification settings - Fork 833
Description
After latest F# and VS2022 batches the Visual Studio has went unreliable and just disappears sometimes when writing new text, leaving Windows Eventlog a devenv.exe error entry.
I attached another Visual Studio instance to my Visual Studio to see why it dies.
I have an F# file of 9313 lines, and meanwhile writing to anywhere really, it seems to be that compiler intellisense throws stack-overflow and that ends-up killing the whole VisualStudio 2022. Maybe the code after error, the unknown-part, is too big for the compiler to try to parse?
Here the "Cannot evaluate expression. Unknown error 0x80040014 from .NET debugging services." makes totally sense, as meanwhile typing the source-code cannot be parsed, I'm in a middle of a word!
The stackoverflow seems to come from CheckDeclarations.fs function TcMutRecDefns_Phase2:
fsharp/src/Compiler/Checking/CheckDeclarations.fs
Line 2110 in c910057
| with RecoverableException exn -> errorRecovery exn scopem; [], envMutRec |
Callstack:
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcMutRecDefns_Phase2(FSharp.Compiler.CheckBasics.TcFileState cenv, FSharp.Compiler.CheckBasics.TcEnv envInitial, FSharp.Compiler.Text.Range mBinds, FSharp.Compiler.Text.Range scopem, Microsoft.FSharp.Core.FSharpOption<System.Tuple<Microsoft.FSharp.Core.FSharpOption<FSharp.Compiler.TypedTree.Entity>, Microsoft.FSharp.Core.FSharpRef<FSharp.Compiler.TypedTree.ModuleOrNamespaceType>>> mutRecNSInfo, FSharp.Compiler.CheckBasics.TcEnv envMutRec, Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.CheckDeclarations.MutRecShape<FSharp.Compiler.CheckDeclarations.MutRecDefnsPhase2DataForTycon, Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.CheckExpressions.RecDefnBindingInfo>, System.Tuple<FSharp.Compiler.CheckDeclarations.MutRecDefnsPhase2DataForModule, FSharp.Compiler.CheckBasics.TcEnv>>> mutRecDefns, bool isMutRec) Line 2097 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcDeclarations.TcMutRecDefinitions(FSharp.Compiler.CheckBasics.TcFileState cenv, FSharp.Compiler.CheckBasics.TcEnv envInitial, FSharp.Compiler.TypedTree.ParentRef parent, Microsoft.FSharp.Collections.FSharpSet typeNames, FSharp.Compiler.CheckBasics.UnscopedTyparEnv tpenv, FSharp.Compiler.Text.Range m, FSharp.Compiler.Text.Range scopem, Microsoft.FSharp.Core.FSharpOption<System.Tuple<Microsoft.FSharp.Core.FSharpOption<FSharp.Compiler.TypedTree.Entity>, Microsoft.FSharp.Core.FSharpRef<FSharp.Compiler.TypedTree.ModuleOrNamespaceType>>> mutRecNSInfo, Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.CheckDeclarations.MutRecShape<FSharp.Compiler.Syntax.SynTypeDefn, Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.Syntax.SynBinding>, FSharp.Compiler.Syntax.SynComponentInfo>> mutRecDefns, bool isMutRec) Line 4558 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElementNonMutRec@5093-1.Invoke(System.Threading.CancellationToken ct) Line 5113 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElementNonMutRec@5093-18.Invoke(System.Threading.CancellationToken ct) Line 5093 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElementsNonMutRec(FSharp.Compiler.CheckBasics.TcFileState cenv, FSharp.Compiler.TypedTree.ParentRef parent, Microsoft.FSharp.Collections.FSharpSet typeNames, FSharp.Compiler.Text.Range endm, Microsoft.FSharp.Collections.FSharpList<System.Tuple<Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.TypedTree.ModuleOrNamespaceContents>, Microsoft.FSharp.Collections.FSharpList<Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.Unit>>, Microsoft.FSharp.Collections.FSharpList<System.Tuple<System.AttributeTargets, FSharp.Compiler.TypedTree.Attrib>>>> defsSoFar, FSharp.Compiler.CheckBasics.TcEnv env, FSharp.Compiler.CheckBasics.TcEnv envAtEnd, Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.Syntax.SynModuleDecl> moreDefs, System.Threading.CancellationToken ct) Line 5337 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElements@5469-5.Invoke(System.Threading.CancellationToken ct) Line 5469 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElements@5450-8.Invoke(System.Threading.CancellationToken ct) Line 5450 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElementNonMutRec@5196-15.Invoke(System.Threading.CancellationToken ct) Line 5196 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElementNonMutRec@5093-18.Invoke(System.Threading.CancellationToken ct) Line 5093 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElementsNonMutRec(FSharp.Compiler.CheckBasics.TcFileState cenv, FSharp.Compiler.TypedTree.ParentRef parent, Microsoft.FSharp.Collections.FSharpSet typeNames, FSharp.Compiler.Text.Range endm, Microsoft.FSharp.Collections.FSharpList<System.Tuple<Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.TypedTree.ModuleOrNamespaceContents>, Microsoft.FSharp.Collections.FSharpList<Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.Unit>>, Microsoft.FSharp.Collections.FSharpList<System.Tuple<System.AttributeTargets, FSharp.Compiler.TypedTree.Attrib>>>> defsSoFar, FSharp.Compiler.CheckBasics.TcEnv env, FSharp.Compiler.CheckBasics.TcEnv envAtEnd, Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.Syntax.SynModuleDecl> moreDefs, System.Threading.CancellationToken ct) Line 5337 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElements@5469-5.Invoke(System.Threading.CancellationToken ct) Line 5469 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElements@5450-8.Invoke(System.Threading.CancellationToken ct) Line 5450 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElementNonMutRec@5285-17.Invoke(System.Threading.CancellationToken ct) Line 5285 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElementNonMutRec@5093-18.Invoke(System.Threading.CancellationToken ct) Line 5093 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElementsNonMutRec(FSharp.Compiler.CheckBasics.TcFileState cenv, FSharp.Compiler.TypedTree.ParentRef parent, Microsoft.FSharp.Collections.FSharpSet typeNames, FSharp.Compiler.Text.Range endm, Microsoft.FSharp.Collections.FSharpList<System.Tuple<Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.TypedTree.ModuleOrNamespaceContents>, Microsoft.FSharp.Collections.FSharpList<Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.Unit>>, Microsoft.FSharp.Collections.FSharpList<System.Tuple<System.AttributeTargets, FSharp.Compiler.TypedTree.Attrib>>>> defsSoFar, FSharp.Compiler.CheckBasics.TcEnv env, FSharp.Compiler.CheckBasics.TcEnv envAtEnd, Microsoft.FSharp.Collections.FSharpList<FSharp.Compiler.Syntax.SynModuleDecl> moreDefs, System.Threading.CancellationToken ct) Line 5337 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElements@5469-5.Invoke(System.Threading.CancellationToken ct) Line 5469 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CheckDeclarations.TcModuleOrNamespaceElements@5450-8.Invoke(System.Threading.CancellationToken ct) Line 5450 C#
FSharp.Compiler.Service.dll Line 5718 C#
FSharp.Compiler.Service.dll Line 5718 C#
FSharp.Compiler.Service.dll Line 1396 C#
FSharp.Compiler.Service.dll Line 1390 C#
FSharp.Compiler.Service.dll Line 1390 C#
FSharp.Compiler.Service.dll Line 1319 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.ParseAndCheckInputs.CheckOneInputAndFinish@1464-1.Invoke(System.Threading.CancellationToken ct) Line 1464 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CodeAnalysis.ParseAndCheckFile.CheckOneFile@3245-7.Invoke(System.Threading.CancellationToken ct) Line 3245 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CodeAnalysis.ParseAndCheckFile.CheckOneFile@3242-6.Invoke(System.Threading.CancellationToken ct) Line 3245 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CodeAnalysis.ParseAndCheckFile.CheckOneFile@3232-8.Invoke(System.Threading.CancellationToken ct) Line 3232 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CodeAnalysis.ParseAndCheckFile.CheckOneFile@3230-11.Invoke(System.Threading.CancellationToken ct) Line 3230 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CodeAnalysis.ParseAndCheckFile.CheckOneFile@3215-3.Invoke(System.Threading.CancellationToken ct) Line 3230 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CodeAnalysis.ParseAndCheckFile.CheckOneFile@3213-2.Invoke(System.Threading.CancellationToken ct) Line 3215 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CodeAnalysis.ParseAndCheckFile.CheckOneFile@3192-1.Invoke(System.Threading.CancellationToken ct) Line 3213 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults.CheckOneFile@3665-13.Invoke(System.Threading.CancellationToken ct) Line 3665 C#
FSharp.Compiler.Service.dll!Internal.Utilities.Library.Cancellable.toAsync@75-1<FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults>.Invoke(System.Threading.CancellationToken ct) Line 75 C#
FSharp.Compiler.Service.dll!FSharp.Compiler.BuildGraph.GraphNode<System.Tuple<FSharp.Compiler.CodeAnalysis.FSharpParseFileResults, FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults, long, System.DateTime>>[email protected](Microsoft.FSharp.Core.Unit _arg2) Line 72 C#
FSharp.Editor.dll!Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@389-4.Invoke(System.Threading.CancellationToken ct) Unknown
FSharp.Editor.dll!Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@387-3.MoveNext() Unknown
Event-log:
Faulting application name: devenv.exe, version: 17.11.35303.130, time stamp: 0x66d77afb
Faulting module name: clr.dll, version: 4.8.9261.0, time stamp: 0x667a1925
Exception code: 0xc00000fd
Fault offset: 0x0000000000062d57
Faulting process id: 0x0x3C9C
Faulting application start time: 0x0x1DB055063C73BE6
Faulting application path: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: 933f8128-ee82-4d71-b12d-a1746671f9fe
Environment:
Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.11.3
Windows 11 - Dotnet 8.0.400
I don't need intellisense outside my screen, so there is no reason to try to parse the whole file through!
And in case of any parsing error, it should just give-up and not parse.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
