Win10 1909 x64
Windows Terminal version (if applicable): 0.11.1121.0
Increase and decrease the font size rapidly in the first tab using ctrl and mouse scroll wheel
Not to crash
Crashes
Crashes every time when I use Ctrl and the mouse wheel to increase and decrease the font rapidly. Only happens with the first tab and regardless of what is running in there. I have crash dumps. Doesn't crash when I try and record a video of it in Snagit.

It's very easy to reproduce this crash with Release build. The root cause I think is that the render thread clashes with the main thread.
When font size up or down, the main thread will call DxEngine::UpdateFont, in which the render related thing(_dwriteFontFace, for example) is effectively updated. In the meantime, the render thread is happily refreshing the content using PaintBufferLine, which also uses _dwriteFontFace and friends to construct CustomTextLayout. That gives us a race condition. For some reason _dwriteFontFace became a nullptr during the process, causing the crash.
A naive (but acutally working) fix would be adding guard-return for those DX properties to prevent any null-value access. However this is far from ideal. If we going to face these kind of race issue fearlessly, maybe explicit locking is the way to go.
Oh that's so on me for not locking that call. I'm pretty sure the right solution here is to have the caller get the write lock before calling TriggerFontChange. Thanks for helping debug this!
Most helpful comment
Oh that's so on me for not locking that call. I'm pretty sure the right solution here is to have the caller get the write lock before calling
TriggerFontChange. Thanks for helping debug this!