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 dragged to another monitor #3303

Closed
skylarnam opened this issue Oct 23, 2019 · 47 comments · Fixed by #3832
Closed

Terminal crashes when dragged to another monitor #3303

skylarnam opened this issue Oct 23, 2019 · 47 comments · Fixed by #3832
Assignees
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-Crash Crashes are real bad news. Tracking-External This bug isn't resolved, but it's following an external workitem.
Milestone

Comments

@skylarnam
Copy link

skylarnam commented Oct 23, 2019

Environment

Windows build number:  Microsoft Windows [Version 10.0.18362.418]
Windows Terminal version (if applicable): 0.6.2951.0

Steps to reproduce

  1. Open Windows Terminal with "only one tab open"
  2. Drag to another monitor with a lower resolution (from 2160p to 1080p)

Expected behavior

Terminal is dragged onto another monitor

Actual behavior

It crashes.
Funny thing: The terminal doesn't crash when I have more than one tab open.

@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 Oct 23, 2019
@DHowett-MSFT
Copy link
Contributor

/feedback

@ghost
Copy link

ghost commented Oct 24, 2019

Hi there!

Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?

Thanks!

image image

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Oct 24, 2019
@9jaGuy
Copy link

9jaGuy commented Oct 24, 2019

https://aka.ms/AA6eg31

@aaroneuph
Copy link

This is also happening for me after upgrading to the latest windows-terminal version. My monitors are all the same resolution though. I can confirm that the issue doesn't occur with multiple tabs open.

Windows build number: Microsoft Windows [Version 10.0.18362.0]
Windows Terminal Version: 0.6.2951.0

@flickerfly
Copy link

Same experience on Windows 10 with 0.6.2951.0. Adding another tab is a simple work around (Thanks @skylarnam for noticing that.)

Here's the feedback info that hopefully has the details you need: https://aka.ms/AA6e2dw

@flickerfly
Copy link

Scenario #1) If I open WSL and close PowerShell, (having one tab with WSL open) then drag over it works fine. If I then open PowerShell and close WSL and drag to any monitor it works until I try dragging from my primary display onto another display.

Scenario #2) If I open Terminal, add a WSL tab, close the PowerShell tab, then open a new PowerShell tab and close WSL. Then drag from the primary display to another it crashes.

Conclusions: This only impacts dragging from the primary display when a PowerShell tab is the only open tab, but not necessarily the first open tab.

@CosmicCatnap
Copy link

Scenario #1) If I open WSL and close PowerShell, (having one tab with WSL open) then drag over it works fine. If I then open PowerShell and close WSL and drag to any monitor it works until I try dragging from my primary display onto another display.

Scenario #2) If I open Terminal, add a WSL tab, close the PowerShell tab, then open a new PowerShell tab and close WSL. Then drag from the primary display to another it crashes.

Conclusions: This only impacts dragging from the primary display when a PowerShell tab is the only open tab, but not necessarily the first open tab.

Seeing this behavior as well. My default start behavior is to open a WSL session which will die upon letting go of the mouse click after dragging the terminal window to any other monitor. If I have cmd as my first tab then drag+drop works fine. Its clearly dying when letting go of the click, not on the drag.

@skylarnam
Copy link
Author

skylarnam commented Oct 24, 2019

Hi, I just sent a feedback using the Feedback Hub. Thanks everyone for more details.

https://aka.ms/AA6e9sl

@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 Oct 24, 2019
@waltiam
Copy link

waltiam commented Oct 25, 2019

It has nothing to do with the drag ... the same crash behaviour is exhibited if you use the windows + arrow keys

@decstewartje
Copy link

Nasty bug... thanks for the workaround with the two tabs!

@winstonhenke
Copy link

winstonhenke commented Oct 28, 2019

For me the multiple tabs work around only works if one of the tabs is CMD

edit: Also noticed it's only when moving from my laptop screen(4k) to an external monitor(1080p). Moving between my external monitors seems fine. Maybe due to them using different graphic cards?

@CosmicCatnap
Copy link

It has nothing to do with the drag ... the same crash behaviour is exhibited if you use the windows + arrow keys

which is 100% what I said.

@zadjii-msft zadjii-msft added Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news. labels Oct 28, 2019
@zadjii-msft zadjii-msft added this to the Terminal v1.0 milestone Oct 28, 2019
@lbalmont
Copy link

lbalmont commented Oct 30, 2019

I have open the #3376 bu it's same issue, just I add : when it's on the same Graphic card, it's ok (4K to 1080p ok), but not when I drag and drop from screen on my external card to a screen on my internal card. Same workaround, it's ok with 2 tabs.

@adrianmoya
Copy link

Just hit this bug. The multiple tabs with cmd workaround is the only thing that works for me.

@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Oct 31, 2019
@zadjii-msft zadjii-msft self-assigned this Oct 31, 2019
@JustinGrote
Copy link

My notes: Win-Shift-Left and Win-Shift-Right work fine, its just when "dragging" the window.

@dansanduleac
Copy link

dansanduleac commented Nov 12, 2019

I'm hitting the exact same issue on 2 monitors, but for me it crashes on startup no matter what.

Specifically it's crashing at the exact same fault offset mentioned in #3539, which I see was marked as a dupe of this issue.
This occurs on a clean profile too.

Windows 1.0.1910.3002, any recent terminal version.
FWIW in my normal profile the default shell is a WSL2 Ubuntu installation, if that matters.

https://aka.ms/AA6kfpy

@T313C0mun1s7
Copy link

I hope I am not muddying the waters here, but my issues looks like it could possibly be related.

I just switched from a dual monitor setup (2 x 27" @ 1080p with 100% scaling) to a single monitor (32" @ 4k with 125% scaling) and now if I open terminal it opens the window and then crashes straight away. So I am not actually moving a working terminal window to a different display, but rather launching it into a different display environment with the result being that it crashes immediately.

@eromoe
Copy link

eromoe commented Nov 20, 2019

@T313C0mun1s7 I think it is because terminal remembered the last postition and tried to restore to original possition , then got crushed . Looks like a new problem .

I saw such behavious on some other programs , though them were usually unreachable(invisible) instead of crash .
Moreover, if you are using displayfustion or some else dual taskbar/monitor softwares, they may be the problem too.

@zadjii-msft
Copy link
Member

Hey everyone, just an update here:

I've dug real deep into XAML over the last week, and working with @teaP, we were able to find that the source of the E_LAYOUTCYCLE wasn't coming from the Windows Terminal code, it was coming from the TabView code itself. Fortunately, @teaP has whipped up a fix for us, which should be available on the next update of Microsoft.UI.Xaml 🎉.

At the time of writing it's unclear when we'll ingest that update and push an update to the store. We'll keep you posted in this thread when we know more. Thanks all for help with getting repro steps found!

@IlanVivanco
Copy link

Same problem here.
Multiple tabs workaround only works if one of the tabs is CMD.

@simmessa
Copy link

Happens to me as well, also when I'm dragging to a monitor with a bigger resolution (tested with 1080p to 1440p), maybe the problem's not with the dragging to another monitor alone but happens when I'm dragging to the left or right side of the screen (similar to WIN+L or WIN+R shortcuts) like I normally do with my windows.

Thanks,

Simone.

@ghost ghost added the In-PR This issue has a related PR label Dec 4, 2019
@ghost ghost closed this as completed in #3832 Dec 4, 2019
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Dec 4, 2019
ghost pushed a commit that referenced this issue Dec 4, 2019
## Summary of the Pull Request

Updates MUX to the latest pre-release version. This prerelease has a fix for a certain `E_LAYOUTCYCLE` bug in the TabView that was causing an untold number of crashes for us.

Thanks again @teaP!

## PR Checklist
* [x] Closes #3303
* [x] Closes #2277
* [x] I work here
* [n/a] Tests added/passed
* [n/a] Requires documentation to be updated
DHowett-MSFT pushed a commit that referenced this issue Dec 4, 2019
Updates MUX to the latest pre-release version. This prerelease has a fix for a certain `E_LAYOUTCYCLE` bug in the TabView that was causing an untold number of crashes for us.

Thanks again @teaP!

* [x] Closes #3303
* [x] Closes #2277
* [x] I work here
* [n/a] Tests added/passed
* [n/a] Requires documentation to be updated

(cherry picked from commit 2f0abc2)
@ghost
Copy link

ghost commented Dec 6, 2019

🎉This issue was addressed in #3832, which has now been successfully released as Windows Terminal Preview v0.7.3382.0.:tada:

Handy links:

@JustinGrote
Copy link

For what it's worth, your amusing release notes keep me coming back. Thanks for the hard work.

@DHowett-MSFT
Copy link
Contributor

@JustinGrote thanks 😁

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-Crash Crashes are real bad news. Tracking-External This bug isn't resolved, but it's following an external workitem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.