Using double-size characters can cause the Atlas engine to crash #18420

Closed
opened 2026-01-31 06:13:27 +00:00 by claunia · 3 comments
Owner

Originally created by @j4james on GitHub (Sep 10, 2022).

Windows Terminal version

Commit 3e6abd37df

Windows build number

10.0.19044.1889

Other Software

Vttest

Steps to reproduce

  1. Make sure the Atlas renderer is enabled.
  2. Open a WSL shell.
  3. Run Vttest, and select option 4, the "Test of double-size characters".
  4. While the first test page is visible, open the terminal settings.
  5. Without changing anything click Save and then close the settings.

Expected Behavior

No crash.

Actual Behavior

The app crashes with:

Unhandled exception thrown: write access violation.
it->_Ptr->_Next->**_Prev** was 0x7FFE52FDE460.

and the stack trace:

>	Microsoft.Terminal.Control.dll!Microsoft::Console::Render::AtlasEngine::StartPaint() Line 280	C++
 	Microsoft.Terminal.Control.dll!Microsoft::Console::Render::Renderer::_PaintFrameForEngine(Microsoft::Console::Render::IRenderEngine * const pEngine) Line 121	C++
 	Microsoft.Terminal.Control.dll!Microsoft::Console::Render::RenderThread::_ThreadProc() Line 214	C++
 	[External Code]	

Sometimes the crash occurs elsewhere, but it always seems to be something with the _Prev pointer being null or pointing somewhere inaccessible.

Originally created by @j4james on GitHub (Sep 10, 2022). ### Windows Terminal version Commit 3e6abd37df192d969088188ce836edbf645b13b4 ### Windows build number 10.0.19044.1889 ### Other Software [Vttest](https://www.invisible-island.net/vttest/) ### Steps to reproduce 1. Make sure the Atlas renderer is enabled. 2. Open a WSL shell. 3. Run _Vttest_, and select option 4, the "Test of double-size characters". 4. While the first test page is visible, open the terminal settings. 5. Without changing anything click _Save_ and then close the settings. ### Expected Behavior No crash. ### Actual Behavior The app crashes with: ``` Unhandled exception thrown: write access violation. it->_Ptr->_Next->**_Prev** was 0x7FFE52FDE460. ``` and the stack trace: ``` > Microsoft.Terminal.Control.dll!Microsoft::Console::Render::AtlasEngine::StartPaint() Line 280 C++ Microsoft.Terminal.Control.dll!Microsoft::Console::Render::Renderer::_PaintFrameForEngine(Microsoft::Console::Render::IRenderEngine * const pEngine) Line 121 C++ Microsoft.Terminal.Control.dll!Microsoft::Console::Render::RenderThread::_ThreadProc() Line 214 C++ [External Code] ``` Sometimes the crash occurs elsewhere, but it always seems to be something with the `_Prev` pointer being null or pointing somewhere inaccessible.
Author
Owner

@j4james commented on GitHub (Sep 10, 2022):

I can sometimes reproduce this with a simple printf "\e#3Test\n", but that may require opening and closing the settings more than once. I'm not exactly sure what is triggering it, so maybe there is an aspect of randomness involved.

As a wild guess, could it be that the Atlas engine can't cope with the fact that double-width lines only contain half the number of buffer cells as a full width line?

@j4james commented on GitHub (Sep 10, 2022): I can sometimes reproduce this with a simple `printf "\e#3Test\n"`, but that may require opening and closing the settings more than once. I'm not exactly sure what is triggering it, so maybe there is an aspect of randomness involved. As a wild guess, could it be that the Atlas engine can't cope with the fact that double-width lines only contain half the number of buffer cells as a full width line?
Author
Owner

@lhecker commented on GitHub (Sep 11, 2022):

As a wild guess, could it be that the Atlas engine can't cope with the fact that double-width lines only contain half the number of buffer cells as a full width line?

Yeah that sounds quite likely unfortunately.

@lhecker commented on GitHub (Sep 11, 2022): > As a wild guess, could it be that the Atlas engine can't cope with the fact that double-width lines only contain half the number of buffer cells as a full width line? Yeah that sounds quite likely unfortunately.
Author
Owner

@ghost commented on GitHub (Sep 23, 2022):

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

Handy links:

@ghost commented on GitHub (Sep 23, 2022): :tada:This issue was addressed in #13966, which has now been successfully released as `Windows Terminal Preview v1.16.2641.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.16.2641.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#18420