Closed gntpet closed 5 years ago
This looks like a bug in the analyzer rule.
@gintuoklis Thank you for reporting the issue. It is not easy to catch it, but it seems to be fixed recently. Could you try to reproduce it with the latest daily build?
hey @AndreyKorepanov, I started our AL conversion project all other again with the latest AL tools. At the moment I am stuck with another bug #4127, which is showstopper at the moment.
Nevertheless, I tried to enable CodeCop Analyzis for my project to see if I still get Rule005OnlyUseBeginEndForCompoundStatements
error. This particular error has disappeared, but instead I got few new ones :) So i am not sure now if you solved the issue, or something changed in other tools that fixed my code (exporttonewsytanx, txt2al...)
Regarding new errors, here they are:
Analyzer 'Microsoft.Dynamics.Nav.CodeCop.Readability.Rule021VariableDeclarationsShouldBeOrderedByType' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'
Analyzer 'Microsoft.Dynamics.Nav.CodeCop.Design.Rule139DoNotAssignToStringWithSmallerCapacity' threw an exception of type 'System.IndexOutOfRangeException' with message 'Index was outside the bounds of the array.'
I cannot identify code line that it is causing these errors.
Should i make new bugs for those two?
Best Regards, Gintautas
Hi @gintuoklis thank you for reply and reporting more bugs. You do not need to create new bugs for those two, but it would be nice if you could provide the exception stack trace for them.
@gintuoklis Thank you for reporting the issues, the fix will be shipped in future update.
The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from build number 25977.
If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo
For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://blogs.msdn.microsoft.com/freddyk/2018/04/16/which-docker-image-is-the-right-for-you/
Issue with Rule139DoNotAssignToStringWithSmallerCapacity is still not fixed using AL extension 2.1.66478
obtained from latest insider docker image "Labels": { "country": "W1", "created": "201811252233", "cu": "", "eula": "https://go.microsoft.com/fwlink/?linkid=861843", "legal": "http://go.microsoft.com/fwlink/?LinkId=837447", "maintainer": "Dynamics SMB", "nav": "main", "osversion": "10.0.14393.2608", "tag": "0.0.8.0", "version": "14.0.26257.0" }
{ "resource": "/c:/SourceControl/ll/app.json", "owner": "_generated_diagnostic_collectionname#1", "code": "AD0001", "severity": 4, "message": "Analyzer 'Microsoft.Dynamics.Nav.CodeCop.Design.Rule139DoNotAssignToStringWithSmallerCapacity' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'", "source": "AL", "startLineNumber": 1, "startColumn": 1, "endLineNumber": 1, "endColumn": 1 }
The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from build number 25977.
I'm sorry, but this seems to be an AL Problem? Why does this Need to be fixed in a docker Image? And how About OnPrem?
We still get this error, when does the fix "ship in the future"?
The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 25977.
If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo
For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://blogs.msdn.microsoft.com/freddyk/2018/04/16/which-docker-image-is-the-right-for-you/
Hey Guys, While publishing extensions i keep getting this error: 'Object reference not set to an instance of an object.'.
I cannot find the source file that it's causing it (i have >1650 files in my project). I'm seeking for advice how to find the file causing the issue.
I thought by enabling CodeAnalyzers will help to find the root cause. It gave some hint, but still not enough to identify the file that it's causing it. CodeAnalyzer shows errors with similar message but it's linked with app.json file, not the file that it's causing it:
Analyzer 'Microsoft.Dynamics.Nav.CodeCop.Readability.Rule005OnlyUseBeginEndForCompoundStatements' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'",
full message:
In addition, I checked event viewer for error messages. There's a very long exception related to evaluate. Not sure if CodeAnalyzer, and EventViewer messages are related to the same issue. But this is all i have for now.
Best Regards, Gintautas