Skip to content

Conhost crashes on Windows 10 #5607

Description

@BerndK-Str

Conhost crashes:

ConhostCrash1.mp4

These are the issues that I saw using the UICatalog test project (compiled with version 2.4.7) on Windows 10 21H2 unpatched:

  1. just starting UICatalog - The default driver (probably 'windows') just shows a black screen!
    running with '-d dotnet' it works better
  2. simple resizement seems to work, but when resize hor+ver the task bar and the outer left part is covered by useless scollbars.
  3. if I uncheck the option 'Wrap text output on resize' the application (or better the related conhost) crashes when resizing. There is a dead body in the Task-list.
  4. even if that option is checked there is similar behavior on my application (when resizing), see picture. This time we can see a popup. Unfortunately I was not able to reproduce the exact behavior with UICatalog. No idea why, I would say that there is nothing special in my app. Did a lot of tests but did not find a real difference.
Image

I have tested with AOT native compiled and also single file self-contained (.net core 10) on a Windows 10 21H2 unpatched VM (VirtualBox). I used version 2.4.7 and 2.4.17.
I'm pretty sure that the reason of all this is not a real bug in Terminal.Gui, but rather a weak implementation of the legacy conhost. Probably a race condition while writing into the buffer while this is being resized!? It was not reproducible on Win11 and not using Windows Terminal. I know that using the Terminal might be a workaround - but I want to just ship my app and it should also work on any Windows 10 without forcing the user to install additional stuff. Perhaps it is possible to have more tolerant implementation. For sure the real showstopper for me is point 3+4 - the crash (1+2 are only observed minor issues).

I also created a dump and tried to look into the threads, but with not enough inside knowledge to continue:

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions