Out Of Memory (OOM) Error Opening AL Project Folder
Please include the following with each issue:
1. Describe the bug
When opening an AL project folder I receive the following error:
Using Help: Start Extension Bisect I was able to narrow down the issue to the AL Language Extension for Microsoft Dynamics 365 Business Central:
In an attempt to clear any cache files causing issues I deleted all files in the following folders:
C:\Users\%USERPROFILE%\AppData\Roaming\Code\CacheC:\Users\%USERPROFILE%\AppData\Roaming\Code\CachedDataC:\Users\%USERPROFILE%\AppData\Roaming\Code\CachedExtensionsC:\Users\%USERPROFILE%\AppData\Roaming\Code\CachedExtensionVSIXsC:\Users\%USERPROFILE%\AppData\Roaming\Code\Code Cache
Inside of C:\Users\%USERPROFILE%\AppData\Roaming\Code\Crashpad\reports I found a series of DMPs. I attached two different files that were generated during the crashes so that you may review.
05a1701c-56fc-4e52-b120-b5bef21dd499.dmp
3b91a8f1-354f-4a3c-a007-2a3f110879b8.dmp
2. To Reproduce Steps to reproduce the behavior:
- Open Visual Studio Code
- Press
Ctrl+K,Ctrl+Oto open the target folder - Wait ~3 seconds
- OOM Error is produced
3. Expected behavior I would expect that I am able to open and load my AL project, allowing me to benefit from IntelliSense, code completion, and other features of the AL extension.
4. Actual behavior
Instead, within ~3 seconds of opening the AL project Visual Studio Code freezes and provides the following error:
5. Versions:
- AL Language: 13.0.1027618
- Visual Studio Code: 1.90.0
- Business Central: 24.0.18037.0
- List of Visual Studio Code extensions that you have installed:
- AL Language Extension for Microsoft Dynamics 365 Business Central
Final Checklist
Please remember to do the following:
-
[x] Search the issue repository to ensure you are reporting a new issue
-
[x] Reproduce the issue after disabling all extensions except the AL Language extension
-
[ ] Simplify your code around the issue to better isolate the problem
To help us investigate this, can you answer the following?
- Does this reproduce on a specific project/workspace, or all projects?
- If it is a specific project, is it particularly large? What is the estimate of the number of application objects in the project?
- Do you have a minimal repro project that you can share?
- What settings have you enabled for the extension in your settings.json?
- Can you share the verbose telemetry logs? To do that, do the following:
- In your VSCode settings.json, set
"al.editorServicesLogLevel": "Verbose"- Reproduce the scenario
- Under the path
C:\Users\<username>\.vscode\extensions\ms-dynamics-smb.al-<version>\bin\win32, collect theeditorservice.loganddebuggerservices.logfiles.
Answers to questions below:
- This is currently only an issue for one project
- Project is fairly large with 679 total objects, total project size (including
.appdependencies) is 68.2 MB. However, I can successfully open the Base App project (version 23.0.12034.12841) from the DVD without any issues. The Base App is 8363 total objects, total project size (including.appdependencies) is 367 MB). I can open other custom projects and Microsoft projects with various sizes and total objects without issue. - I don't think I have a way to share the project with you, however I did just copy the project to a different location on my C drive and the project loaded successfully when opened via VSCode. Would you have a suggestion based upon that scenario?
- The following settings are enabled for the extension:
- Attached the
EditorServices.logbut adebuggerservices.logwas not generated upon reproducing the error (see below)
Sorry for taking a long time to get back to this. Based on your response, it's hard for us to investigate this further without getting a dump file or loading the project in a debug build of the compiler to see what exactly is consuming all the memory. That it works when loaded from a different location on the drive is also really weird, and I'm not sure why that would change things.
To proceed, I think the best thing to do is to move this to a support case. It doesn't seem to be a general issue with the compiler, so we can't address this in the limited capacity that we have for Github issues. With a support case we'll have a bit more bandwidth, and we'd be able to receive the project for additional investigation too.
Hey, no worries. I was able to get around this issue by deleting my entire repo directory and re-cloning it from Azure DevOps. This resolved the issue for me and it has not come up since, so I have no way to reproduce it for a support case. I spoke with another developer on my team and they suspected it was an issue with git, but it was just a guess. I think this issue can be closed if that's okay, and if it comes up again I can create a support ticket through normal channels. Thanks!