Skip to content

Duplicate remainingProfiles in newTabMenu causes crash (Access Violation in Settings.Model.dll) #20124

@frstlvl

Description

@frstlvl

Windows Terminal version

1.24.10921.0

Windows build number

10.0.26200.8246

Other Software

N/A - this is a settings parser issue, no other software involved

Steps to reproduce

  1. Open %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
  2. Add a newTabMenu folder entry containing two consecutive {"type": "remainingProfiles"} entries:
"newTabMenu": [
    {
        "allowEmpty": false,
        "entries": [
            {"icon": null, "profile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "type": "profile"},
            {"type": "remainingProfiles"},
            {"type": "remainingProfiles"}
        ],
        "icon": null,
        "inline": "never",
        "name": "Other",
        "type": "folder"
    }
]
  1. Save and launch wt.exe

Expected Behavior

Terminal should either ignore the duplicate remainingProfiles entry and launch normally, or display a settings validation error and fall back to default settings (like it does for JSON syntax errors).

Actual Behavior

Terminal crashes silently on every launch attempt. No error dialog is shown. Running wt.exe from cmd.exe produces no output. The process starts briefly then terminates.

Event Viewer shows:

Faulting module: Microsoft.Terminal.Settings.Model.dll (version 1.24.2604.2001)
Exception code: 0xc0000005 (Access Violation)
Fault offset: 0x0000000000137e1b

The crash occurs at the same offset every time, consistent with a null pointer dereference in the settings model parser.

Root cause was isolated by binary-search bisection of settings.json -- all other sections (profiles, actions, keybindings, schemes, top-level settings) work fine. Only the duplicate remainingProfiles triggers the crash.

The duplicate entry was introduced through the Windows Terminal settings UI while configuring the newTabMenu folder structure. This means the UI itself generates a configuration that crashes the parser on next launch, with no way to recover except manually editing settings.json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions