Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal crashes when running git log #10034

Closed
dougheeren opened this issue May 5, 2021 · 7 comments
Closed

Terminal crashes when running git log #10034

dougheeren opened this issue May 5, 2021 · 7 comments
Assignees
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Milestone

Comments

@dougheeren
Copy link

dougheeren commented May 5, 2021

Windows Terminal version (or Windows build number)

Windows Build: 10.0.19042.964, Windows Terminal commit c3ca94c built using Visual Studio 2019 16.9.3

Other Software

PowerShell 7.1.3
oh-my-posh 3.133.1
posh-git 1.0.0
git 2.31.1.windows.1

Steps to reproduce

  • Start any shell with access to git (powershell, git bash, cmd)
  • git clone the windows terminal repo
  • git checkout master
  • git log
  • press space enough times to see this screen, one more space will kill it depending on the number of lines in the terminal

Expected Behavior

git log shouldn't cause wtd to crash.

Actual Behavior

image

Press space after this screen and it wtd will crash leaving the following windows event log entry.

Fault bucket 1724119567131471671, type 5
Event Name: MoAppCrash
Response: Not available
Cab Id: 0

Problem signature:
P1: WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe
P2: praid:App
P3: 0.0.0.0
P4: 6091d600
P5: DWrite.dll
P6: 10.0.19041.804
P7: 2f618cb5
P8: c0000005
P9: 00000000000cf34e
P10:

Attached files:
\?\WERD4E7.tmp.mdmp
\?\WERD630.tmp.WERInternalMetadata.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERD641.tmp.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERD64F.tmp.csv
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERD67E.tmp.txt

These files may be available here:
\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_WindowsTerminalD_14915a2eb4f1c128f427ee9d7511ba25d013a0ff_a3463a88_f44a4158-0e6d-4109-867f-3e07b7600941

Analysis symbol:
Rechecking for solution: 0
Report Id: b377ecbe-9dab-4a05-beea-55614e8d7bb0
Report Status: 268435456
Hashed bucket: c432aee12ffbe1ec97ed4d9c8d2bef37
Cab Guid: 0

CrashDetails.zip

settings.zip

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 5, 2021
@DHowett
Copy link
Member

DHowett commented May 5, 2021

Since it looks like you built this yourself, can you get us a stack trace from Visual Studio?

@DHowett
Copy link
Member

DHowett commented May 5, 2021

Wow, this trivially reproduces on another build as well. What on earth?

@DHowett
Copy link
Member

DHowett commented May 5, 2021

If you move line by line, it looks like it crashes displaying...

* [x] Tests added/passed 🎉🎉🎉

@skyline75489 I am betting this is in text simplicity detection 😉

00 (Inline Function) --------`--------     Microsoft_Terminal_Control!std::accumulate+0xa [C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\include\numeric @ 35] 
01 (Inline Function) --------`--------     Microsoft_Terminal_Control!std::accumulate+0xa [C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\include\numeric @ 44] 
02 00000063`1eafeec0 00007ff8`54a5cd7b     Microsoft_Terminal_Control!Microsoft::Console::Render::CustomTextLayout::_CorrectGlyphRun+0x220 [E:\BA\89\s\src\renderer\dx\CustomTextLayout.cpp @ 771] 
03 00000063`1eafefd0 00007ff8`54a5b65b     Microsoft_Terminal_Control!Microsoft::Console::Render::CustomTextLayout::_CorrectGlyphRuns+0x3b [E:\BA\89\s\src\renderer\dx\CustomTextLayout.cpp @ 493] 
04 00000063`1eaff000 00007ff8`54a4db2c     Microsoft_Terminal_Control!Microsoft::Console::Render::CustomTextLayout::Draw+0x1ab [E:\BA\89\s\src\renderer\dx\CustomTextLayout.cpp @ 140] 
05 00000063`1eaff060 00007ff8`54a46538     Microsoft_Terminal_Control!Microsoft::Console::Render::DxEngine::PaintBufferLine+0xfc [E:\BA\89\s\src\renderer\dx\DxRenderer.cpp @ 1649] 
06 00000063`1eaff110 00007ff8`54a45ab8     Microsoft_Terminal_Control!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper+0x978 [E:\BA\89\s\src\renderer\base\renderer.cpp @ 837] 
07 00000063`1eaff4e0 00007ff8`54a43c8d     Microsoft_Terminal_Control!Microsoft::Console::Render::Renderer::_PaintBufferOutput+0x4f8 [E:\BA\89\s\src\renderer\base\renderer.cpp @ 679] 
08 00000063`1eaff6c0 00007ff8`54a43785     Microsoft_Terminal_Control!Microsoft::Console::Render::Renderer::_PaintFrameForEngine+0x46d [E:\BA\89\s\src\renderer\base\renderer.cpp @ 162] 
09 00000063`1eaff7c0 00007ff8`54a486b1     Microsoft_Terminal_Control!Microsoft::Console::Render::Renderer::PaintFrame+0x85 [E:\BA\89\s\src\renderer\base\renderer.cpp @ 81] 
0a

