Crashes when a custom scaling size is set #5257

Open
opened 2026-01-31 00:08:53 +00:00 by claunia · 0 comments
Owner

Originally created by @alostsock on GitHub (Nov 27, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.19033.1]
Windows Terminal version (if applicable): 0.7.3291.0, also built from master (7bcb060)

Steps to reproduce

  1. Set a custom scaling factor in Settings > System > Display > "Advanced scaling settings", for example:

image

  1. Start the terminal

Expected behavior

The terminal should start

Actual behavior

The terminal crashes almost immediately after loading a blank screen.

In trying to fix this I've reinstalled and also removed profiles.json to get a fresh one. Afterwards I attempted to debug, and got the following call stack:

TerminalControl.dll!gsl::details::terminate() Line 127	C++
TerminalControl.dll!gsl::details::throw_exception<gsl::narrowing_error>(gsl::narrowing_error && __formal) Line 136	C++
TerminalControl.dll!gsl::narrow<float,double>(double u) Line 126	C++
TerminalControl.dll!ScaleRect(winrt::Windows::Foundation::Rect rect, double scale) Line 31	C++
TerminalControl.dll!winrt::Microsoft::Terminal::TerminalControl::implementation::TSFInputControl::_layoutRequestedHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextLayoutRequestedEventArgs & args) Line 164	C++

Based on this I realized my display's scaling factor had been set to a custom value (115% or something). I changed it back to the default 100% and it started fine.

Feedback Hub link: https://aka.ms/AA6q09q

Originally created by @alostsock on GitHub (Nov 27, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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: Microsoft Windows [Version 10.0.19033.1] Windows Terminal version (if applicable): 0.7.3291.0, also built from master (7bcb060) ``` # Steps to reproduce 1. Set a custom scaling factor in Settings > System > Display > "Advanced scaling settings", for example: > ![image](https://user-images.githubusercontent.com/49344439/69740352-3df2ff80-1107-11ea-8b9b-f126be0f22bc.png) 2. Start the terminal # Expected behavior The terminal should start # Actual behavior The terminal crashes almost immediately after loading a blank screen. In trying to fix this I've reinstalled and also removed profiles.json to get a fresh one. Afterwards I attempted to debug, and got the following call stack: ``` TerminalControl.dll!gsl::details::terminate() Line 127 C++ TerminalControl.dll!gsl::details::throw_exception<gsl::narrowing_error>(gsl::narrowing_error && __formal) Line 136 C++ TerminalControl.dll!gsl::narrow<float,double>(double u) Line 126 C++ TerminalControl.dll!ScaleRect(winrt::Windows::Foundation::Rect rect, double scale) Line 31 C++ TerminalControl.dll!winrt::Microsoft::Terminal::TerminalControl::implementation::TSFInputControl::_layoutRequestedHandler(winrt::Windows::UI::Text::Core::CoreTextEditContext sender, const winrt::Windows::UI::Text::Core::CoreTextLayoutRequestedEventArgs & args) Line 164 C++ ``` Based on this I realized my display's scaling factor had been set to a custom value (115% or something). I changed it back to the default 100% and it started fine. Feedback Hub link: https://aka.ms/AA6q09q
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5257