StefanMaron / vsc-lintercop

MIT License
6 stars 6 forks source link

The AL server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information. #22

Open mt-andrea opened 1 month ago

mt-andrea commented 1 month ago

Hi! Yesterday afternoon (07.16. ~14:50) started to get this message: image Windowreload, PC restart nothing helps. I even uninstalled the VS code extension but I still get this message. The output is the following: image What sholud I do? Can you help me fix this? I can't do my job untill this isn't fixed.

Thanks in advance.

StefanMaron commented 1 month ago

@Arthurvdv do you have an idea what could have caused this?

Arthurvdv commented 1 month ago

@mt-andrea thank you for reporting this error. Not sure what's causing this at the moment, but I've added an check in the pre-release version of the LinterCop to try to identify the line of code responsible for this exception.

Could you switch to the pre-release version of the LinterCop and look for a LC0000 diagnostic?

image image

Best is to close all VS Code windows, where after opening VS Code the pre-release version of the LinterCop should be automatically installed.

Would be great if you could share a small code example from the LC0000 diagnostic to reproduce this error, so I could investigate this.

mt-andrea commented 1 month ago

Hi! @Arthurvdv i got the following output: Unhandled exception. System.ArgumentException: Reported diagnostic with ID 'LC0000' is not supported by the analyzer (Parameter 'diagnostic') at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.DiagnosticAnalysisContextHelpers.VerifyArguments(Diagnostic diagnostic, Compilation compilationOpt, Func`2 isSupportedDiagnostic) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs:line 70 at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.OperationAnalysisContext.ReportDiagnostic(Diagnostic diagnostic) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\DiagnosticAnalyzer\AnalysisContext.cs:line 985 at BusinessCentral.LinterCop.Design.Rule0044AnalyzeTransferFields.AnalyzeTransferFields(OperationAnalysisContext ctx) at System.Threading.Tasks.Task.<>c.b__128_1(Object state) at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() [Error - 9:35:47 AM] The AL server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information. [Error - 9:35:47 AM] Server process exited with code 3762504530.

Arthurvdv commented 1 month ago

@mt-andrea Sorry, my bad 😳

I've created an updated version of the pre-release to resolve this. If you still have the setting to pre-release enabled, closing all VS Code windows and after that reopening the project again should now correctly raise the LC0000 rule.

mt-andrea commented 1 month ago

@Arthurvdv No problem. Now I have no errors. :D Is this what you wanted to achive? Now it's opening perfectly. THX

Arthurvdv commented 1 month ago

@mt-andrea Great to hear you're unblocked and the error is gone now.

I was hoping that there was a LC0000 diagnostic (Info) pointing to something, like the example below.

image

For now I have temporarily mitigated this with a Try/Catch to suppress this NullReferenceException. Would be great if I could reproduce this, so I could resolve this problem the right way.

I understand if the answer is no, but is there any chance you could share your AL project with me privately?

mt-andrea commented 1 month ago

@Arthurvdv hi sorry for the delay i sent a collaborator invite from a private repository idk weather it will work or not

Arthurvdv commented 4 weeks ago

Hi @mt-andrea! Very much appreciated! Unfortunately the project seems incomplete, where I can’t compile the app.

I’ve try’ed to see if I could reproduce the error with the LinterCop, I haven’t been successful so far.

Could it be that the project you have shared is incomplete? I mean, do you also retrieve errors on compiling the app? And do you also experience the same error on the LinterCop for this project?

mt-andrea commented 3 weeks ago

@Arthurvdv it was exported from NAV my task is to clean up the errors and warnings

Arthurvdv commented 1 week ago

@mt-andrea, Is there a possibility you can share the AL Project that does compile without errors?

I've try'ed to investigate with the AL Project you have shared, but without any success unfortunately.