[1.21.921] Session persistence will crash the Terminal if you've got uninitialized panes #21464

Closed
opened 2026-01-31 07:45:27 +00:00 by claunia · 0 comments
Owner

Originally created by @zadjii-msft on GitHub (Apr 2, 2024).

Originally assigned to: @zadjii-msft on GitHub.

  • Make sure you've got session restore enabled.
  • quit the terminal with all your tabs and panes and stuff. I had a pane that was zoomed, and two windows.
  • install 1.21.921 because you're super excited for buffer restore
  • open the Terminal.
  • Immediately quit it, so you can see buffer restore in action
  • 💥

Stack is

[0x0]   Microsoft_Terminal_Control!TextBuffer::GetSize+0x4   0x8d070fe1d0   0x7ff9d62be272   
[0x1]   Microsoft_Terminal_Control!TextBuffer::GetLastNonSpaceCharacter+0x2a   0x8d070fe1f0   0x7ff9d6357cd8   
[0x2]   Microsoft_Terminal_Control!TextBuffer::Serialize+0xe8   0x8d070fe230   0x7ff9d63b2155   
[0x3]   Microsoft_Terminal_Control!Microsoft::Terminal::Core::Terminal::SerializeMainBuffer+0xf   0x8d070fe440   0x7ff9d63b209f   
[0x4]   Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::PersistToPath+0x3a   0x8d070fe440   0x7ff9d63b209f   
[0x5]   Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::TermControl::PersistToPath+0x6d   0x8d070fe440   0x7ff9d63b209f   

In this case, a pane wasn't activated, so the core was never initialized, so the buffer was never instantiated.

Originally created by @zadjii-msft on GitHub (Apr 2, 2024). Originally assigned to: @zadjii-msft on GitHub. * Make sure you've got session restore enabled. * quit the terminal with all your tabs and panes and stuff. I had a pane that was zoomed, and two windows. * install 1.21.921 because you're super excited for buffer restore * open the Terminal. * Immediately quit it, so you can see buffer restore in action * 💥 Stack is ``` [0x0] Microsoft_Terminal_Control!TextBuffer::GetSize+0x4 0x8d070fe1d0 0x7ff9d62be272 [0x1] Microsoft_Terminal_Control!TextBuffer::GetLastNonSpaceCharacter+0x2a 0x8d070fe1f0 0x7ff9d6357cd8 [0x2] Microsoft_Terminal_Control!TextBuffer::Serialize+0xe8 0x8d070fe230 0x7ff9d63b2155 [0x3] Microsoft_Terminal_Control!Microsoft::Terminal::Core::Terminal::SerializeMainBuffer+0xf 0x8d070fe440 0x7ff9d63b209f [0x4] Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::PersistToPath+0x3a 0x8d070fe440 0x7ff9d63b209f [0x5] Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::TermControl::PersistToPath+0x6d 0x8d070fe440 0x7ff9d63b209f ``` In this case, a pane wasn't activated, so the core was never initialized, so the buffer was never instantiated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21464