Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
Hilbekale opened this issue Jun 12, 2024 · 3 comments
Open
3 tasks done

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

Hilbekale opened this issue Jun 12, 2024 · 3 comments

Comments

@Hilbekale
Copy link

Hilbekale commented Jun 12, 2024

Please include the following with each issue:

1. Describe the bug

I have the same issue as describer in Ticket #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 '...'
  • Create a new AL Project
  • Create a new function in a custom codeunit and define a label as a variable.
  • Delete the var line.

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:

  • AL Language: v13.0.1027618
  • Visual Studio Code:

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:

  • 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

@thloke
Copy link
Contributor

thloke commented Jun 17, 2024

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
Copy link
Author

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.

@thloke
Copy link
Contributor

thloke commented Sep 10, 2024

Sorry for the slow reply on this. The full .al file has the culprit. For the crash to occur, you need to have the documentation comment on the method. The following minimal repro will always trigger the crash:

codeunit 50100 MyCod
{
    /// Comment
    /// </summary>
    /// <param name="Param"></param>

    procedure Proc(var Param: Integer)
        Lbl: Label 'Lbl', Comment = 'DES="DES Lbl"';
    begin
    end;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants