Closed navdotnetreqs closed 4 years ago
Same here, it seems to happen for me when rule "AA0218" is disabled.
Hi
Could you provide some info on the repro that makes it crash?
/Marc
From my side it's complicate to reproduce. It occurs on all my apps. But when I create a new app with only one page without a tooltip, the error does not occur.
The analyzer kept crashing with this error with one of our apps, and I've managed to reproduce it (it requires a Spanish version of BC16).
pageextension 50000 "Test Purchase Order" extends "Purchase Order"
{
layout
{
modify("Special Scheme Code")
{
Visible = false;
}
}
}
For whatever reason (because I don't see anything particular about those fields) the analyzer crashes as soon as we try to modify one of the fields added by the Spanish localization for SII (reporting taxes to the Spanish tax agency).
Note: reproduced with v5.0.236243 of the AL extension.
Same here, it happens for me when rule "AA0218" is disabled.
Thanks for the added info.
It seems it's the problem with modifying Option fields. No analyzer problem with modifying Text field Problem with modifying Option field
AL Language extensiton 5.0.254558
@MarcHansenMicrosoft can you take a look?
Hello,
I had the same issue appearing like this, but the cause and the solution were different.
I'm playing with interfaces and enums, so I had an enum extension in my app, extending native Enum "Price Asset Type" that is implementing "Price Asset". In this case since it's interface, the strong contract demands that my value in enum extension also implements, and I was missing property Implementation. But instead of having compile error, I had this warning that is not very intuitive and it had nothing to do with tooltip missing.
This issue is now failing my build pipeline:
We have just gotten the latest platform into Nav repo.
This would mean that if you get the latest development docker that will be coming. Then this issue should be fixed.
{ "resource": "/c:/Users/app.json", "owner": "_generated_diagnostic_collectionname#1", "code": "AD0001", "severity": 4, "message": "Analyzer 'Microsoft.Dynamics.Nav.CodeCop.Localizability.Rule218TooltipMustBeFilledOnPageForFieldsAndActions' threw an exception of type 'System.NullReferenceException' with message 'System.NullReferenceException: Object reference not set to an instance of an object.\r\n at Microsoft.Dynamics.Nav.CodeCop.Localizability.Rule218TooltipMustBeFilledOnPageForFieldsAndActions.ExtractCountOfOptionsFromGlobalVar(ISymbol symbol) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeCop\Localizability\Rule218TooltipMustBeFilledOnPageForFieldsAndActions.cs:line 287\r\n at Microsoft.Dynamics.Nav.CodeCop.Localizability.Rule218TooltipMustBeFilledOnPageForFieldsAndActions.AnalyzeCaptions(SymbolAnalysisContext symbolAnalysisContext, SyntaxNode node, IdentifierNameSyntax identifierName, ISymbol symbol) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeCop\Localizability\Rule218TooltipMustBeFilledOnPageForFieldsAndActions.cs:line 265\r\n at Microsoft.Dynamics.Nav.CodeCop.Localizability.Rule218TooltipMustBeFilledOnPageForFieldsAndActions.AnalyzeModifiedControlsAndActions(SymbolAnalysisContext symbolAnalysisContext, SyntaxNode node, ISymbol symbol) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeCop\Localizability\Rule218TooltipMustBeFilledOnPageForFieldsAndActions.cs:line 123\r\n at Microsoft.Dynamics.Nav.CodeCop.Localizability.Rule218TooltipMustBeFilledOnPageForFieldsAndActions.AnalyzePageModifyFields(SymbolAnalysisContext symbolAnalysisContext, ImmutableArray
1 changeSymbols) in D:\\a\\1\\s\\source\\Prod\\Microsoft.Dynamics.Nav.CodeCop\\Localizability\\Rule218TooltipMustBeFilledOnPageForFieldsAndActions.cs:line 88\r\n at Microsoft.Dynamics.Nav.CodeCop.Localizability.Rule218TooltipMustBeFilledOnPageForFieldsAndActions.AnalyzePage(SymbolAnalysisContext symbolAnalysisContext) in D:\\a\\1\\s\\source\\Prod\\Microsoft.Dynamics.Nav.CodeCop\\Localizability\\Rule218TooltipMustBeFilledOnPageForFieldsAndActions.cs:line 61\r\n at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c__DisplayClass49_2.<ExecuteSymbolActionsCore>b__0() in D:\\a\\1\\s\\source\\Prod\\Microsoft.Dynamics.Nav.CodeAnalysis\\DiagnosticAnalyzer\\AnalyzerExecutor.cs:line 655\r\n at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock(DiagnosticAnalyzer analyzer, Action analyze, Nullable
1 info) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\DiagnosticAnalyzer\AnalyzerExecutor.cs:line 1099'", "source": "AL", "startLineNumber": 1, "startColumn": 1, "endLineNumber": 1, "endColumn": 1 }