Comments (5)
This is a conpty issue - it doesn't occur in conhost/openconsole. What's meant to be happening is the cursor should move to the next line when you type a character on the last column of the page. Powershell actually makes a SetConsoleCursorPosition
call to move it there - that just doesn't get translated correctly by conpty.
I think it may have to do with the vtengine's understanding of the WasWrapForced
flag. We're using that to determine the lineWrapped
state here:
terminal/src/renderer/base/renderer.cpp
Lines 746 to 751 in 67ae9f6
Which in turn sets the _wrappedRow
property here:
terminal/src/renderer/vt/paint.cpp
Lines 611 to 621 in 67ae9f6
Which concludes with us determining that the line was already wrapped by the text output, so there is no need to move the cursor.
terminal/src/renderer/vt/XtermEngine.cpp
Lines 260 to 266 in 67ae9f6
But in this case the conpty client hasn't wrapped, because of the VT delayed wrap functionality, so we do need to emit something to force it onto the next line.
This problem can be fixed just by removing the above code, but I'm not sure if there are legitimate cases where we actually do need to avoid a cursor movement here. However, I think it's possible that this code may have been mistakenly introduced to compensate for the fact that the original Windows Terminal VT interpreter didn't handle delayed wrap correctly. Since that's been fixed, this may no longer be necessary. I'm not positive about that though.
from terminal.
@e82eric I forgot to add that the code you pointed out is also incorrect, and commenting it out will solve the problem in your particular case (i.e. when using powershell), but the underlying bug in the vtengine can still be triggered in other ways. For example, the cmd shell uses the legacy console API to write its output, and that doesn't pass through AdaptDispatch
, but it does legitimately set the WasWrapForced
flag, and will fail in a similar way.
from terminal.
@j4james thank you! that makes sense. Feel free to close this issue. (I had noticed it and wanted to see if I could sort out what was going on).
I tried commenting this out, and it did fix the issue, it does look like it has a side affect where when the window is resized the cursor moved and another line was added (I guess that is why those lines are needed).
terminal/src/renderer/vt/XtermEngine.cpp
Lines 260 to 266 in 67ae9f6
from terminal.
@j4james thank you! that makes sense. Feel free to close this issue. (I had noticed it and wanted to see if I could sort out what was going on).
I think it may be worth keeping this open, because there's definitely a bug here which is independent of issue #15602, and I don't think it's tracked anywhere else.
I tried commenting this out, and it did fix the issue, it does look like it has a side affect where when the window is resized the cursor moved and another line was added
I haven't checked what exactly is going on there, but it's possible that's just a bug in the powershell readline implementation, and it only appears to be working correctly now because of the conpty bug.
from terminal.
@j4james sounds good. I ran a time travel trace to see if I could find anything on why it did the weird jump with those lines commented out. It looked like it called Cursor::SetPosition twice. Once after Terminal::Reflow to x:12, y:5 and once from VirtualTerminal::StateMachine::ProcessString x:43 y:4 from .[m.[2;44H (I think windbg mangled the .[m. part).
Maybe a combination of Terminal::Reflow moving to line 3 and then something with PSReadLine moving it back to the correct line with a weird x offset.
0:003> k
# Child-SP RetAddr Call Site
00 00000054`e11fae90 00007ff9`214faee0 Microsoft_Terminal_Control!Cursor::SetPosition+0x1b [C:\Users\eric\src\terminal_line_end\src\buffer\out\cursor.cpp @ 200]
01 00000054`e11faec0 00007ff9`213fd398 Microsoft_Terminal_Control!TextBuffer::Reflow+0xa80 [C:\Users\eric\src\terminal_line_end\src\buffer\out\textBuffer.cpp @ 2995]
02 00000054`e11fb400 00007ff9`217530ef Microsoft_Terminal_Control!Microsoft::Terminal::Core::Terminal::UserResize+0x448 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalCore\Terminal.cpp @ 301]
03 00000054`e11fc020 00007ff9`2174570d Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::_refreshSizeUnderLock+0x53f [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\ControlCore.cpp @ 1124]
04 00000054`e11fc260 00007ff9`217454d5 Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::SizeOrScaleChanged+0x18d [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\ControlCore.cpp @ 1168]
05 00000054`e11fc300 00007ff9`218058ff Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::SizeChanged+0x45 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\ControlCore.cpp @ 1135]
06 00000054`e11fc330 00007ff9`219ed6ba Microsoft_Terminal_Control!winrt::impl::produce<winrt::Microsoft::Terminal::Control::implementation::ControlCore,winrt::Microsoft::Terminal::Control::IControlCore>::SizeChanged+0xff [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\winrt\Microsoft.Terminal.Control.h @ 2836]
07 00000054`e11fc3e0 00007ff9`21924ec0 Microsoft_Terminal_Control!winrt::impl::consume_Microsoft_Terminal_Control_IControlCore<winrt::Microsoft::Terminal::Control::IControlCore>::SizeChanged+0xea [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\winrt\Microsoft.Terminal.Control.h @ 304]
08 00000054`e11fc490 00007ff9`21a7fc7d Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::TermControl::_SwapChainSizeChanged+0xa0 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\TermControl.cpp @ 2065]
09 00000054`e11fc500 00007ff9`21aa49d6 Microsoft_Terminal_Control!`winrt::Microsoft::Terminal::Control::implementation::TermControlT<winrt::Microsoft::Terminal::Control::implementation::TermControl>::Connect'::`25'::<lambda_30>::operator()+0xbd [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\TermControl.xaml.g.hpp @ 354]
0a 00000054`e11fc590 00007ff9`f5b070fc Microsoft_Terminal_Control!winrt::impl::delegate<winrt::Windows::UI::Xaml::SizeChangedEventHandler,`winrt::Microsoft::Terminal::Control::implementation::TermControlT<winrt::Microsoft::Terminal::Control::implementation::TermControl>::Connect'::`25'::<lambda_30> >::Invoke+0x46 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\winrt\Windows.UI.Xaml.h @ 4683]
0b 00000054`e11fc600 00007ff9`f5b06ef2 Windows_UI_Xaml!DirectUI::CRoutedEventSourceBase<DirectUI::IUntypedEventSource,Windows::UI::Xaml::ISizeChangedEventHandler,IInspectable,Windows::UI::Xaml::ISizeChangedEventArgs>::Raise+0xe8 [onecoreuap\windows\dxaml\xcp\dxaml\lib\JoltClasses.h @ 1041]
0c 00000054`e11fc6a0 00007ff9`f5b0550a Windows_UI_Xaml!DirectUI::FrameworkElement::OnSizeChanged+0x3a [onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkelement_partial.cpp @ 1096]
0d 00000054`e11fc6d0 00007ff9`f5b0e805 Windows_UI_Xaml!DirectUI::DXamlCore::RaiseEvent+0x1ba [onecoreuap\windows\dxaml\xcp\dxaml\lib\dxamlcore.cpp @ 2027]
0e (Inline Function) --------`-------- Windows_UI_Xaml!AgCoreCallbacks::RaiseEvent+0x22 [onecoreuap\windows\dxaml\xcp\dxaml\lib\fxcallbacks.cpp @ 100]
0f (Inline Function) --------`-------- Windows_UI_Xaml!CFxCallbacks::JoltHelper_RaiseEvent+0x22 [onecoreuap\windows\dxaml\xcp\dxaml\lib\fxcallbacks.cpp @ 1018]
10 00000054`e11fc770 00007ff9`f5c1fb95 Windows_UI_Xaml!CLayoutManager::RaiseSizeChangedEvents+0x1c9 [onecoreuap\windows\dxaml\xcp\core\layout\layoutmanager.cpp @ 472]
11 00000054`e11fc980 00007ff9`f5c1ec00 Windows_UI_Xaml!CLayoutManager::UpdateLayout+0x2a5 [onecoreuap\windows\dxaml\xcp\core\layout\layoutmanager.cpp @ 338]
12 00000054`e11fca10 00007ff9`f5b8bc6d Windows_UI_Xaml!CCoreServices::NWDrawTree+0x330 [onecoreuap\windows\dxaml\xcp\core\dll\xcpcore.cpp @ 6294]
13 00000054`e11fcb30 00007ff9`f5b8ba6f Windows_UI_Xaml!CCoreServices::NWDrawMainTree+0xad [onecoreuap\windows\dxaml\xcp\core\dll\xcpcore.cpp @ 6084]
14 00000054`e11fcb90 00007ff9`f5b8b996 Windows_UI_Xaml!CWindowRenderTarget::Draw+0x6f [onecoreuap\windows\dxaml\xcp\core\compositor\windowrendertarget.cpp @ 136]
15 00000054`e11fcbd0 00007ff9`f5b7306d Windows_UI_Xaml!CXcpBrowserHost::OnTick+0x96 [onecoreuap\windows\dxaml\xcp\host\win\browserdesktop\winbrowserhost.cpp @ 545]
16 00000054`e11fcc30 00007ff9`f5b72f76 Windows_UI_Xaml!CXcpDispatcher::Tick+0x8d [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1449]
17 00000054`e11fcc70 00007ff9`f5ab58d9 Windows_UI_Xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0x42 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1041]
18 (Inline Function) --------`-------- Windows_UI_Xaml!CXcpDispatcher::ProcessMessage+0xc5 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 890]
19 00000054`e11fccb0 00007ff9`f5ab794b Windows_UI_Xaml!CXcpDispatcher::WindowProc+0x119 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 839]
1a 00000054`e11fcd00 00007ff9`f5ab783c Windows_UI_Xaml!CDeferredInvoke::DispatchQueuedMessage+0xcb [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 301]
1b (Inline Function) --------`-------- Windows_UI_Xaml!CXcpDispatcher::MessageTimerCallback+0x13 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1534]
1c 00000054`e11fcd50 00007ff9`fdcd529b Windows_UI_Xaml!CXcpDispatcher::MessageTimerCallbackStatic+0x1c [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1526]
1d 00000054`e11fcd80 00007ff9`fdcfc3ab CoreMessaging!Microsoft__CoreUI__Dispatch__TimeoutHandler$CallbackThunk+0x11b
1e 00000054`e11fce00 00007ff9`fdcd9d84 CoreMessaging!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x18b
1f 00000054`e11fce90 00007ff9`fdcd8d36 CoreMessaging!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0xc04
20 00000054`e11fcfb0 00007ff9`fdcd6f71 CoreMessaging!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x1d6
21 00000054`e11fd0a0 00007ff9`fdcd6d9c CoreMessaging!Microsoft::CoreUI::Dispatch::UserAdapter_DoWork+0xf1
22 00000054`e11fd180 00007ffa`02dbef75 CoreMessaging!Microsoft::CoreUI::Dispatch::UserAdapter_WindowProc+0xfc
23 00000054`e11fd200 00007ffa`02dbe8dc user32!UserCallWinProcCheckWow+0x515
24 00000054`e11fd390 00007ffa`02dd1223 user32!DispatchClientMessage+0x9c
25 00000054`e11fd3f0 00007ffa`031b0e64 user32!_fnDWORD+0x33
26 00000054`e11fd450 00007ffa`007c1124 ntdll!KiUserCallbackDispatcherContinue
27 000001ad`4c4b0820 00000000`000d0404 win32u!NtUserMessageCall+0x14
28 000001ad`4c4b0828 00000000`00050820 0xd0404
29 000001ad`4c4b0830 80000700`50020458 0x50820
2a 000001ad`4c4b0838 14cf0000`20280900 0x80000700`50020458
2b 000001ad`4c4b0840 00007ff6`dd560000 0x14cf0000`20280900
2c 000001ad`4c4b0848 00000000`00000000 WindowsTerminal!ILT+0(??YDNameQEAAAEAV0AEBV0Z) <PERF> (WindowsTerminal+0x0)
0:003> dx cPosition
cPosition : {X: 12, Y: 5} [Type: til::point]
[+0x000] x : 12 [Type: int]
[+0x004] y : 5 [Type: int]
0:003> k
# Child-SP RetAddr Call Site
00 00000054`e11fae90 00007ff9`214faee0 Microsoft_Terminal_Control!Cursor::SetPosition+0x1b [C:\Users\eric\src\terminal_line_end\src\buffer\out\cursor.cpp @ 200]
01 00000054`e11faec0 00007ff9`213fd398 Microsoft_Terminal_Control!TextBuffer::Reflow+0xa80 [C:\Users\eric\src\terminal_line_end\src\buffer\out\textBuffer.cpp @ 2995]
02 00000054`e11fb400 00007ff9`217530ef Microsoft_Terminal_Control!Microsoft::Terminal::Core::Terminal::UserResize+0x448 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalCore\Terminal.cpp @ 301]
03 00000054`e11fc020 00007ff9`2174570d Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::_refreshSizeUnderLock+0x53f [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\ControlCore.cpp @ 1124]
04 00000054`e11fc260 00007ff9`217454d5 Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::SizeOrScaleChanged+0x18d [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\ControlCore.cpp @ 1168]
05 00000054`e11fc300 00007ff9`218058ff Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::SizeChanged+0x45 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\ControlCore.cpp @ 1135]
06 00000054`e11fc330 00007ff9`219ed6ba Microsoft_Terminal_Control!winrt::impl::produce<winrt::Microsoft::Terminal::Control::implementation::ControlCore,winrt::Microsoft::Terminal::Control::IControlCore>::SizeChanged+0xff [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\winrt\Microsoft.Terminal.Control.h @ 2836]
07 00000054`e11fc3e0 00007ff9`21924ec0 Microsoft_Terminal_Control!winrt::impl::consume_Microsoft_Terminal_Control_IControlCore<winrt::Microsoft::Terminal::Control::IControlCore>::SizeChanged+0xea [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\winrt\Microsoft.Terminal.Control.h @ 304]
08 00000054`e11fc490 00007ff9`21a7fc7d Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::TermControl::_SwapChainSizeChanged+0xa0 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\TermControl.cpp @ 2065]
09 00000054`e11fc500 00007ff9`21aa49d6 Microsoft_Terminal_Control!`winrt::Microsoft::Terminal::Control::implementation::TermControlT<winrt::Microsoft::Terminal::Control::implementation::TermControl>::Connect'::`25'::<lambda_30>::operator()+0xbd [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\TermControl.xaml.g.hpp @ 354]
0a 00000054`e11fc590 00007ff9`f5b070fc Microsoft_Terminal_Control!winrt::impl::delegate<winrt::Windows::UI::Xaml::SizeChangedEventHandler,`winrt::Microsoft::Terminal::Control::implementation::TermControlT<winrt::Microsoft::Terminal::Control::implementation::TermControl>::Connect'::`25'::<lambda_30> >::Invoke+0x46 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\winrt\Windows.UI.Xaml.h @ 4683]
0b 00000054`e11fc600 00007ff9`f5b06ef2 Windows_UI_Xaml!DirectUI::CRoutedEventSourceBase<DirectUI::IUntypedEventSource,Windows::UI::Xaml::ISizeChangedEventHandler,IInspectable,Windows::UI::Xaml::ISizeChangedEventArgs>::Raise+0xe8 [onecoreuap\windows\dxaml\xcp\dxaml\lib\JoltClasses.h @ 1041]
0c 00000054`e11fc6a0 00007ff9`f5b0550a Windows_UI_Xaml!DirectUI::FrameworkElement::OnSizeChanged+0x3a [onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkelement_partial.cpp @ 1096]
0d 00000054`e11fc6d0 00007ff9`f5b0e805 Windows_UI_Xaml!DirectUI::DXamlCore::RaiseEvent+0x1ba [onecoreuap\windows\dxaml\xcp\dxaml\lib\dxamlcore.cpp @ 2027]
0e (Inline Function) --------`-------- Windows_UI_Xaml!AgCoreCallbacks::RaiseEvent+0x22 [onecoreuap\windows\dxaml\xcp\dxaml\lib\fxcallbacks.cpp @ 100]
0f (Inline Function) --------`-------- Windows_UI_Xaml!CFxCallbacks::JoltHelper_RaiseEvent+0x22 [onecoreuap\windows\dxaml\xcp\dxaml\lib\fxcallbacks.cpp @ 1018]
10 00000054`e11fc770 00007ff9`f5c1fb95 Windows_UI_Xaml!CLayoutManager::RaiseSizeChangedEvents+0x1c9 [onecoreuap\windows\dxaml\xcp\core\layout\layoutmanager.cpp @ 472]
11 00000054`e11fc980 00007ff9`f5c1ec00 Windows_UI_Xaml!CLayoutManager::UpdateLayout+0x2a5 [onecoreuap\windows\dxaml\xcp\core\layout\layoutmanager.cpp @ 338]
12 00000054`e11fca10 00007ff9`f5b8bc6d Windows_UI_Xaml!CCoreServices::NWDrawTree+0x330 [onecoreuap\windows\dxaml\xcp\core\dll\xcpcore.cpp @ 6294]
13 00000054`e11fcb30 00007ff9`f5b8ba6f Windows_UI_Xaml!CCoreServices::NWDrawMainTree+0xad [onecoreuap\windows\dxaml\xcp\core\dll\xcpcore.cpp @ 6084]
14 00000054`e11fcb90 00007ff9`f5b8b996 Windows_UI_Xaml!CWindowRenderTarget::Draw+0x6f [onecoreuap\windows\dxaml\xcp\core\compositor\windowrendertarget.cpp @ 136]
15 00000054`e11fcbd0 00007ff9`f5b7306d Windows_UI_Xaml!CXcpBrowserHost::OnTick+0x96 [onecoreuap\windows\dxaml\xcp\host\win\browserdesktop\winbrowserhost.cpp @ 545]
16 00000054`e11fcc30 00007ff9`f5b72f76 Windows_UI_Xaml!CXcpDispatcher::Tick+0x8d [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1449]
17 00000054`e11fcc70 00007ff9`f5ab58d9 Windows_UI_Xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0x42 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1041]
18 (Inline Function) --------`-------- Windows_UI_Xaml!CXcpDispatcher::ProcessMessage+0xc5 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 890]
19 00000054`e11fccb0 00007ff9`f5ab794b Windows_UI_Xaml!CXcpDispatcher::WindowProc+0x119 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 839]
1a 00000054`e11fcd00 00007ff9`f5ab783c Windows_UI_Xaml!CDeferredInvoke::DispatchQueuedMessage+0xcb [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 301]
1b (Inline Function) --------`-------- Windows_UI_Xaml!CXcpDispatcher::MessageTimerCallback+0x13 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1534]
1c 00000054`e11fcd50 00007ff9`fdcd529b Windows_UI_Xaml!CXcpDispatcher::MessageTimerCallbackStatic+0x1c [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1526]
1d 00000054`e11fcd80 00007ff9`fdcfc3ab CoreMessaging!Microsoft__CoreUI__Dispatch__TimeoutHandler$CallbackThunk+0x11b
1e 00000054`e11fce00 00007ff9`fdcd9d84 CoreMessaging!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x18b
1f 00000054`e11fce90 00007ff9`fdcd8d36 CoreMessaging!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0xc04
20 00000054`e11fcfb0 00007ff9`fdcd6f71 CoreMessaging!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x1d6
21 00000054`e11fd0a0 00007ff9`fdcd6d9c CoreMessaging!Microsoft::CoreUI::Dispatch::UserAdapter_DoWork+0xf1
22 00000054`e11fd180 00007ffa`02dbef75 CoreMessaging!Microsoft::CoreUI::Dispatch::UserAdapter_WindowProc+0xfc
23 00000054`e11fd200 00007ffa`02dbe8dc user32!UserCallWinProcCheckWow+0x515
24 00000054`e11fd390 00007ffa`02dd1223 user32!DispatchClientMessage+0x9c
25 00000054`e11fd3f0 00007ffa`031b0e64 user32!_fnDWORD+0x33
26 00000054`e11fd450 00007ffa`007c1124 ntdll!KiUserCallbackDispatcherContinue
27 000001ad`4c4b0820 00000000`000d0404 win32u!NtUserMessageCall+0x14
28 000001ad`4c4b0828 00000000`00050820 0xd0404
29 000001ad`4c4b0830 80000700`50020458 0x50820
2a 000001ad`4c4b0838 14cf0000`20280900 0x80000700`50020458
2b 000001ad`4c4b0840 00007ff6`dd560000 0x14cf0000`20280900
2c 000001ad`4c4b0848 00000000`00000000 WindowsTerminal!ILT+0(??YDNameQEAAAEAV0AEBV0Z) <PERF> (WindowsTerminal+0x0)
0:003> dx cPosition
cPosition : {X: 12, Y: 5} [Type: til::point]
[+0x000] x : 12 [Type: int]
[+0x004] y : 5 [Type: int]
0:003> g
Breakpoint 2 hit
Time Travel Position: 690A:3BA
Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::StateMachine::ProcessString+0x4a:
00007ff9`215fedaa 48c744242000000000 mov qword ptr [rsp+20h],0 ss:00000054`e1f5ef50=cccccccccccccccc
0:007> k
# Child-SP RetAddr Call Site
00 00000054`e1f5ef30 00007ff9`213fbcf0 Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::StateMachine::ProcessString+0x4a [C:\Users\eric\src\terminal_line_end\src\terminal\parser\stateMachine.cpp @ 2089]
01 00000054`e1f5f170 00007ff9`21754999 Microsoft_Terminal_Control!Microsoft::Terminal::Core::Terminal::Write+0xe0 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalCore\Terminal.cpp @ 427]
02 00000054`e1f5f270 00007ff9`217e611d Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::_connectionOutputHandler+0x139 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\ControlCore.cpp @ 2055]
03 00000054`e1f5f410 00007ff9`94a2d9f3 Microsoft_Terminal_Control!winrt::impl::delegate<winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler,`winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler::implementation<winrt::Microsoft::Terminal::Control::implementation::ControlCore,void (__cdecl winrt::Microsoft::Terminal::Control::implementation::ControlCore::*)(winrt::hstring const &)>'::`1'::<lambda_304_> >::Invoke+0x7d [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\winrt\Microsoft.Terminal.TerminalConnection.h @ 186]
04 00000054`e1f5f480 00007ff9`949ff403 TerminalConnection!winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler::operator()+0xd3 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\Generated Files\winrt\Microsoft.Terminal.TerminalConnection.h @ 478]
05 00000054`e1f5f530 00007ff9`949e20ab TerminalConnection!winrt::impl::invoke<winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >+0x43 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\Generated Files\winrt\base.h @ 5890]
06 00000054`e1f5f5d0 00007ff9`94a7b0cf TerminalConnection!winrt::event<winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler>::operator()<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >+0x17b [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\Generated Files\winrt\base.h @ 6043]
07 00000054`e1f5f770 00007ff9`94a7b773 TerminalConnection!winrt::Microsoft::Terminal::TerminalConnection::implementation::ConptyConnection::_OutputThread+0x76f [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\ConptyConnection.cpp @ 668]
08 00000054`e1f5fa70 00007ffa`02937344 TerminalConnection!`winrt::Microsoft::Terminal::TerminalConnection::implementation::ConptyConnection::Start'::`3'::<lambda_1>::<lambda_invoker_cdecl>+0x33 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\ConptyConnection.cpp @ 386]
09 00000054`e1f5fac0 00007ffa`031626b1 KERNEL32!BaseThreadInitThunk+0x14
0a 00000054`e1f5faf0 00000000`00000000 ntdll!RtlUserThreadStart+0x21
0:007> dx string
string : 0x54e1f5f1f0 : ".[m.[2;44H" [Type: std::basic_string_view<wchar_t,std::char_traits<wchar_t> > *]
[<Raw View>] [Type: std::basic_string_view<wchar_t,std::char_traits<wchar_t> >]
[size] : 0xa [Type: unsigned __int64]
[0] : 27 [Type: wchar_t]
[1] : 91 '[' [Type: wchar_t]
[2] : 109 'm' [Type: wchar_t]
[3] : 27 [Type: wchar_t]
[4] : 91 '[' [Type: wchar_t]
[5] : 50 '2' [Type: wchar_t]
[6] : 59 ';' [Type: wchar_t]
[7] : 52 '4' [Type: wchar_t]
[8] : 52 '4' [Type: wchar_t]
[9] : 72 'H' [Type: wchar_t]
0:007> g
Breakpoint 1 hit
Time Travel Position: 690F:333
Microsoft_Terminal_Control!Cursor::SetPosition+0x1b:
00007ff9`214ee68b 488b4c2430 mov rcx,qword ptr [rsp+30h] ss:00000054`e1f5c4c0=000001ad5aa7ebd0
0:007> k
# Child-SP RetAddr Call Site
00 00000054`e1f5c490 00007ff9`216422f1 Microsoft_Terminal_Control!Cursor::SetPosition+0x1b [C:\Users\eric\src\terminal_line_end\src\buffer\out\cursor.cpp @ 200]
01 00000054`e1f5c4c0 00007ff9`21634ca9 Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::AdaptDispatch::_CursorMovePosition+0x761 [C:\Users\eric\src\terminal_line_end\src\terminal\adapter\adaptDispatch.cpp @ 412]
02 00000054`e1f5c710 00007ff9`2160cf70 Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::AdaptDispatch::CursorPosition+0x89 [C:\Users\eric\src\terminal_line_end\src\terminal\adapter\adaptDispatch.cpp @ 490]
03 00000054`e1f5c780 00007ff9`21603ace Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::OutputStateMachineEngine::ActionCsiDispatch+0x1300 [C:\Users\eric\src\terminal_line_end\src\terminal\parser\OutputStateMachineEngine.cpp @ 476]
04 00000054`e1f5e9e0 00007ff9`21606ffc Microsoft_Terminal_Control!`Microsoft::Console::VirtualTerminal::StateMachine::_ActionCsiDispatch'::`2'::<lambda_1>::operator()+0x37e [C:\Users\eric\src\terminal_line_end\src\terminal\parser\stateMachine.cpp @ 474]
05 00000054`e1f5ecf0 00007ff9`21600013 Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::StateMachine::_SafeExecute<`Microsoft::Console::VirtualTerminal::StateMachine::_ActionCsiDispatch'::`2'::<lambda_1> >+0x2c [C:\Users\eric\src\terminal_line_end\src\terminal\parser\stateMachine.cpp @ 2261]
06 00000054`e1f5ee10 00007ff9`21601b28 Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::StateMachine::_ActionCsiDispatch+0x63 [C:\Users\eric\src\terminal_line_end\src\terminal\parser\stateMachine.cpp @ 471]
07 00000054`e1f5ee60 00007ff9`215fec18 Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::StateMachine::_EventCsiParam+0x268 [C:\Users\eric\src\terminal_line_end\src\terminal\parser\stateMachine.cpp @ 1378]
08 00000054`e1f5eec0 00007ff9`215ff041 Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::StateMachine::ProcessCharacter+0x288 [C:\Users\eric\src\terminal_line_end\src\terminal\parser\stateMachine.cpp @ 1891]
09 00000054`e1f5ef30 00007ff9`213fbcf0 Microsoft_Terminal_Control!Microsoft::Console::VirtualTerminal::StateMachine::ProcessString+0x2e1 [C:\Users\eric\src\terminal_line_end\src\terminal\parser\stateMachine.cpp @ 2131]
0a 00000054`e1f5f170 00007ff9`21754999 Microsoft_Terminal_Control!Microsoft::Terminal::Core::Terminal::Write+0xe0 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalCore\Terminal.cpp @ 427]
0b 00000054`e1f5f270 00007ff9`217e611d Microsoft_Terminal_Control!winrt::Microsoft::Terminal::Control::implementation::ControlCore::_connectionOutputHandler+0x139 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\ControlCore.cpp @ 2055]
0c 00000054`e1f5f410 00007ff9`94a2d9f3 Microsoft_Terminal_Control!winrt::impl::delegate<winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler,`winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler::implementation<winrt::Microsoft::Terminal::Control::implementation::ControlCore,void (__cdecl winrt::Microsoft::Terminal::Control::implementation::ControlCore::*)(winrt::hstring const &)>'::`1'::<lambda_304_> >::Invoke+0x7d [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalControl\Generated Files\winrt\Microsoft.Terminal.TerminalConnection.h @ 186]
0d 00000054`e1f5f480 00007ff9`949ff403 TerminalConnection!winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler::operator()+0xd3 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\Generated Files\winrt\Microsoft.Terminal.TerminalConnection.h @ 478]
0e 00000054`e1f5f530 00007ff9`949e20ab TerminalConnection!winrt::impl::invoke<winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >+0x43 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\Generated Files\winrt\base.h @ 5890]
0f 00000054`e1f5f5d0 00007ff9`94a7b0cf TerminalConnection!winrt::event<winrt::Microsoft::Terminal::TerminalConnection::TerminalOutputHandler>::operator()<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >+0x17b [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\Generated Files\winrt\base.h @ 6043]
10 00000054`e1f5f770 00007ff9`94a7b773 TerminalConnection!winrt::Microsoft::Terminal::TerminalConnection::implementation::ConptyConnection::_OutputThread+0x76f [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\ConptyConnection.cpp @ 668]
11 00000054`e1f5fa70 00007ffa`02937344 TerminalConnection!`winrt::Microsoft::Terminal::TerminalConnection::implementation::ConptyConnection::Start'::`3'::<lambda_1>::<lambda_invoker_cdecl>+0x33 [C:\Users\eric\src\terminal_line_end\src\cascadia\TerminalConnection\ConptyConnection.cpp @ 386]
12 00000054`e1f5fac0 00007ffa`031626b1 KERNEL32!BaseThreadInitThunk+0x14
13 00000054`e1f5faf0 00000000`00000000 ntdll!RtlUserThreadStart+0x21
0:007> dx cPosition
cPosition : {X: 43, Y: 4} [Type: til::point]
[+0x000] x : 43 [Type: int]
[+0x004] y : 4 [Type: int]
` ``
from terminal.
Related Issues (20)
- Test
- $(id)
- $(whoami) HOT 1
- $(ls -la) HOT 1
- Terminal closes when store tries to update $(id) HOT 1
- Terminal closes when store tries to update $(id) HOT 1
- Terminal becomes extremely laggy after printing large amount of CJK characters HOT 7
- Terminal update crashes all running applications HOT 3
- Snippets & useCommandline don't account for grapheme clusters quite right
- Can't wake up a closed headless window HOT 1
- PHP Artsan command not recognised as URI HOT 2
- No response when open windows terminal HOT 6
- CSI 58 (undercurl color) sequence misbehaves when in "legacy ANSI" format HOT 18
- Pressing ESC + j or k will equal to Alt + j or k when using Neovim in Windows Terminal HOT 2
- Suggest me code for this.
- I like some suggestions hare.
- Clicked URL contains unwanted delimiter HOT 3
- Crash when exiting a tab with the debug tap HOT 5
- Font loading faults after Windows update KB5039212 HOT 6
- Changing a value belonging to Resources.resw under Microsoft.Terminal.Control.Lib causes build to fail.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminal.