Windows Terminal crashes on startup when background image is configured while using text cursor indicator accessibility option. #6494

Closed
opened 2026-01-31 00:40:15 +00:00 by claunia · 10 comments
Owner

Originally created by @mave-panda on GitHub (Feb 17, 2020).

Environment

Windows build number: 5.1.19564.1000
Windows Terminal version (if applicable): 0.9.433.0

Any other software? None

Steps to reproduce

Enable text cursor indicator via Settings, Ease of Access, Text cursor, Turn on text cursor indicator.

Configure background image via json file.

Run Windows Terminal.

Expected behavior

WIndows Terminal should start with the configured background image.

Actual behavior

Windows Terminal crashes on startup until the background image configuration is removed from the json file.

Originally created by @mave-panda on GitHub (Feb 17, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 5.1.19564.1000 Windows Terminal version (if applicable): 0.9.433.0 Any other software? None ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> Enable text cursor indicator via Settings, Ease of Access, Text cursor, Turn on text cursor indicator. Configure background image via json file. Run Windows Terminal. # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> WIndows Terminal should start with the configured background image. # Actual behavior <!-- What's actually happening? --> Windows Terminal crashes on startup until the background image configuration is removed from the json file.
Author
Owner

@zadjii-msft commented on GitHub (Feb 18, 2020):

@mave-panda just to confirm, if you set the same background image with the text cursor indicator disabled, the Terminal runs without crashing?

Could you share the image in question, and your profiles.json file?

@zadjii-msft commented on GitHub (Feb 18, 2020): @mave-panda just to confirm, if you set the same background image with the text cursor indicator disabled, the Terminal runs without crashing? Could you share the image in question, and your `profiles.json` file?
Author
Owner

@ghost commented on GitHub (Feb 22, 2020):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Feb 22, 2020): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@mave-panda commented on GitHub (Feb 25, 2020):

I just saw this in my bi-weekly junk mail crawl.

Yes, when removing the lines for the background image Terminal app no longer crashes.

full json file pasted below.

profiles json.zip

@mave-panda commented on GitHub (Feb 25, 2020): I just saw this in my bi-weekly junk mail crawl. Yes, when removing the lines for the background image Terminal app no longer crashes. full json file pasted below. [profiles json.zip](https://github.com/microsoft/terminal/files/4251695/profiles.json.zip)
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 25, 2020):

Excellent. Thanks!

/feedback

@DHowett-MSFT commented on GitHub (Feb 25, 2020): Excellent. Thanks! /feedback
Author
Owner

@ghost commented on GitHub (Feb 25, 2020):

Hi there!

Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?

Thanks!

image image

@ghost commented on GitHub (Feb 25, 2020): Hi there!<br><br>Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?<br><br>Thanks!<br><br>![image](https://user-images.githubusercontent.com/18221333/62478757-b69d0d00-b760-11e9-9626-1fa33c91e7c5.png) ![image](https://user-images.githubusercontent.com/18221333/62478649-6de55400-b760-11e9-806e-5aab7e085a9f.png)
Author
Owner
@mave-panda commented on GitHub (Feb 25, 2020): Submitted! [Windows Terminal crashes on startup when background image is configured while using text cursor indicator accessibility option.](https://aka.ms/AA7hos9)
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 25, 2020):

image

Having a look at the feedback item right now. Thanks!

@DHowett-MSFT commented on GitHub (Feb 25, 2020): ![image](https://user-images.githubusercontent.com/14316954/75291162-8db09800-57d6-11ea-923c-702a6680a98e.png) Having a look at the feedback item right now. Thanks!
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 25, 2020):

There's a chance that it's this code:

4def49c45e/src/cascadia/TerminalControl/TermControlAutomationPeer.cpp (L170-L179)

gsl::narrow is a throwing (or really, terminating) cast, and it looks like on occasion the bounding rectangle might evaluate to non-integral values. Since narrow validates that the values are identical despite being in different storage, 100.41 is no longer identical to 100 😁

What we really want is narrow_cast, which will truncate instead of exploding.

@DHowett-MSFT commented on GitHub (Feb 25, 2020): There's a chance that it's this code: https://github.com/microsoft/terminal/blob/4def49c45e25eab6e62c03cfee32401db47bbe95/src/cascadia/TerminalControl/TermControlAutomationPeer.cpp#L170-L179 `gsl::narrow` is a _throwing_ (or really, terminating) cast, and it looks like on occasion the bounding rectangle might evaluate to non-integral values. Since `narrow` validates that the values are identical despite being in different storage, `100.41` is no longer identical to `100` 😁 What we really want is `narrow_cast`, which will truncate instead of exploding.
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 25, 2020):

Unrelatedly, but for what it's worth: you have the huge settings file indicative of somebody who's been carrying it around since before v0.5. If you delete it and let WT recreate it, it will be infinitely better. It even has a place to store "default" settings that should apply to all of your profiles.

@DHowett-MSFT commented on GitHub (Feb 25, 2020): Unrelatedly, but for what it's worth: you have the huge settings file indicative of somebody who's been carrying it around since before v0.5. If you [delete it and let WT recreate it](https://www.hanselman.com/blog/NowIsTheTimeToMakeAFreshNewWindowsTerminalProfilesjson.aspx), it will be _infinitely better._ It even has a place to store "default" settings that should apply to all of your profiles.
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 25, 2020):

It will change your default key bindings from Ctrl+{W, T} to Ctrl+Shift, but that's a quick takeback if you'd prefer them on just Ctrl

@DHowett-MSFT commented on GitHub (Feb 25, 2020): It _will_ change your default key bindings from <kbd>Ctrl+{W, T}</kbd> to <kbd>Ctrl+Shift</kbd>, but that's a quick takeback if you'd prefer them on just <kbd>Ctrl</kbd>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6494