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

Flickering icon & app will not launch #13290

Closed
ygwarggis opened this issue Jun 13, 2022 · 8 comments
Closed

Flickering icon & app will not launch #13290

ygwarggis opened this issue Jun 13, 2022 · 8 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity.

Comments

@ygwarggis
Copy link

ygwarggis commented Jun 13, 2022

Windows Terminal version

Windows 10 Pro for Workstations, version: 21H2

Windows build number

19044.1706

Other Software

No response

Steps to reproduce

Download, install, and open Windows Terminal from MS Store;
Change setting to open in Command Prompt as default and default directory;
Save and close the application;
Click to open from Windows start menu to launch application again.

Expected Behavior

Windows Terminal application to open normally.

Actual Behavior

Windows Terminal application icon continuously flickers, mouse pointer stuck on loading status (loading/busy circle mouse pointer), and the application will not launch.

I have to reinstall it for it to work. But after I close it and try to re-open it the second time, it will not launch and stays on the flickering icon and flickering "busy" mouse pointer.

Cannot End Task from windows task manager either. It would just come back in the task list again and the issue persists.

settings.txt

terminalFlashingIcon.mp4
@ygwarggis ygwarggis added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jun 13, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 13, 2022
@zadjii-msft
Copy link
Member

hmm. For whatever reason, github seems like it doesn't like the video you uploaded. Can you try again/?

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 13, 2022
@ygwarggis
Copy link
Author

hmm. For whatever reason, github seems like it doesn't like the video you uploaded. Can you try again/?

Done. Just re-attached the screen recording again. Thanks!

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 13, 2022
@zadjii-msft
Copy link
Member

What the fuck, I've never seen anything like that before.

Details
{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        }
    ],
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
    "firstWindowPreference": "persistedWindowLayout",
    "initialCols": 116,
    "initialRows": 60,
    "profiles": 
    {
        "defaults": 
        {
            "closeOnExit": "never",
            "elevate": true,
            "padding": "2"
        },
        "list": 
        [
            {
                "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "closeOnExit": "never",
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt",
                "padding": "2",
                "startingDirectory": "c:\\"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "guid": "{b38140c6-c357-5391-8f13-fbe90cc59743}",
                "hidden": false,
                "name": "Developer Command Prompt for VS 2022",
                "source": "Windows.Terminal.VisualStudio"
            },
            {
                "guid": "{7de5fd89-0a80-51f0-8a1c-faaa322c4202}",
                "hidden": false,
                "name": "Developer PowerShell for VS 2022",
                "source": "Windows.Terminal.VisualStudio"
            }
        ]
    },
    "schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#012456",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell Powershell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#282C34",
            "black": "#282C34",
            "blue": "#61AFEF",
            "brightBlack": "#5A6374",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B6C2",
            "brightGreen": "#98C379",
            "brightPurple": "#C678DD",
            "brightRed": "#E06C75",
            "brightWhite": "#DCDFE4",
            "brightYellow": "#E5C07B",
            "cursorColor": "#FFFFFF",
            "cyan": "#56B6C2",
            "foreground": "#DCDFE4",
            "green": "#98C379",
            "name": "One Half Dark",
            "purple": "#C678DD",
            "red": "#E06C75",
            "selectionBackground": "#FFFFFF",
            "white": "#DCDFE4",
            "yellow": "#E5C07B"
        },
        {
            "background": "#FAFAFA",
            "black": "#383A42",
            "blue": "#0184BC",
            "brightBlack": "#4F525D",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B5C1",
            "brightGreen": "#98C379",
            "brightPurple": "#C577DD",
            "brightRed": "#DF6C75",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#E4C07A",
            "cursorColor": "#4F525D",
            "cyan": "#0997B3",
            "foreground": "#383A42",
            "green": "#50A14F",
            "name": "One Half Light",
            "purple": "#A626A4",
            "red": "#E45649",
            "selectionBackground": "#FFFFFF",
            "white": "#FAFAFA",
            "yellow": "#C18301"
        },
        {
            "background": "#002B36",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#FFFFFF",
            "cyan": "#2AA198",
            "foreground": "#839496",
            "green": "#859900",
            "name": "Solarized Dark",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#FDF6E3",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#002B36",
            "cyan": "#2AA198",
            "foreground": "#657B83",
            "green": "#859900",
            "name": "Solarized Light",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#FFFFFF",
            "cyan": "#06989A",
            "foreground": "#D3D7CF",
            "green": "#4E9A06",
            "name": "Tango Dark",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#FFFFFF",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#000000",
            "cyan": "#06989A",
            "foreground": "#555753",
            "green": "#4E9A06",
            "name": "Tango Light",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#000080",
            "brightBlack": "#808080",
            "brightBlue": "#0000FF",
            "brightCyan": "#00FFFF",
            "brightGreen": "#00FF00",
            "brightPurple": "#FF00FF",
            "brightRed": "#FF0000",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFF00",
            "cursorColor": "#FFFFFF",
            "cyan": "#008080",
            "foreground": "#C0C0C0",
            "green": "#008000",
            "name": "Vintage",
            "purple": "#800080",
            "red": "#800000",
            "selectionBackground": "#FFFFFF",
            "white": "#C0C0C0",
            "yellow": "#808000"
        }
    ]
}

If you take out "firstWindowPreference": "persistedWindowLayout", from your settings, does that fix it? I wonder if there's something in state.json that's causing the Terminal to crash on launch...

You're not using anything like minimizeToNOtificationArea, where the window would minimize and hide itself from the taskbar. I'm mildly worried that the terminal isn't actually crashing, it's just flickering visibility. We've had some issues with that in the past, but I thought we debounced that.

Also, which Terminal version are you using/? You can find this with wt -v (since the app won't stay open)

@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jun 14, 2022
@ygwarggis
Copy link
Author

I'm using WT 1.13.11431.0 freshly installed every time.

It's weird. So I changed one setting value, saved, and relaunched for EVERY setting preference I want to change individually (i.e. changed starting directory to C:, saved, relaunched. Then changed startup profile to Command Prompt, saved, relaunched...etc.) instead of making all the changes at once before saving and relaunching and it worked. I was able to launch it successfully every time. Even after Windows restart.

To test that theory, I uninstalled my "working" WT, at this point, and reinstalled it; opened it, changed ALL my preferred setting at once, saved, and relaunched....and..yup...it started flickering again and won't open.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 14, 2022
@zadjii-msft
Copy link
Member

QQ: does deleting state.json fix it? (back it up first, just in case) Maybe there's something there, with your combination of settings, that's triggering this.

@ygwarggis
Copy link
Author

Nope. That didn't work. I deleted state.json, replaced settings.json with a copy that's included with the app by default, made all the changes at once, saved, restarted the app. Wouldn't launch and still flickering icon. Can't even stop it in the task manager. Uninstalling it is the only way to kill it :/

Regardless, it's a great app. I'll just change my settings one at a time (thankfully, not too many.) I only have to do it once, so not too bothered by it.

@zadjii-msft
Copy link
Member

zadjii-msft commented Aug 1, 2022

Hmm. 1.13 predates the focus/fg work, so this isn't a side effect of that - at least I don't think it is.

I'm still trying to get a read on whatever's going on here. If you look at the Terminal in Task Manager, does it exit and reopen with a new PID each time/? Or is this just a single process, flashing its window uncontrollably?

There was some horrific flashing circa #13066, but again that should have only been on internal builds of 1.14 and should have been fixed before it shipped.

The profiles.defaults.elevate: true is maybe a little sus. Maybe that's what's happening? We are trying to relaunch as elevated, but then just... launching unelevated again in a loop? Or, or - oh. If the defaults are set to elevate:true, but also "firstWindowPreference": "persistedWindowLayout", then we'd load the layout, discover the profile wants to be elevated, then try to launch an elevated instance instead. yikes. That might be the interaction at play here.

But why would that flash in a loop then?

Theoretically, there'd be no unelevated window state to restore out of state.json. You'd open the terminal, we'd discover nothing/at most one tab, then try to open it, punt it to an elevated terminal instance, and that would open.... {the previous elevated windows' state, a window for the default profile}

For my own sake, I'm gonna xlink with #13596 cause restoring elevated window state is weird sometimes, and maybe we shouldn't?

@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Aug 1, 2022
@ghost
Copy link

ghost commented Aug 5, 2022

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.

@ghost ghost closed this as completed Aug 8, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity.
Projects
None yet
Development

No branches or pull requests

2 participants