Terminal 1.6 bites the dust in High Contrast mode #12192

Closed
opened 2026-01-31 03:08:32 +00:00 by claunia · 7 comments
Owner

Originally created by @zadjii-msft on GitHub (Jan 25, 2021).

The original report had us dying immediately on launch. That stack looked like we'd die trying to initialize the command palette.

When I switched into HC mode, I got the following stack:

0:000> k
 # Child-SP          RetAddr               Call Site
00 000000d5`bd9cd380 00007ffe`5934b6b8     Microsoft_UI_Xaml!winrt::impl::consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>::Glyph+0x2b [C:\a\1\s\BuildOutput\Intermediates\x64\Microsoft.UI.Xaml\obj\Generated Files\winrt\Microsoft.UI.Xaml.Controls.h @ 4990] 
01 000000d5`bd9cd3c0 00007ffe`590ef76b     Microsoft_UI_Xaml!ProgressRing::OnForegroundColorPropertyChanged+0x28 [C:\a\1\s\dev\ProgressRing\ProgressRing.cpp @ 82] 
02 (Inline Function) --------`--------     Microsoft_UI_Xaml!winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Xaml::Controls::Control,winrt::Windows::UI::Xaml::Controls::FocusDisengagedEventArgs>::<lambda_85f2c4e39b149240244baf797ee82c3b>::operator()+0x1a [C:\a\1\s\BuildOutput\Intermediates\x64\Microsoft.UI.Xaml\obj\Generated Files\winrt\Windows.Foundation.h @ 2510] 
03 000000d5`bd9cd400 00007ffe`cb88e7e7     Microsoft_UI_Xaml!winrt::impl::delegate<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Xaml::Controls::Control,winrt::Windows::UI::Xaml::Controls::FocusDisengagedEventArgs>,<lambda_85f2c4e39b149240244baf797ee82c3b> >::Invoke+0x3b [C:\a\1\s\BuildOutput\Intermediates\x64\Microsoft.UI.Xaml\obj\Generated Files\winrt\Windows.Foundation.h @ 893] 
04 000000d5`bd9cd450 00007ffe`cb6f9e18     Windows_UI_Xaml!DirectUI::CEventSourceBase<DirectUI::IUntypedEventSource,Windows::UI::Xaml::IDependencyPropertyChangedCallback,Windows::UI::Xaml::IDependencyObject,Windows::UI::Xaml::IDependencyProperty>::Raise+0x14f [onecoreuap\windows\dxaml\xcp\dxaml\lib\JoltClasses.h @ 307] 
05 000000d5`bd9cd4c0 00007ffe`cb727972     Windows_UI_Xaml!DirectUI::DependencyObject::NotifyPropertyChanged+0x328 [onecoreuap\windows\dxaml\xcp\dxaml\lib\dependencyobject.cpp @ 2372] 
06 (Inline Function) --------`--------     Windows_UI_Xaml!DirectUI::DependencyObject::NotifyPropertyChanged+0x91 [onecoreuap\windows\dxaml\xcp\dxaml\lib\dependencyobject.cpp @ 2763] 
07 (Inline Function) --------`--------     Windows_UI_Xaml!CFxCallbacks::DependencyObject_NotifyPropertyChanged+0x91 [onecoreuap\windows\dxaml\xcp\dxaml\lib\fxcallbacks.cpp @ 698] 
08 (Inline Function) --------`--------     Windows_UI_Xaml!CDependencyObject::NotifyPropertyChanged+0xd1 [onecoreuap\windows\dxaml\xcp\core\core\elements\depends.cpp @ 2833] 
09 000000d5`bd9cd550 00007ffe`cb7280df     Windows_UI_Xaml!CDependencyObject::SetEffectiveValue+0x432 [onecoreuap\windows\dxaml\xcp\components\dependencyobject\propertysystem.cpp @ 1698] 
0a 000000d5`bd9cd6a0 00007ffe`cb72461b     Windows_UI_Xaml!CDependencyObject::UpdateEffectiveValue+0xdf [onecoreuap\windows\dxaml\xcp\components\dependencyobject\propertysystem.cpp @ 1979] 
0b 000000d5`bd9cd7c0 00007ffe`cb68047b     Windows_UI_Xaml!CDependencyObject::SetValue+0xab [onecoreuap\windows\dxaml\xcp\components\dependencyobject\propertysystem.cpp @ 1740] 
0c 000000d5`bd9cd840 00007ffe`cb693d53     Windows_UI_Xaml!CDependencyObject::SetThemeResourceBinding+0x14b [onecoreuap\windows\dxaml\xcp\components\dependencyobject\theming.cpp @ 379] 


Which looks like a crash in the Progress Ring. Yikes.

Originally created by @zadjii-msft on GitHub (Jan 25, 2021). The original report had us dying immediately on launch. That stack looked like we'd die trying to initialize the command palette. When I switched _into_ HC mode, I got the following stack: ``` 0:000> k # Child-SP RetAddr Call Site 00 000000d5`bd9cd380 00007ffe`5934b6b8 Microsoft_UI_Xaml!winrt::impl::consume_Microsoft_UI_Xaml_Controls_IRatingItemFontInfo<winrt::Microsoft::UI::Xaml::Controls::IRatingItemFontInfo>::Glyph+0x2b [C:\a\1\s\BuildOutput\Intermediates\x64\Microsoft.UI.Xaml\obj\Generated Files\winrt\Microsoft.UI.Xaml.Controls.h @ 4990] 01 000000d5`bd9cd3c0 00007ffe`590ef76b Microsoft_UI_Xaml!ProgressRing::OnForegroundColorPropertyChanged+0x28 [C:\a\1\s\dev\ProgressRing\ProgressRing.cpp @ 82] 02 (Inline Function) --------`-------- Microsoft_UI_Xaml!winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Xaml::Controls::Control,winrt::Windows::UI::Xaml::Controls::FocusDisengagedEventArgs>::<lambda_85f2c4e39b149240244baf797ee82c3b>::operator()+0x1a [C:\a\1\s\BuildOutput\Intermediates\x64\Microsoft.UI.Xaml\obj\Generated Files\winrt\Windows.Foundation.h @ 2510] 03 000000d5`bd9cd400 00007ffe`cb88e7e7 Microsoft_UI_Xaml!winrt::impl::delegate<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Xaml::Controls::Control,winrt::Windows::UI::Xaml::Controls::FocusDisengagedEventArgs>,<lambda_85f2c4e39b149240244baf797ee82c3b> >::Invoke+0x3b [C:\a\1\s\BuildOutput\Intermediates\x64\Microsoft.UI.Xaml\obj\Generated Files\winrt\Windows.Foundation.h @ 893] 04 000000d5`bd9cd450 00007ffe`cb6f9e18 Windows_UI_Xaml!DirectUI::CEventSourceBase<DirectUI::IUntypedEventSource,Windows::UI::Xaml::IDependencyPropertyChangedCallback,Windows::UI::Xaml::IDependencyObject,Windows::UI::Xaml::IDependencyProperty>::Raise+0x14f [onecoreuap\windows\dxaml\xcp\dxaml\lib\JoltClasses.h @ 307] 05 000000d5`bd9cd4c0 00007ffe`cb727972 Windows_UI_Xaml!DirectUI::DependencyObject::NotifyPropertyChanged+0x328 [onecoreuap\windows\dxaml\xcp\dxaml\lib\dependencyobject.cpp @ 2372] 06 (Inline Function) --------`-------- Windows_UI_Xaml!DirectUI::DependencyObject::NotifyPropertyChanged+0x91 [onecoreuap\windows\dxaml\xcp\dxaml\lib\dependencyobject.cpp @ 2763] 07 (Inline Function) --------`-------- Windows_UI_Xaml!CFxCallbacks::DependencyObject_NotifyPropertyChanged+0x91 [onecoreuap\windows\dxaml\xcp\dxaml\lib\fxcallbacks.cpp @ 698] 08 (Inline Function) --------`-------- Windows_UI_Xaml!CDependencyObject::NotifyPropertyChanged+0xd1 [onecoreuap\windows\dxaml\xcp\core\core\elements\depends.cpp @ 2833] 09 000000d5`bd9cd550 00007ffe`cb7280df Windows_UI_Xaml!CDependencyObject::SetEffectiveValue+0x432 [onecoreuap\windows\dxaml\xcp\components\dependencyobject\propertysystem.cpp @ 1698] 0a 000000d5`bd9cd6a0 00007ffe`cb72461b Windows_UI_Xaml!CDependencyObject::UpdateEffectiveValue+0xdf [onecoreuap\windows\dxaml\xcp\components\dependencyobject\propertysystem.cpp @ 1979] 0b 000000d5`bd9cd7c0 00007ffe`cb68047b Windows_UI_Xaml!CDependencyObject::SetValue+0xab [onecoreuap\windows\dxaml\xcp\components\dependencyobject\propertysystem.cpp @ 1740] 0c 000000d5`bd9cd840 00007ffe`cb693d53 Windows_UI_Xaml!CDependencyObject::SetThemeResourceBinding+0x14b [onecoreuap\windows\dxaml\xcp\components\dependencyobject\theming.cpp @ 379] ``` Which looks like a crash in the Progress Ring. Yikes.
Author
Owner

@zadjii-msft commented on GitHub (Jan 25, 2021):

diff --git a/src/cascadia/TerminalApp/CommandPalette.xaml b/src/cascadia/TerminalApp/CommandPalette.xaml
index 1926b1b0c..314ad10e8 100644
--- a/src/cascadia/TerminalApp/CommandPalette.xaml
+++ b/src/cascadia/TerminalApp/CommandPalette.xaml
@@ -132,7 +132,7 @@ the MIT License. See LICENSE in the project root for license information. -->
                     <Style x:Key="KeyChordTextBlockStyle" TargetType="TextBlock"/>

                     <!--  ParsedCommandLineText styles (use XAML defaults for High Contrast theme) -->
-                    <Style x:Key="ParsedCommandLineBoderStyle" TargetType="Border"/>
+                    <Style x:Key="ParsedCommandLineBorderStyle" TargetType="Border"/>
                     <Style x:Key="ParsedCommandLineTextBlockStyle" TargetType="TextBlock"/>
                 </ResourceDictionary>
             </ResourceDictionary.ThemeDictionaries>

ho boy

@zadjii-msft commented on GitHub (Jan 25, 2021): ```diff diff --git a/src/cascadia/TerminalApp/CommandPalette.xaml b/src/cascadia/TerminalApp/CommandPalette.xaml index 1926b1b0c..314ad10e8 100644 --- a/src/cascadia/TerminalApp/CommandPalette.xaml +++ b/src/cascadia/TerminalApp/CommandPalette.xaml @@ -132,7 +132,7 @@ the MIT License. See LICENSE in the project root for license information. --> <Style x:Key="KeyChordTextBlockStyle" TargetType="TextBlock"/> <!-- ParsedCommandLineText styles (use XAML defaults for High Contrast theme) --> - <Style x:Key="ParsedCommandLineBoderStyle" TargetType="Border"/> + <Style x:Key="ParsedCommandLineBorderStyle" TargetType="Border"/> <Style x:Key="ParsedCommandLineTextBlockStyle" TargetType="TextBlock"/> </ResourceDictionary> </ResourceDictionary.ThemeDictionaries> ``` ho boy
Author
Owner

@Don-Vito commented on GitHub (Jan 25, 2021):

@zadjii-msft - explain what have I done 😢

@Don-Vito commented on GitHub (Jan 25, 2021): @zadjii-msft - explain what have I done 😢
Author
Owner

@zadjii-msft commented on GitHub (Jan 25, 2021):

I don't know for sure which key it is, but this one caught my eye. In light and dark mode, this key is ParsedCommandLineBorderStyle. However, in main, this key is ParsedCommandLineBoderStyle. I'm thinking this typo is causing the Terminal to crash on launch. I think it tries to look up ParsedCommandLineBorderStyle for the given theme, and doesn't find it in HighContrast, and dies immediately.

Gotta spin a build to see if that fixes it...

@zadjii-msft commented on GitHub (Jan 25, 2021): I don't know for sure which key it is, but this one caught my eye. In light and dark mode, this key is `ParsedCommandLineBorderStyle`. However, in `main`, this key is `ParsedCommandLineBoderStyle`. I'm thinking this typo is causing the Terminal to crash on launch. I think it tries to look up `ParsedCommandLineBorderStyle` for the given theme, and doesn't find it in HighContrast, and dies immediately. Gotta spin a build to see if that fixes it...
Author
Owner

@Don-Vito commented on GitHub (Jan 25, 2021):

@zadjii-msft - sorry. I am fixing and testing this.

@Don-Vito commented on GitHub (Jan 25, 2021): @zadjii-msft - sorry. I am fixing and testing this.
Author
Owner

@zadjii-msft commented on GitHub (Jan 25, 2021):

Yep that fixes it.
image

@zadjii-msft commented on GitHub (Jan 25, 2021): Yep that fixes it. ![image](https://user-images.githubusercontent.com/18356694/105774406-d44ccc00-5f2a-11eb-9966-44877684fa38.png)
Author
Owner

@Don-Vito commented on GitHub (Jan 25, 2021):

So do you want me to issue the PR and you will review https://github.com/microsoft/terminal/pull/8885 meanwhile 😄

@Don-Vito commented on GitHub (Jan 25, 2021): So do you want me to issue the PR and you will review https://github.com/microsoft/terminal/pull/8885 meanwhile :smile:
Author
Owner

@zadjii-msft commented on GitHub (Jan 25, 2021):

Haha sure 😉

@zadjii-msft commented on GitHub (Jan 25, 2021): Haha sure 😉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12192