x-markdown - right click Select All crashes #22588

Open
opened 2026-01-31 08:17:47 +00:00 by claunia · 1 comment
Owner

Originally created by @DHowett on GitHub (Nov 25, 2024).

Originally assigned to: @lhecker on GitHub.

Steps to reproduce

Load up a markdown document in an x-markdown pane. Right click the body text and Select All.

Actual Behavior

It blow up

Originally created by @DHowett on GitHub (Nov 25, 2024). Originally assigned to: @lhecker on GitHub. ### Steps to reproduce Load up a markdown document in an `x-markdown` pane. Right click the body text and Select All. ### Actual Behavior It blow up
claunia added the Issue-BugProduct-TerminalArea-UserInterfaceSeverity-Crash labels 2026-01-31 08:17:48 +00:00
Author
Owner

@carlos-zamora commented on GitHub (Aug 20, 2025):

Confirmed that #18854 did not fix this crash, unfortunately

Getting the markdown pane to work was a little finicky, so here's some easy repro steps:

  1. Add this action to your settings.json:
        {
            "command": 
            {
                "action": "splitPane",
                "type": "x-markdown"
            },
            "id": "User.splitPane.3C8060F8"
        }
  1. Have a markdown file handy (I included a simple one here)
    markdown.md
  2. open markdown pane: Command Palette > "x-markdown" > invoke action
  3. Paste path to markdown file in pane (no quotes!)
  4. Press "load" button (first one to right of text box)
  5. right click body text > "Select All"

Stack:

 	KernelBase.dll!00007ffd68ea879a()	Unknown
 	[External Code]	
>	Microsoft.Terminal.UI.dll!winrt::throw_hresult(const winrt::hresult result, const std::source_location & sourceInformation) Line 5070	C++
 	Microsoft.Terminal.UI.dll!winrt::impl::consume_Windows_UI_Xaml_Controls_IRichTextBlock<winrt::Windows::UI::Xaml::Controls::IRichTextBlock>::SelectAll() Line 15533	C++
 	Microsoft.Terminal.UI.dll!winrt::Microsoft::Terminal::UI::implementation::TextMenuFlyout::SelectAll_Click(const winrt::Windows::Foundation::IInspectable & __formal, const winrt::Windows::UI::Xaml::RoutedEventArgs & __formal) Line 184	C++
 	Microsoft.Terminal.UI.dll!winrt::impl::delegate<winrt::Windows::UI::Xaml::RoutedEventHandler,`winrt::Windows::UI::Xaml::RoutedEventHandler::implementation<winrt::Microsoft::Terminal::UI::implementation::TextMenuFlyout,void (__cdecl winrt::Microsoft::Terminal::UI::implementation::TextMenuFlyout::*)(winrt::Windows::Foundation::IInspectable const &,winrt::Windows::UI::Xaml::RoutedEventArgs const &)>'::`1'::<lambda_181_>>::Invoke(void * sender, void * e) Line 4671	C++
 	[External Code]	
 	WindowsTerminal.exe!WindowEmperor::HandleCommandlineArgs(int nCmdShow) Line 494	C++
 	WindowsTerminal.exe!wWinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, wchar_t * __formal, int nCmdShow) Line 126	C++
 	[External Code]	

Hoping this makes it easier to debug for whoever comes along next 😊

@carlos-zamora commented on GitHub (Aug 20, 2025): Confirmed that #18854 did not fix this crash, unfortunately Getting the markdown pane to work was a little finicky, so here's some easy repro steps: 1. Add this action to your settings.json: ```js { "command": { "action": "splitPane", "type": "x-markdown" }, "id": "User.splitPane.3C8060F8" } ``` 2. Have a markdown file handy (I included a simple one here) [markdown.md](https://github.com/user-attachments/files/21906906/markdown.md) 3. open markdown pane: Command Palette > "x-markdown" > invoke action 4. Paste path to markdown file in pane (**no quotes!**) 5. Press "load" button (first one to right of text box) 6. right click body text > "Select All" Stack: ``` KernelBase.dll!00007ffd68ea879a() Unknown [External Code] > Microsoft.Terminal.UI.dll!winrt::throw_hresult(const winrt::hresult result, const std::source_location & sourceInformation) Line 5070 C++ Microsoft.Terminal.UI.dll!winrt::impl::consume_Windows_UI_Xaml_Controls_IRichTextBlock<winrt::Windows::UI::Xaml::Controls::IRichTextBlock>::SelectAll() Line 15533 C++ Microsoft.Terminal.UI.dll!winrt::Microsoft::Terminal::UI::implementation::TextMenuFlyout::SelectAll_Click(const winrt::Windows::Foundation::IInspectable & __formal, const winrt::Windows::UI::Xaml::RoutedEventArgs & __formal) Line 184 C++ Microsoft.Terminal.UI.dll!winrt::impl::delegate<winrt::Windows::UI::Xaml::RoutedEventHandler,`winrt::Windows::UI::Xaml::RoutedEventHandler::implementation<winrt::Microsoft::Terminal::UI::implementation::TextMenuFlyout,void (__cdecl winrt::Microsoft::Terminal::UI::implementation::TextMenuFlyout::*)(winrt::Windows::Foundation::IInspectable const &,winrt::Windows::UI::Xaml::RoutedEventArgs const &)>'::`1'::<lambda_181_>>::Invoke(void * sender, void * e) Line 4671 C++ [External Code] WindowsTerminal.exe!WindowEmperor::HandleCommandlineArgs(int nCmdShow) Line 494 C++ WindowsTerminal.exe!wWinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, wchar_t * __formal, int nCmdShow) Line 126 C++ [External Code] ``` Hoping this makes it easier to debug for whoever comes along next 😊
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22588