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

splitPane causes memory leak in latest release (v0.10.761.0) #4978

Closed
Armadill0 opened this issue Mar 18, 2020 · 4 comments
Closed

splitPane causes memory leak in latest release (v0.10.761.0) #4978

Armadill0 opened this issue Mar 18, 2020 · 4 comments
Assignees
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Severity-Crash Crashes are real bad news.

Comments

@Armadill0
Copy link

I updated to the latest release (v0.10.761.0) yesterday and tried out the splitPane functionality today. After configuring some keybindings for that Terminal crashes and consumes my 32GB of memory within seconds.
If I remove the configuration for the sdplitPane keybindings again I cannot reproduce this.

This happens:

  • with my default profile (Fedora Remix) instantly
  • with the default PowerShell profile instantly by splitPane in horizontal mode
  • with the default PowerShell profile after splitPane the first time in vertical mode and then send another one right after

Environment

Windows build number:  10.0.18363.0
Windows Terminal version (if applicable): 0.10.761.0

Any other software? no

Steps to reproduce

  • used the following configuration:
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "copyOnSelect": true,
    "defaultProfile": "{d3f31bee-5823-5ed8-8e04-f31ed54f2cd9}",
    "initialPosition": "-1920,0",
    "launchMode": "maximized",
    "profiles":
    [
        {
            "guid": "{d3f31bee-5823-5ed8-8e04-f31ed54f2cd9}",
            "acrylicOpacity": 0.8,
            "hidden": false,
            "historySize": 9999999,
            "name": "fedoraremix",
            "startingDirectory" : "//wsl$/fedoraremix/home/tamler",
            "source": "Windows.Terminal.Wsl",
            "fontSize": 10,
            "fontFace": "DejaVu Sans Mono for Powerline",
            "useAcrylic": true
        },
        {
            // Make changes here to the powershell.exe profile
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false
        },
        {
            // Make changes here to the cmd.exe profile
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false
        },
        {
            "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
            "hidden": false,
            "name": "Azure Cloud Shell",
            "source": "Windows.Terminal.Azure"
        }
    ],

    // Add custom color schemes to this array
    "schemes": [],

    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": [
        {"command": "prevTab", "keys": ["shift+left"] },
        {"command": "nextTab", "keys": ["shift+right"] },
        {"command": "scrollUpPage", "keys": ["shift+pageup"] },
        {"command": "scrollDownPage", "keys": ["shift+pagedown"] },
        {"command": {"action": "splitPane", "split": "vertical"}, "keys": ["ctrl+shift+right"] },
        {"command": {"action": "splitPane", "split": "horizontal"}, "keys": ["ctrl+shift+down"] },
        {"command": "copy", "keys": ["ctrl+shift+c"] },
        {"command": "paste", "keys": ["ctrl+shift+v"] },
        {"command": "paste", "keys": ["shift+insert"] }
    ]
}
  • open new Powershell profile tab
  • use ctrl+shift+down to split down and crash immediately OR ctrl+shift+right twice to crash

Expected behavior

Split the pane, which actually works with the Powershell profile in vertical mode the first time.

Actual behavior

splitPane works the first time on a Powershell Profile in vertical mode, but crashes after sending the command again right after the first time.
In horizontal mode it instantly crashes.
In the Fedora Remix profile (default) it crashes regardless of the mode.

Independent of the profile Terminal consumes all of my memory within 20 seconds. Partly screenshot from task manager:
Terminal-memconsumption

@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 Mar 18, 2020
@zadjii-msft
Copy link
Member

Yea I'm almost positive that this is the same problem that's being reported in #4972, and is actually already fixed in #4964.

As a mitigation, you can reduce your historySize to something smaller, even 30000 would probably be safe. The problem here is an integer overflow 🤦‍♂

I'm gonna leave this open until I can confirm that's the cause of #4972 as well.

@zadjii-msft zadjii-msft added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news. Issue-Bug It either shouldn't be doing this or needs an investigation. labels Mar 18, 2020
@zadjii-msft zadjii-msft self-assigned this Mar 18, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Mar 18, 2020
@zadjii-msft zadjii-msft added this to the Terminal v1.0 milestone Mar 18, 2020
@zadjii-msft
Copy link
Member

zadjii-msft commented Mar 18, 2020

(we've confirmed this is in fact a /dup of #4972)

@zadjii-msft zadjii-msft removed this from the Terminal v1.0 milestone Mar 18, 2020
@ghost
Copy link

ghost commented Mar 18, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Mar 18, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Mar 18, 2020
@Armadill0
Copy link
Author

Thank you very much!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

No branches or pull requests

2 participants