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

Application crashes when focusFollowMouse is enabled #15412

Closed
pol73 opened this issue May 24, 2023 · 8 comments · Fixed by #15420
Closed

Application crashes when focusFollowMouse is enabled #15412

pol73 opened this issue May 24, 2023 · 8 comments · Fixed by #15420
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR 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.

Comments

@pol73
Copy link

pol73 commented May 24, 2023

Windows Terminal version

1.18.1421.0

Windows build number

22621.1344

Other Software

WSL
FarManager

Steps to reproduce

Open profile entry.

Expected Behavior

Open screen of application.

Actual Behavior

WindowsTermninal application aborted with error:

Faulting application name: WindowsTerminal.exe, version: 1.18.2305.22001, time stamp: 0x646c16cf
Faulting module name: ucrtbase.dll, version: 10.0.22621.608, time stamp: 0xf5fc15a3
Exception code: 0xc0000409
Fault offset: 0x000000000007f61e
Faulting process id: 0x0xEB4
Faulting application start time: 0x0x1D98DEF4ED2D0CD
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.18.1421.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: d5f35825-bb26-459f-91ef-20e1e8e5c9cc
Faulting package full name: Microsoft.WindowsTerminalPreview_1.18.1421.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App


Fault bucket , type 0
Event Name: MoBEX
Response: Not available
Cab Id: 0

Problem signature:
P1: Microsoft.WindowsTerminalPreview_1.18.1421.0_x64__8wekyb3d8bbwe
P2: praid:App
P3: 1.18.2305.22001
P4: 646c16cf
P5: ucrtbase.dll
P6: 10.0.22621.608
P7: f5fc15a3
P8: 000000000007f61e
P9: c0000409
P10: 0000000000000007

Attached files:

These files may be available here:
\?\C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_Microsoft.Window_c2d345a83ebd4f63f65431ce4b20f769d6644d_03f0cf04_e1e6e590-85ca-4740-a653-a1e60ec30e78

Analysis symbol:
Rechecking for solution: 0
Report Id: d5f35825-bb26-459f-91ef-20e1e8e5c9cc
Report Status: 4100
Hashed bucket:
Cab Guid: 0


Fault bucket 1525387907268971424, type 5
Event Name: MoBEX
Response: Not available
Cab Id: 0

Problem signature:
P1: Microsoft.WindowsTerminalPreview_1.18.1421.0_x64__8wekyb3d8bbwe
P2: praid:App
P3: 1.18.2305.22001
P4: 646c16cf
P5: ucrtbase.dll
P6: 10.0.22621.608
P7: f5fc15a3
P8: 000000000007f61e
P9: c0000409
P10: 0000000000000007

Attached files:
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.86404f2d-8a99-494e-9315-eeb0acc11a2a.tmp.WERInternalMetadata.xml

These files may be available here:
\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_Microsoft.Window_c2d345a83ebd4f63f65431ce4b20f769d6644d_03f0cf04_e1e6e590-85ca-4740-a653-a1e60ec30e78

Analysis symbol:
Rechecking for solution: 0
Report Id: d5f35825-bb26-459f-91ef-20e1e8e5c9cc
Report Status: 268439552
Hashed bucket: 48cb60da2fa68c80e52b443845718ba0
Cab Guid: 0

@pol73 pol73 added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 24, 2023
@zadjii-msft
Copy link
Member

BucketDetails?BucketIdentifier=48cb60da-2fa6-8c80-e52b-443845718ba0 seems to have... two different failures in it?

  • The first was from a test machine, so I'm not sure how real that is
  • Failure?FailureSearchText=99935d8e-2b64-88fd-6c7d-2215bf2e8270 is FAIL_FAST_FATAL_APP_EXIT_c0000409_TerminalApp.dll!winrt::Windows::Foundation::IUnknown::try_as_winrt::Microsoft::Terminal::Control::TermControl_
    • There's only a couple cabs here... maybe not enough to work with?
    • Filed as MSFT:44764490

Looks like the crash is attributed to L959 here:

events.focusToken = control.FocusFollowMouseRequested([dispatcher, weakThis](auto&& sender, auto&&) -> winrt::fire_and_forget {
co_await wil::resume_foreground(dispatcher);
if (const auto tab{ weakThis.get() })
{
if (tab->_focusState != FocusState::Unfocused)
{
if (const auto termControl{ sender.try_as<winrt::Microsoft::Terminal::Control::TermControl>() })
{
termControl.Focus(FocusState::Pointer);
}
}
}
});

Do you happen to have focusFollowMouse enabled?

I suppose just looking at that code, we're taking the parameter by reference, which is bad for a coroutine. I don't really think this should have regressed in 1.18. Maybe there's another root cause hiding. I'll trawl through more dumps.

@zadjii-msft zadjii-msft added the Severity-Crash Crashes are real bad news. label May 24, 2023
@zadjii-msft zadjii-msft added this to the Terminal v1.19 milestone May 24, 2023
@pol73
Copy link
Author

pol73 commented May 24, 2023

You right.
For "focusFollowMouse" was by set value to "true".
With set to "false" error does not replicable.

@zadjii-msft
Copy link
Member

Well that's really helpful! If turning that off fixes this, then surely that must be the real source of this bug. That's something we can fix easily enough.

@zadjii-msft zadjii-msft added Help Wanted We encourage anyone to jump in on these. Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 24, 2023
@zadjii-msft
Copy link
Member

huh, does "focusFollowMouse": true, even work at ALL in 1.17? I don't think it does 😐

@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label May 24, 2023
@lhecker lhecker changed the title Application aborted with error. Application crashes when focusFollowMouse is enabled May 24, 2023
@lhecker
Copy link
Member

lhecker commented May 24, 2023

@dovholuknf Let's continue talking over here if you don't mind. I'm sorry that we broke your feature. As far as we can tell, it was already broken in 1.17 and we honestly don't know how it worked to begin with. It might've been a compiler update that broke it? It's definitely very weird.

Edit: Nevermind, I completely missed that Dustin released 1.17 stable yesterday: https://github.com/microsoft/terminal/releases/tag/v1.17.11391.0
If you use the non-Preview Windows Terminal now, you'll get 1.17. You can even opt into using AtlasEngine if you need the >60 FPS.

@dovholuknf
Copy link

dovholuknf commented May 24, 2023

I was already here reading this issue. I can wait a week, i'll survive as long as it's getting fixed with haste. :) My store has app updates on, but for some reason my 'old terminal' is 1.16 (Version: 1.16.10262.0) and not 1.17... Is there a third install of terminal I don't know about?

@lhecker
Copy link
Member

lhecker commented May 24, 2023

Our GitHub releases are being released independently of the store releases, because those are still sort of "manual" unfortunately, whereas GitHub releases are mostly automated. But they use the exact same .msixbundle, so it doesn't really matter which one you install. You can get 1.17 stable here: https://github.com/microsoft/terminal/releases/tag/v1.17.11391.0

@dovholuknf
Copy link

focusFollowMouse crashes 1.17 too fwiw... i guess I'll just live with 1.18 and focusFollowMouse = false

microsoft-github-policy-service bot pushed a commit that referenced this issue May 25, 2023
Because this looks like it's entirely broken in `main`, and possibly in
1.17(?)

We didn't take a strong ref to the coroutine parameter. As to be
expected, that explodes.

Closes #15412
@zadjii-msft zadjii-msft pinned this issue May 26, 2023
DHowett pushed a commit that referenced this issue May 26, 2023
Because this looks like it's entirely broken in `main`, and possibly in
1.17(?)

We didn't take a strong ref to the coroutine parameter. As to be
expected, that explodes.

Closes #15412

(cherry picked from commit 6775300)
Service-Card-Id: 89311373
Service-Version: 1.18
DHowett pushed a commit that referenced this issue May 26, 2023
Because this looks like it's entirely broken in `main`, and possibly in
1.17(?)

We didn't take a strong ref to the coroutine parameter. As to be
expected, that explodes.

Closes #15412

(cherry picked from commit 6775300)
Service-Card-Id: 89311372
Service-Version: 1.17
@DHowett DHowett unpinned this issue May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants