Settings reload causes occasional crash in SUI #12722

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

Originally created by @DHowett on GitHub (Feb 24, 2021).

Originally assigned to: @carlos-zamora on GitHub.

It looks like manipulating the Navigation View's menu still wigs it out a bit.

08 (Inline Function) --------`--------     Microsoft_Terminal_Settings_Editor!winrt::check_hresult+0xb [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\base.h @ 4825] 
09 (Inline Function) --------`--------     Microsoft_Terminal_Settings_Editor!winrt::impl::consume_Windows_Foundation_Collections_IVector<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>,winrt::Windows::Foundation::IInspectable>::ReplaceAll+0x4f [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\Windows.Foundation.Collections.h @ 247] 
0a 00000068`690fefd0 00007ff8`83d99611     Microsoft_Terminal_Settings_Editor!winrt::Microsoft::Terminal::Settings::Editor::implementation::MainPage::UpdateSettings$_ResumeCoro$1+0xafd [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\MainPage.cpp @ 117] 
0b (Inline Function) --------`--------     Microsoft_Terminal_Settings_Editor!std::experimental::coroutine_handle<void>::resume+0xd [C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29333\include\experimental\coroutine @ 107] 
0c (Inline Function) --------`--------     Microsoft_Terminal_Settings_Editor!std::experimental::coroutine_handle<void>::operator()+0xd [C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29333\include\experimental\coroutine @ 99] 
0d (Inline Function) --------`--------     Microsoft_Terminal_Settings_Editor!winrt::resume_foreground::__l2::awaitable::await_suspend::__l2::<lambda_2ab9998b3c4eacdb9b89a7a0699bc21a>::operator()+0xd [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\Windows.UI.Core.h @ 3326] 
0e 00000068`690ff390 00007ff8`acb454a8     Microsoft_Terminal_Settings_Editor!winrt::impl::delegate<winrt::Windows::UI::Core::DispatchedHandler,<lambda_2ab9998b3c4eacdb9b89a7a0699bc21a> >::Invoke+0x11 [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\Windows.UI.Core.h @ 1277] 
0f 00000068`690ff3c0 00007ff8`acb0505f     Windows_UI!CreateControlInput+0x1a658
Originally created by @DHowett on GitHub (Feb 24, 2021). Originally assigned to: @carlos-zamora on GitHub. It looks like manipulating the Navigation View's menu still wigs it out a bit. ``` 08 (Inline Function) --------`-------- Microsoft_Terminal_Settings_Editor!winrt::check_hresult+0xb [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\base.h @ 4825] 09 (Inline Function) --------`-------- Microsoft_Terminal_Settings_Editor!winrt::impl::consume_Windows_Foundation_Collections_IVector<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable>,winrt::Windows::Foundation::IInspectable>::ReplaceAll+0x4f [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\Windows.Foundation.Collections.h @ 247] 0a 00000068`690fefd0 00007ff8`83d99611 Microsoft_Terminal_Settings_Editor!winrt::Microsoft::Terminal::Settings::Editor::implementation::MainPage::UpdateSettings$_ResumeCoro$1+0xafd [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\MainPage.cpp @ 117] 0b (Inline Function) --------`-------- Microsoft_Terminal_Settings_Editor!std::experimental::coroutine_handle<void>::resume+0xd [C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29333\include\experimental\coroutine @ 107] 0c (Inline Function) --------`-------- Microsoft_Terminal_Settings_Editor!std::experimental::coroutine_handle<void>::operator()+0xd [C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29333\include\experimental\coroutine @ 99] 0d (Inline Function) --------`-------- Microsoft_Terminal_Settings_Editor!winrt::resume_foreground::__l2::awaitable::await_suspend::__l2::<lambda_2ab9998b3c4eacdb9b89a7a0699bc21a>::operator()+0xd [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\Windows.UI.Core.h @ 3326] 0e 00000068`690ff390 00007ff8`acb454a8 Microsoft_Terminal_Settings_Editor!winrt::impl::delegate<winrt::Windows::UI::Core::DispatchedHandler,<lambda_2ab9998b3c4eacdb9b89a7a0699bc21a> >::Invoke+0x11 [E:\BA\271\s\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\Windows.UI.Core.h @ 1277] 0f 00000068`690ff3c0 00007ff8`acb0505f Windows_UI!CreateControlInput+0x1a658 ```
Author
Owner

@DHowett commented on GitHub (Feb 24, 2021):

Pointed-to line:

image

@DHowett commented on GitHub (Feb 24, 2021): Pointed-to line: ![image](https://user-images.githubusercontent.com/189190/109066216-9665d380-76a1-11eb-9952-ab03b7878733.png)
Author
Owner

@DHowett commented on GitHub (Feb 26, 2021):

Marked for 1.8 -- @carlos-zamora FYI. Not so you fix it, just so you know I took Triage off. 😄

@DHowett commented on GitHub (Feb 26, 2021): Marked for 1.8 -- @carlos-zamora FYI. Not so you fix it, just so you know I took Triage off. :smile:
Author
Owner

@carlos-zamora commented on GitHub (Mar 2, 2021):

@DHowett Did you have a repro for this?

@carlos-zamora commented on GitHub (Mar 2, 2021): @DHowett Did you have a repro for this?
Author
Owner

@DHowett commented on GitHub (Mar 4, 2021):

SURE DO!

PowerShell:

while($true){sleep 0.5; touch $Env:LOCALAPPDATA\packages\WindowsTerminalDev_8wekyb3d8bbwe\localstate\settings.json }

that will reload your settings EVERY 0.5 SECONDS. Keep the SUI open and navigate it.

@DHowett commented on GitHub (Mar 4, 2021): SURE DO! PowerShell: ```powershell while($true){sleep 0.5; touch $Env:LOCALAPPDATA\packages\WindowsTerminalDev_8wekyb3d8bbwe\localstate\settings.json } ``` that will reload your settings EVERY 0.5 SECONDS. Keep the SUI open and navigate it.
Author
Owner

@carlos-zamora commented on GitHub (Mar 10, 2021):

Some notes from looking into this a bit:

touch isn't actually a cmdlet (it's installed by yori, it seems). Instead I can use the powershell command below to append a space to the end of the settings.json. It's annoying to deal with the extra spaces, but not the end of the world.

while($true){sleep 0.5; Add-Content $Env:LOCALAPPDATA\packages\WindowsTerminalDev_8wekyb3d8bbwe\localstate\settings.json " " }

Working branch: dev/cazamor/sui/bugfix-reload-crash

For whatever reason, ReplaceAll keeps failing. It looks like it's because menuItems is null? But I've added checks for nullness everywhere (including right before the ReplaceAll call) and no luck. I'll try looking into this a bit more later because I'm just annoyed with it now haha.

@carlos-zamora commented on GitHub (Mar 10, 2021): Some notes from looking into this a bit: `touch` isn't actually a cmdlet (it's installed by yori, it seems). Instead I can use the powershell command below to append a space to the end of the settings.json. It's annoying to deal with the extra spaces, but not the end of the world. ```powershell while($true){sleep 0.5; Add-Content $Env:LOCALAPPDATA\packages\WindowsTerminalDev_8wekyb3d8bbwe\localstate\settings.json " " } ``` Working branch: dev/cazamor/sui/bugfix-reload-crash For whatever reason, `ReplaceAll` keeps failing. It looks like it's because `menuItems` is null? But I've added checks for nullness everywhere (including right before the `ReplaceAll` call) and no luck. I'll try looking into this a bit more later because I'm just annoyed with it now haha.
Author
Owner

@ghost commented on GitHub (Jul 14, 2021):

:tada:This issue was addressed in #10390, which has now been successfully released as Windows Terminal v1.9.1942.0.🎉

Handy links:

@ghost commented on GitHub (Jul 14, 2021): :tada:This issue was addressed in #10390, which has now been successfully released as `Windows Terminal v1.9.1942.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.9.1942.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Jul 14, 2021):

:tada:This issue was addressed in #10390, which has now been successfully released as Windows Terminal Preview v1.10.1933.0.🎉

Handy links:

@ghost commented on GitHub (Jul 14, 2021): :tada:This issue was addressed in #10390, which has now been successfully released as `Windows Terminal Preview v1.10.1933.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.10.1933.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?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#12722