@dougheeren thanks for reporting this!

@DHowett DHowett added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news. labels May 5, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 5, 2021
@DHowett DHowett added this to the Terminal v1.9 milestone May 5, 2021
@skyline75489
Copy link
Collaborator

I can’t repro this locally. Perhaps I’m not seeing exactly what you guys are seeing?

I can’t see the emojis. Instead I see a bunch of Unicode encoding like this:

Tests added/passed <9F><8E>

@ghost ghost added the In-PR This issue has a related PR label May 5, 2021
@skyline75489
Copy link
Collaborator

I finally got the repro (thanks to WSL) and the fix. Thanks @dougheeren for catching this!

@LuanVSO
Copy link
Contributor

LuanVSO commented May 5, 2021

I can’t see the emojis. Instead I see a bunch of Unicode encoding like this:
Tests added/passed <9F><8E>

i thought one of the recent git for windows update fixed this, it has to do with less that assumes $LANG="c" if there is no %LANG% in the environment block

@dougheeren
Copy link
Author

@skyline75489 @DHowett You're welcome! I'm sorry I logged last night after reporting this. And I see I said master when it should have been main...DOH. Here is the stack trace, though it seems you've already found the issue. Hopefully, it confirms your findings.

image
image

Microsoft.Terminal.Control.dll!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>::_Verify_offset(const __int64 _Off) Line 113
at C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29910\include\vector(113)
Microsoft.Terminal.Control.dll!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>::operator+=(const __int64 _Off) Line 120
at C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29910\include\vector(120)
Microsoft.Terminal.Control.dll!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>::operator+(const __int64 _Off) Line 126
at C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29910\include\vector(126)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::CustomTextLayout::_CorrectGlyphRun(const unsigned int runIndex) Line 771
at C:\Users\dough\source\repos\terminal\src\renderer\dx\CustomTextLayout.cpp(771)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::CustomTextLayout::_CorrectGlyphRuns() Line 493
at C:\Users\dough\source\repos\terminal\src\renderer\dx\CustomTextLayout.cpp(493)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::CustomTextLayout::Draw(void * clientDrawingContext, IDWriteTextRenderer * renderer, float originX, float originY) Line 140
at C:\Users\dough\source\repos\terminal\src\renderer\dx\CustomTextLayout.cpp(140)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::DxEngine::PaintBufferLine(const gsl::span<Microsoft::Console::Render::Cluster const ,-1> clusters, const _COORD coord, const bool __formal, const bool __formal) Line 1649
at C:\Users\dough\source\repos\terminal\src\renderer\dx\DxRenderer.cpp(1649)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper(Microsoft::Console::Render::IRenderEngine * const pEngine, TextBufferCellIterator it, const _COORD target, const bool lineWrapped) Line 837
at C:\Users\dough\source\repos\terminal\src\renderer\base\renderer.cpp(837)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::Renderer::_PaintBufferOutput(Microsoft::Console::Render::IRenderEngine * const pEngine) Line 711
at C:\Users\dough\source\repos\terminal\src\renderer\base\renderer.cpp(711)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::Renderer::_PaintFrameForEngine(Microsoft::Console::Render::IRenderEngine * const pEngine) Line 162
at C:\Users\dough\source\repos\terminal\src\renderer\base\renderer.cpp(162)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::Renderer::PaintFrame() Line 80
at C:\Users\dough\source\repos\terminal\src\renderer\base\renderer.cpp(80)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::RenderThread::_ThreadProc() Line 206
at C:\Users\dough\source\repos\terminal\src\renderer\base\thread.cpp(206)
Microsoft.Terminal.Control.dll!Microsoft::Console::Render::RenderThread::s_ThreadProc(void * lpParameter) Line 152
at C:\Users\dough\source\repos\terminal\src\renderer\base\thread.cpp(152)
[External Code]

I enjoy using Windows Terminal and I'm glad I can contribute to it.

@ghost ghost removed the In-PR This issue has a related PR label Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants