Skip to content

Terminal crashes sometimes when running clear #13499

Closed

Description

Windows Terminal version

1.13.11431.0

Windows build number

10.0.19044.0

Other Software

bash (inside WSL, Debian)

Steps to reproduce

Do normal work, switch between being connected locally and remotely via RDP (I think the main point here is probably a change in the available displays, e.g. I have 5 monitors at the office and 2 at home - if that for some reason could matter).
In some cases, there will be a lot of text missing (some of it perhaps visible when scrolling back up).

Expected Behavior

I'd expect that executing clear should clear up the window viewport and recover the shell to a fresh state so I could keep working.

Actual Behavior

Resizing the window sometimes forces a redraw and (at least partially) fixes the problem, but running clear in the bash shell to "recover" the terminal to a normal working state in most cases just causes the Terminal window to crash and disappear.

Activity

  1. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jul 13, 2022
  2. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jul 13, 2022
  3. tovine commented on Jul 13, 2022

    @tovine
    Author

    The tricky part about this is that it's not 100% reproducible, but it's happened often enough that I'm fairly certain it's the same issue.
    I have captured Event Log files from 3 separate days when this happened, not sure where I can upload them to you (might contain sensitive info, so not suited for attaching here?)

  4. tovine commented on Jul 13, 2022

    @tovine
    Author

    Event log details from the crash today:

    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
      <Provider Name="Application Error" /> 
      <EventID Qualifiers="0">1000</EventID> 
      <Version>0</Version> 
      <Level>2</Level> 
      <Task>100</Task> 
      <Opcode>0</Opcode> 
      <Keywords>0x80000000000000</Keywords> 
      <TimeCreated SystemTime="2022-07-13T08:07:44.2630049Z" /> 
      <EventRecordID>157500</EventRecordID> 
      <Correlation /> 
      <Execution ProcessID="0" ThreadID="0" /> 
      <Channel>Application</Channel> 
      <Computer>removed</Computer> 
      <Security /> 
      </System>
    <EventData>
      <Data>WindowsTerminal.exe</Data> 
      <Data>1.13.2205.23001</Data> 
      <Data>628bd6e7</Data> 
      <Data>Microsoft.Terminal.Control.dll</Data> 
      <Data>1.13.2205.23001</Data> 
      <Data>628bd51b</Data> 
      <Data>c0000005</Data> 
      <Data>00000000000c1622</Data> 
      <Data>6120</Data> 
      <Data>01d895c3d9743c03</Data> 
      <Data>C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.13.11431.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe</Data> 
      <Data>C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.13.11431.0_x64__8wekyb3d8bbwe\Microsoft.Terminal.Control.dll</Data> 
      <Data>e3bb1d28-9a5b-4cf9-acfc-7621cb1bb9bd</Data> 
      <Data>Microsoft.WindowsTerminal_1.13.11431.0_x64__8wekyb3d8bbwe</Data> 
      <Data>App</Data> 
      </EventData>
      </Event>

    Previous report is exactly the same (apart from Process ID, time and report id)

  5. zadjii-msft commented on Jul 13, 2022

    @zadjii-msft
    Member

    There's a small chance that we might be able to look this crash up on the backend if you file feedback via the Feedback Hub, and share the link here: /feedback

    If not, I'd recommend the following steps, to try and collect an automatic crash dump of the Terminal:
    Can you try following the steps in this post to set up automatic crash dumps? (For more info, see this link) If that works, then you should be able to automatically get a .dmp of the terminal when it crashes. Then, can you zip that dump up and send it to us, so we can investigate? Thanks!

  6. ghost added
    Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to something
    on Jul 13, 2022
  7. tovine commented on Jul 13, 2022

    @tovine
    Author

    I tried recording using the Feedback Hub earlier, but for some reason it wouldn't start (also I guess it'd have to be recording until the issue happened, so that could be running for a while...)

    Just enabled WER dumping like the guide in the blog post said:
    bilde
    Does it look correct, or should I add/change anything? Also, where do I send the dump once I get it?

  8. ghost added
    Needs-AttentionThe core contributors need to come back around and look at this ASAP.
    on Jul 13, 2022
  9. ghost removed
    Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to something
    on Jul 13, 2022
  10. tovine commented on Jul 15, 2022

    @tovine
    Author

    It crashed again just now, but no dumps were found in the AppData\Local folder, not even the CrashDumps folder itself - do you have to create that manually first for it to work?

    EDIT: could it be related to reaching the end of the scrollback buffer or something? It usually happens when I clear the terminal after having had quite a bit of text scroll by. BTW, my History size setting is at 32.6k lines - not sure if that's relevant...

  11. briceo commented on Jul 26, 2022

    @briceo

    Mine crashes when I had a large scrollback history. I have my bash terminal set to keep 9999999 lines, and when I get a large number of lines in the scrollback buffer, that's when clear crashes my windows terminal. And by crash, I should say, it actually freezes, and won't even redraw (becomes unresponsive), and the only thing I can do is to force close the terminal and restart the terminal application

  12. DHowett commented on Jul 26, 2022

    @DHowett
    Member

    Interesting. We are supposed to ignore history sizes > 32000 . . .

  13. zadjii-msft commented on Aug 1, 2022

    @zadjii-msft
    Member

    HMM which distro are you using? I think the clear implementation changed between Ubuntu 18.04 and Ubuntu 22.04. Knowing which one in particular might help ID the root cause.

    FWIW I can't repro this with historySize: 9999999 and clear with either Ubuntu, but maybe there's something else I'm missing. I'm testing with Terminal 1.16 and there's quite a few changes here since 1.13. Do you have anything like magnifier, narrator, NVDA, anything that listens for UIA events at all? There were a PILE of crashes related to UIA fixed in the last few months...

  14. 41 remaining items

  15. zadjii-msft commented on May 5, 2023

    @zadjii-msft
    Member

    Addenda: MSFT:43308096 looks like the inverse frequency - the crashes started going up around 4/12. Interesting. That one's a ~ControlCore a/v, which is kinda similar. No repros of that one in 1.17 either, so that's good.

  16. microsoft-github-policy-service commented on May 9, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

  17. microsoft-github-policy-service commented on May 9, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

  18. microsoft-github-policy-service commented on May 9, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

  19. tovine commented on May 11, 2023

    @tovine
    Author

    Ok, guess I'll have to chime in to prevent the bot from auto closing?
    Nice to see that you're tracking it internally and making progress! :)

    FWIW I haven't had any crashes of this kind recently, so you've at least fixed something 🤗
    PS: I'm currently on version 1.16.10261.0, installed from the Store

  20. added
    Needs-AttentionThe core contributors need to come back around and look at this ASAP.
    and removed
    Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to something
    No-Recent-ActivityThis issue/PR is going stale and may be auto-closed without further activity.
    on May 11, 2023
  21. zadjii-msft commented on May 11, 2023

    @zadjii-msft
    Member

    Oh I mean, this seems fixed, you say it's fixed, no one else has chimed in - I think it's just fixed 😄

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

    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-AttentionThe core contributors need to come back around and look at this ASAP.Product-TerminalThe new Windows Terminal.Resolution-Fix-AvailableIt's available in an Insiders build or a releaseSeverity-CrashCrashes are real bad news.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions