microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
718 stars 242 forks source link

The AL Server crashed 5 times in the last 3 minutes #7769

Open Hilbekale opened 3 weeks ago

Hilbekale commented 3 weeks ago

Please include the following with each issue:

1. Describe the bug

I have the same issue as describer in Ticket https://github.com/microsoft/AL/issues/540.

After modifying AL Code this error:

image

Reloading VS Code did not help and i start investigating. I noticed that this issue occurs for me, because i created a function with variables but i did not defined the var line in front of the variables.

    procedure DeleteTourPlanLineManually(var BITBETourPlanLine: Record "BITBE Tour Plan Line")
        ManualDeletionLbl: Label 'Tour Plan Line: Line manually deleted.', Comment = 'DES="Tourplanzeile: Zeile manuell gelöscht."';
    begin
        DeleteTourPlanLine(BITBETourPlanLine, ManualDeletionLbl);
    end;

The function should look like this:

    procedure DeleteTourPlanLineManually(var BITBETourPlanLine: Record "BITBE Tour Plan Line")
    var
        ManualDeletionLbl: Label 'Tour Plan Line: Line manually deleted.', Comment = 'DES="Tourplanzeile: Zeile manuell gelöscht."';
    begin
        DeleteTourPlanLine(BITBETourPlanLine, ManualDeletionLbl);
    end;

2. To Reproduce Steps to reproduce the behavior:

  1. Go to '...'

3. Expected behavior

I would expect that the AL Server is not crashing and pointing to the issue instead.

4. Actual behavior

The AL Server is crashing and therefore further development is limited.

5. Versions:

Version: 1.90.0 (system setup) Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573 Date: 2024-06-04T19:33:54.889Z Electron: 29.4.0 ElectronBuildId: 9593362 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.17763

Final Checklist

Please remember to do the following:

thloke commented 2 weeks ago

I tried reproducing this but couldn't, but it could be that I'm also missing some context. Can you try using the pre-release version to check if it reproduces on that build as well? It should be AL extension version 14 and above.

If you can share the verbose logs, that will also help since it will give us the stacktraces. Can you do the following?

  1. In your VSCode settings.json, set "al.editorServicesLogLevel": "Verbose"
  2. Reproduce the scenario
  3. Under the path C:\Users\<username>\.vscode\extensions\ms-dynamics-smb.al-<version>\bin\win32, collect the editorservice.log and debuggerservices.log files.

Thanks!

Hilbekale commented 2 weeks ago

EditorServices.log EditorServices_Error.log

There was not any debuggerservices.log created. I uploaded both clean files. One with the error and one without the error.

This is the affected object:

TourMgt.Codeunit.al.txt

Crash also happens in prelease version: Tested with v14.0.1044805 (pre-release)

It is not a big deal for me. Just wanted to share that there is a potential problem.