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

Created on 17 Feb 2020  路  10Comments  路  Source: microsoft/terminal

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.

Area-TerminalControl Issue-Bug Needs-Tag-Fix Priority-1 Product-Terminal Resolution-Fix-Committed Severity-Crash

All 10 comments

@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?

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.

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

Excellent. Thanks!

/feedback

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

image

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

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings