You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Maximizing/Restoring when the alt buffer is active crashes conhost #1206
OpenConsole.exe!wil::details::in1diag5::_Throw_Hr(void * callerReturnAddress, unsigned int lineNumber, const char * fileName, const char * functionName, const char * code, HRESULT hr) Line 4937 C++
OpenConsole.exe!wil::details::in1diag5::Throw_HrIf(void * callerReturnAddress, unsigned int lineNumber, const char * fileName, const char * functionName, const char * code, HRESULT hr, bool condition) Line 5041 C++
OpenConsole.exe!TextBufferCellIterator::TextBufferCellIterator(const TextBuffer & buffer, _COORD pos, const Microsoft::Console::Types::Viewport limits) Line 43 C++
OpenConsole.exe!TextBuffer::GetCellDataAt(const _COORD at, const Microsoft::Console::Types::Viewport limit) Line 169 C++
OpenConsole.exe!Microsoft::Console::Render::Renderer::_PaintBufferOutput(Microsoft::Console::Render::IRenderEngine * const pEngine) Line 579 C++
OpenConsole.exe!Microsoft::Console::Render::Renderer::_PaintFrameForEngine(Microsoft::Console::Render::IRenderEngine * const pEngine) Line 119 C++
OpenConsole.exe!Microsoft::Console::Render::Renderer::PaintFrame() Line 68 C++
OpenConsole.exe!Microsoft::Console::Render::RenderThread::_ThreadProc() Line 168 C++
OpenConsole.exe!Microsoft::Console::Render::RenderThread::s_ThreadProc(void * lpParameter) Line 151 C++
During the resize down, we're resizing the alt buffer here. Prior to the newViewport = Viewport::FromDimensions(... line, members have the following values:
Variable
value
newTop
76
_virtualBottom
105
newViewport
{LT(0, 0) RB(119, 29) [120 x 30]}
_viewport
{LT(0, 0) RB(370, 105) [371 x 106]}
Looks like we're trying to set the top of the new viewport so that the virtual bottom stays anchored to the new viewport's bottom. However, this only makes sense when the viewport is getting bigger, not when it's getting smaller. In that scenario, we'll end up setting the top to somewhere in the middle of the buffer, and then be real confused by the next paint.
Activity
DHowett-MSFT commentedon Jun 11, 2019
zadjii-msft commentedon Sep 3, 2019
This only repros if "Disable scroll forward" is enabled.
This surprises me, considering the alt buffer doesn't need to do anything with _virtualBottom, but something's definitely busted there.
zadjii-msft commentedon Sep 3, 2019
This code looks bad:
SCREEN_INFORMATION::_InternalSetViewportSizeDuring the resize down, we're resizing the alt buffer here. Prior to the
newViewport = Viewport::FromDimensions(...line, members have the following values:Looks like we're trying to set the top of the new viewport so that the virtual bottom stays anchored to the new viewport's bottom. However, this only makes sense when the viewport is getting bigger, not when it's getting smaller. In that scenario, we'll end up setting the top to somewhere in the middle of the buffer, and then be real confused by the next paint.
add a test for #1206
Don't crash when restore-down'ing the alt buffer (#2666)
Don't crash when restore-down'ing the alt buffer (#2666)
Prevent the virtual viewport bottom being updated incorrectly (#12972)