Please include the following with each issue:
1. Describe the bug
Adding lines of code in an existing function sometimes crashes the static analysis. Only "Developer: Reload Window" fixes this.
2. To Reproduce
Steps to reproduce the behavior:
- While typing the ItemJournalLine."Entry Type" := it stops all syntax coloring and stops giving intellisense suggestions.
ItemJournalLine."Journal Template Name" := 'ITEM';
ItemJournalLine."Journal Batch Name" := 'CB';
ItemJournalLine.SetUpNewLine(ItemJournalLine);
ItemJournalLine.Validate("Item No.", UITOPDLine."Item No.");
ItemJournalLine."Entry Type" := ItemJournalLine."Entry Type"::"Negative Adjmt.";
Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.
3. Expected behavior
Continue code analysis, syntax coloring and intellisense functionality.
4. Actual behavior
[Error - 2:45:51 PM] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.
Processing of message 'textDocument/semanticTokens/full' failed with error: 'Object reference not set to an instance of an object.'
Details:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindCase(CaseStatementSyntax node, DiagnosticBag diagnostics) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 228
at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindStatement(StatementSyntax node, DiagnosticBag diagnostics) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 122
at Microsoft.Dynamics.Nav.CodeAnalysis.MemberSemanticModel.IncrementalBinder.BindStatement(StatementSyntax node, DiagnosticBag diagnostics) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\MemberSemanticModel.cs:line 880
at Microsoft.Dynamics.Nav.CodeAnalysis.MemberSemanticModel.GetBoundNodes(SyntaxNode node) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\MemberSemanticModel.cs:line 412
at Microsoft.Dynamics.Nav.CodeAnalysis.MemberSemanticModel.GetLowerBoundNode(SyntaxNode node) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\MemberSemanticModel.cs:line 307
at Microsoft.Dynamics.Nav.CodeAnalysis.MemberSemanticModel.GetBoundNodes(SyntaxNode node, SyntaxNode& bindableNode, BoundNode& lowestBoundNode, BoundNode& highestBoundNode, BoundNode& boundParent) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\MemberSemanticModel.cs:line 164
at Microsoft.Dynamics.Nav.CodeAnalysis.MemberSemanticModel.GetSymbolInfoWorker(SyntaxNode node, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\MemberSemanticModel.cs:line 85
at Microsoft.Dynamics.Nav.CodeAnalysis.SyntaxTreeSemanticModel.GetSymbolInfoWorker(SyntaxNode node, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\SyntaxTreeSemanticModel.cs:line 139
at Microsoft.Dynamics.Nav.CodeAnalysis.SemanticModel.GetSymbolInfo(ExpressionSyntax expression, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\SemanticModel.cs:line 568
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Classifiers.NameSyntaxClassifier.ClassifyTypeSyntax(NameSyntax name, SemanticModel semanticModel, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Classification\Classifiers\NameSyntaxClassifier.cs:line 58
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Classifiers.NameSyntaxClassifier.ClassifyNode(SyntaxNode syntax, SemanticModel semanticModel, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Classification\Classifiers\NameSyntaxClassifier.cs:line 31
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Classification.AbstractClassificationService.Worker.ClassifyNode(SyntaxNode syntax) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Classification\AbstractClassificationService.Worker.cs:line 126
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Classification.AbstractClassificationService.Worker.ProcessNodes() in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Classification\AbstractClassificationService.Worker.cs:line 98
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Classification.AbstractClassificationService.Worker.Classify(Workspace workspace, SemanticModel semanticModel, TextSpan textSpan, List`1 list, Func`2 getNodeClassifiers, Func`2 getTokenClassifiers, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Classification\AbstractClassificationService.Worker.cs:line 69
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Classification.AbstractClassificationService.AddSemanticClassifications(SemanticModel semanticModel, TextSpan textSpan, Workspace workspace, Func`2 getNodeClassifiers, Func`2 getTokenClassifiers, List`1 result, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Classification\AbstractClassificationService.cs:line 83
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Classification.Classifier.GetClassifiedSpans(SemanticModel semanticModel, TextSpan textSpan, Workspace workspace, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Classification\Classifier.cs:line 48
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Classification.Classifier.GetClassifiedSpansAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Classification\Classifier.cs:line 27
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.SemanticTokensFullRequestHandler.HandleAsync(SemanticTokensRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\SemanticTokensFullRequestHandler.cs:line 49
at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 103
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 106
5. Versions:
- AL Language: v12.3.900902
- Visual Studio Code: 1.84.2
- Business Central: 21.2.49946.49990
- List of Visual Studio Code extensions that you have installed:
AL CodeActions v1.0.33
AL Language extension for Microsoft Dynamics 365 Business Central v12.3.900902
AL Object Designer v0.2.4
AZ AL Dev Tools/AL Code Outline v3.0.53
Error Lens v3.15.0
waldo's CRS AL Language Extension v1.5.29
Final Checklist
Please remember to do the following:
Please include the following with each issue:
1. Describe the bug
Adding lines of code in an existing function sometimes crashes the static analysis. Only "Developer: Reload Window" fixes this.
2. To Reproduce
Steps to reproduce the behavior:
Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.
3. Expected behavior
Continue code analysis, syntax coloring and intellisense functionality.
4. Actual behavior
5. Versions:
AL CodeActions v1.0.33
AL Language extension for Microsoft Dynamics 365 Business Central v12.3.900902
AL Object Designer v0.2.4
AZ AL Dev Tools/AL Code Outline v3.0.53
Error Lens v3.15.0
waldo's CRS AL Language Extension v1.5.29
Final Checklist
Please remember to do the following:
Search the issue repository to ensure you are reporting a new issue
Reproduce the issue after disabling all extensions except the AL Language extension
Simplify your code around the issue to better isolate the problem