Bug Report: Invalid string for Icon in profile causes a crash #1977

Closed
opened 2026-01-30 22:43:18 +00:00 by claunia · 2 comments
Owner

Originally created by @Cazzar on GitHub (Jun 23, 2019).

Environment

Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version (if applicable): 0.2.1715.0

Steps to reproduce

Create a profile in Terminals profiles.json with an empty string as the icon option.

Example profile:

        {
            "closeOnExit" : true,
            "commandline" : "cmd",
            "cursorShape" : "bar",
            "guid" : "{3e9d9e33-52e5-496b-b999-178b0cdc0f86}",
            "icon" : null,
            "name" : "Example"
        }

Expected behavior

When an empty string is provided, it should take the same path if the icon value was null or invalid falling back to no icon at all.

Actual behavior

This will cause terminal to crash if open once profiles.json is saved, and subsequently crash on launch.

Originally created by @Cazzar on GitHub (Jun 23, 2019). # Environment ```none Microsoft Windows [Version 10.0.18362.175] Windows Terminal version (if applicable): 0.2.1715.0 ``` # Steps to reproduce Create a profile in Terminals `profiles.json` with an empty string as the `icon` option. Example profile: ```json { "closeOnExit" : true, "commandline" : "cmd", "cursorShape" : "bar", "guid" : "{3e9d9e33-52e5-496b-b999-178b0cdc0f86}", "icon" : null, "name" : "Example" } ``` # Expected behavior When an empty string is provided, it should take the same path if the icon value was null or invalid falling back to no icon at all. # Actual behavior This will cause terminal to crash if open once `profiles.json` is saved, and subsequently crash on launch.
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 26, 2019):

When we fix this, let's also expand environment variables.

@DHowett-MSFT commented on GitHub (Jun 26, 2019): When we fix this, let's also expand environment variables.
Author
Owner

@ghost commented on GitHub (Aug 3, 2019):

:tada:This issue was addressed in #2050, which has now been successfully released as Windows Terminal Preview v0.3.2142.0.🎉

Handy links:

@ghost commented on GitHub (Aug 3, 2019): :tada:This issue was addressed in #2050, which has now been successfully released as `Windows Terminal Preview v0.3.2142.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.3.2142.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1977