Extension host crashes with STATUS_STACK_BUFFER_OVERRUN (0xC0000409) when opening specific AL project

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When opening an AL (Business Central) project folder in Cursor IDE, the extension host process crashes repeatedly with Windows error code -1073740791 (STATUS_STACK_BUFFER_OVERRUN). This causes the error message “Extension host terminated unexpectedly 3 times within the last 5 minutes.”
A structurally identical AL project (Project1) with the same extensions, settings, and file types opens successfully without any crashes. Only Project2 exhibits this crash behavior.

Steps to Reproduce

Open Cursor IDE (version 2.4.35)
File > Open Folder…
Open the problematic AL project folder (Project2)
Wait for extensions to activate
Observe: Extension host crashes 3 times rapidly, then shows error dialog
Comparison test (works):
Open a different AL project folder (Project1) with identical structure and extensions
Observe: Opens successfully without crashes

Expected Behavior

The project should open without extension host crashes, similar to other structurally identical AL projects.

Operating System

Windows 10/11

Version Information

Version: 2.4.35 (system setup)
VSCode Version: 1.105.1
Commit: d2bf8ec12017b1049f304ad3a5c8867b117ed830
Date: 2026-02-10T02:46:56.793Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

/

For AI issues: add Request ID with privacy disabled

/

Additional Information

Cursor Version: 2.4.35 (commit d2bf8ec12017b1049f304ad3a5c8867b117ed830, x64)
Crash Details from main.log:
[error] [UtilityProcess id: 4, type: extensionHost, pid: XXXXX]: crashed with code -1073740791 and reason ‘crashed’[error] [UtilityProcess id: 7, type: extensionHost, pid: XXXXX]: crashed with code -1073740791 and reason ‘crashed’[error] [UtilityProcess id: 10, type: extensionHost, pid: XXXXX]: crashed with code -1073740791 and reason ‘crashed’
Error Code: -1073740791 = 0xC0000409 = STATUS_STACK_BUFFER_OVERRUN
This indicates stack corruption/buffer overrun in the extension host process.
Extension Activation Failures (from exthost.log):
Extension activation failure: davidfeldhoff.al-codeactionsExtension activation failure: rasmus.al-formatterExtension activation failure: rasmus.al-var-helperExtension activation failure: vjeko.vjeko-al-objidExtension activation failure: wbrakowski.al-navigator
Crash Timing Pattern:
The crash occurs shortly after ms-dynamics-smb.al (Microsoft AL Language extension) begins activating:
[info] ExtensionService#_doActivateExtension ms-dynamics-smb.al, startup: true[info] Extension host terminating: renderer closed the MessagePort[error] crashed with code -1073740791
Stack Trace from exthost.log:
[error] Canceled: Canceled at Object.deactivate (C:\Users<USER>.cursor\extensions\andrzejzwierzchowski.al-code-outline-16.78.0\out\extension.js:43:21) … vscode.executeDocumentSymbolProvider undefined
Installed AL Extensions:
ms-dynamics-smb.al (Microsoft AL Language)
andrzejzwierzchowski.al-code-outline v16.78.0
waldo.crs-al-language-extension
bartpermentier.al-toolbox
rvanbekkum.xliff-sync
vjeko.vjeko-al-objid
davidfeldhoff.al-codeactions
rasmus.al-formatter
rasmus.al-var-helper
jamespearson.al-test-runner
Project Comparison:
Property Crashes (Project2) Works (Project1)
AL Source Files ~190 ~240
BC Platform Version 26.0.0.0 26.0.0.0
Runtime 15.0 15.0
Same extensions.json Yes Yes
Same settings.json structure Yes Yes
Logs Location:
%APPDATA%\Cursor\logs<session>
Possible Root Causes
MS AL Language Extension (ms-dynamics-smb.al) - crashes happen during/after its activation
AL Code Outline Extension (andrzejzwierzchowski.al-code-outline) - error in deactivate function when host terminates
Project-specific AL code causing parser/symbol provider to crash with stack overflow
Cursor extension host process vulnerability to malformed extension responses
What I’ve Tried
Opening the same folder in VS Code (to verify if issue is Cursor-specific)
Opening a structurally identical AL project (works fine)
Both projects use identical recommended extensions

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report.

0xC0000409 is stack corruption in native code, most likely coming from ms-dynamics-smb.al (based on the timings in the logs).

A couple of questions to figure out whether this is a Cursor issue or extension-related:

  1. You mentioned you tried opening the same project in VS Code. Does it work there without crashing?
  2. Try opening the project with extensions disabled: cursor --disable-extensions. Does it still crash?

It’s also worth trying to delete the workspace storage for this project: %APPDATA%\Cursor\User\workspaceStorage (delete the folders related to Project2, Cursor will recreate them, make a backup first).

Let me know the results and I’ll escalate to the team if it’s Cursor-specific.

Hi Dean,

Thanks for the additional questions and information.

What I’ve done:
(When I mention a crash I mean the “Extension host termindated unexpectedly 3 times within the last 5 minutes.” shows up)

  1. 12/02/2026 installed cursor again from the website downloads.
    Tried again, still crashes for the same repo.

  2. Open in VSCode, same set of extensions: no crash

  3. Similar project, but in Cursor, same set of extensions: no crash

  4. Deleted the most recent workspacestorage folder for the project (checked the files in the folder to make sure it was that one since they are guids), still crashes.

  5. Installed new versions, available since today (13/02/2026)
    Still crashes for the same repo.
    Version: 2.4.36 (system setup)
    VSCode Version: 1.105.1
    Commit: f9919bf991f247689f9ead605b5c5a3239a2a790
    Date: 2026-02-12T21:00:33.976Z
    Build Type: Stable
    Release Track: Default
    Electron: 39.2.7
    Chromium: 142.0.7444.235
    Node.js: 22.21.1
    V8: 14.2.231.21-electron.0
    OS: Windows_NT x64 10.0.26200

  6. Checked the workspacestorage for any folders (also older ones) referring to the project and deleted those. Still crashes.

  7. Disabled the ms-dynamics-smb.al extension and checked the latest crash logs, might be on to something here:

    Timeline (08:54:50 → 08:54:52)

    1. 08:54:50.276 – Extension host starts for ProjectWithCrash\App.
    2. 08:54:50–52 – Eager extensions activate (no ms-dynamics-smb.al in the list):
      • anysphere.cursor-agent, cursor-agent-exec, cursor-always-local, cursor-polyfills-remote
      • vscode.git-base, vscode.git, vscode.github
      • stefanmaron.businesscentral-lintercop, wayou.vscode-todo-highlight
      • jamespearson.al-test-runner, nabsolutions.nab-al-tools, vjeko.vjeko-al-objid, waldo.crs-al-language-extension
      • rvanbekkum.xliff-sync, vscode.typescript-language-features
    3. 08:54:52.224 – Log: Eager extensions activated.
    4. 08:54:52.258 – Last successful activation: anysphere.cursor-agent-exec (took 1806 ms).
    5. 08:54:52.551Extension host terminates: “renderer closed the MessagePort” (pids 50368, 33152 exit with code 0 in the log; the actual crash is in main.log as -1073740791).

    So the crash happens ~300 ms after the last logged activation, still in the same extension host that had just finished eager activation.


    Conclusion from this log

    With ms-dynamics-smb.al disabled:

    • The last extension that completed activation before the crash is anysphere.cursor-agent-exec (Cursor built-in).
    • The crash occurs right after “Eager extensions activated” and that activation; there is no later _doActivateExtension for another extension before “Extension host terminating”.
    • So the trigger is either:
      • anysphere.cursor-agent-exec (or something it does right after activation), or
      • Another Cursor/IDE component that runs in the same window right after eager activation (e.g. file watcher or other built-in code), rather than another marketplace extension.

    That fits with main.log still showing extension host crash -1073740791 (STATUS_STACK_BUFFER_OVERRUN) and a separate file watcher crash -1073741819: the problem can be in Cursor’s own process or a built-in extension, not only in the AL extension.


    Conclusion:

    You can add something like:

    • With ms-dynamics-smb.al disabled, the same extension host crash still occurs when opening the same project.
    • In exthost.log, the last successful activation before “Extension host terminating” is anysphere.cursor-agent-exec; the crash happens ~300 ms later with no other extension activation in between.
    • Workspace in the log: b74efdf768d931f18843b20f2fe1f4f4 (folder: ProjectWithCrash\App).
  8. Cursor suggested disabling the cursor agent and cursor agent exec, did that for that repo, closed cursor, opened it again, but still crashed.
    Read and analyzed the new logs:
    New session: 20260213T090547

    main.log

    • 09:05:52.695 – Extension host pid 8640 crashed with code -1073740791 (STATUS_STACK_BUFFER_OVERRUN). Same crash as before.

    exthost.log (problematic project, workspace b74efdf768d931f18843b20f2fe1f4f4)

    With ms-dynamics-smb.al, cursor-agent, and cursor-agent-exec disabled:

    1. 09:05:50.514 – Extension host 8640 started for Dynavision Advanced Promotions\App.

    2. Eager and onStartupFinished extensions activate (no AL Language, no Cursor agent/agent-exec).

    3. 09:05:52.271 – _doActivateExtension alefragnani.project-manager

    4. 09:05:52.281 – _doActivateExtension eamodio.gitlens

    5. Then in quick succession: prettier, todo-tree, material-icon-theme, code-spell-checker, errorlens.

    6. 09:05:52.499–52.518 – “Extension activated success” only for: cursor-android, cursor-browser-automation, cursor-commits, cursor-deeplink, cursor-ios-simulator-connect.

    7. 09:05:53.107 – “Extension host terminating: renderer closed the MessagePort” (main.log shows the actual crash of pid 8640 at 09:05:52.695).

    So the crash happens during or right after the batch that starts with Project Manager and GitLens. There is no “Extension activated success” for:

    • alefragnani.project-manager

    • eamodio.gitlens

    • esbenp.prettier-vscode

    • Gruntfuggly.todo-tree

    • PKief.material-icon-theme

    • streetsidesoftware.code-spell-checker

    • usernamehw.errorlens

    So the failure occurs while one of these is activating (or in the ~180 ms after the last “activated success” we do see).

  9. So this seems like an endless circle of referring to the next extension that is not yet de-activated.
    Seems like the issue is just activating any extension.

  10. I cloned the repo on a new location on my PC and opened it in cursor:
    Crashes!
    This is worrying me, I was hoping a local file or setting or older metadata tied to the repo was causing the issue, but even in the new clone I cannot work on the app anymore in Cursor :frowning:

This issue can be closed, it was an issue with 1 extension after all.

This extension, combined with it’s settings, specific in that repo were causing the issue.

Thanks for your time.

running the bysect in cursor I was able to identify the extension after all.

Kind regards.
Seppe

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.