al-code-outline icon indicating copy to clipboard operation
al-code-outline copied to clipboard

AL Language Server Crashing - temp-al-proxy.al

Open pri-kise opened this issue 3 years ago • 2 comments

There are some issues on the AL Repository about the language server keeps crashing, that are related to a file called temp-al-proxy.al.

07/14/2022 15:52:56 [/8] Content starting at line 0 ending at line 7 is an invalid text update for document c:/Users/username/source/AL/ALProject1/MainApp/.vscode/temp-al-proxy.al. 07/14/2022 15:52:56 [/8] Processing textDocument/didChange took 0,0003171 seconds

I don't know for sure if your extension is causing this issue, but you can have a look at it. https://github.com/microsoft/AL/issues/6748

pri-kise avatar Jul 14 '22 14:07 pri-kise

Update: @anzwdev This problem does only occure with workspaces. e.g. MainApp and TestApp, while downloading symbols for the first time for the MainApp

pri-kise avatar Jul 19 '22 11:07 pri-kise

ALProject1.zip Here is an example project. Steps to reproduce:

  1. Open the Workspace.
  2. Add a launch.json in the .vscode folder of the MainApp Folder
  3. Try Download for the the first time. (Optionally ad set the EditorLog of the AL Language Extension to Verbose)

pri-kise avatar Jul 21 '22 06:07 pri-kise

I've removed the last one remaining reference to the procedure that uses "temp-al-proxy.al" file from the extension and marked the procedure as "deprecated". It was just in one place - interface wizard was using it to get list of public codeunit methods. My extension no longer uses it anywhere, but I made additional investigation and found that "al-navigator" extension calls it to get list of available objects. I don't want to break any other extensions that have dependency to mine, so I have to keep the method in the code. The change will be available in the next release.

anzwdev avatar Dec 19 '22 17:12 anzwdev