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

Windows Terminal crashes when dragging a tab #15689

Open
mwaltersbmc opened this issue Jul 11, 2023 · 46 comments
Open

Windows Terminal crashes when dragging a tab #15689

mwaltersbmc opened this issue Jul 11, 2023 · 46 comments
Assignees
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Milestone

Comments

@mwaltersbmc
Copy link

Windows Terminal version

1.17.11461.0 and 1.18.1462.0

Windows build number

10.0.22000.1936

Other Software

No response

Steps to reproduce

Open Terminal and create a session of any type eg Command Prompt, ssh connection, Powershell

Left click on session tab and drag

Expected Behavior

Reorder tabs

Actual Behavior

Terminal crashes with no visible error message

Crashdumps are created in %LOCALAPPDATA%\CrashDumps

@mwaltersbmc mwaltersbmc 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 Jul 11, 2023
@mwaltersbmc
Copy link
Author

Also tested with Terminal 1.17.11461.0 on Windows 10.0.19045.3086 and the problem does not happen

@zadjii-msft
Copy link
Member

Can you share the crash dump with us/? There are some notes on this wiki page. Thanks!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 11, 2023
@zadjii-msft zadjii-msft added Severity-Crash Crashes are real bad news. Product-Terminal The new Windows Terminal. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 11, 2023
@zadjii-msft zadjii-msft added this to the Terminal v1.19 milestone Jul 11, 2023
@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 12, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Jul 16, 2023
@microsoft-github-policy-service

This comment was marked as outdated.

1 similar comment
@microsoft-github-policy-service

This comment was marked as duplicate.

@mwaltersbmc
Copy link
Author

Dump file provided privately

@microsoft-github-policy-service microsoft-github-policy-service bot 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 No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Jul 17, 2023
@zadjii-msft
Copy link
Member

zadjii-msft commented Jul 25, 2023

Sorry, out of curiousity, who did you send the dump to? I can't seem to find it in my emails anywhere 😕

EDIT gah I finally found it in the spam folder. That filter's a little too aggressive some times (and not nearly aggressive enough others)

@mwaltersbmc
Copy link
Author

Just to add - I have a colleague, also using W11, that can reproduce the issue using the same steps.

@zadjii-msft
Copy link
Member

zadjii-msft commented Jul 25, 2023

    Key  : Failure.Bucket
    Value: STOWED_EXCEPTION_c000027b_ntdll.dll!ZwWaitForWorkViaWorkerFactory

    Key  : Failure.Hash
    Value: {c2e540cf-b248-7db6-f41f-c703b9b4c1e5}

    Key  : Statistics.LastEvent.Exception.Code
    Value: 0xC000027B

    Key  : WER.OS.Version
    Value: 10.0.22000.1

    Key  : WER.Process.Version
    Value: 1.17.2305.26001

no dumps in watson.

stack
 # Child-SP          RetAddr               Call Site
00 00000066`a8cfdc30 00007ffa`532f0969     KERNELBASE!RaiseFailFastException+0x152 [minkernel\kernelbase\xcpt.c @ 1198] 
01 00000066`a8cfe210 00007ffa`39e5fe10     combase!RoFailFastWithErrorContextInternal2+0x4d9 [onecore\com\combase\winrt\error\error.cpp @ 1468] 
02 00000066`a8cfe480 00007ffa`39e60021     Windows_UI_Xaml!DirectUI::ErrorHelper::ProcessUnhandledError+0xf4 [onecoreuap\windows\dxaml\xcp\dxaml\lib\errorhelper.cpp @ 616] 
03 00000066`a8cfe4c0 00007ffa`39acac74     Windows_UI_Xaml!DirectUI::ErrorHelper::ReportUnhandledError+0xf1 [onecoreuap\windows\dxaml\xcp\dxaml\lib\errorhelper.cpp @ 502] 
04 (Inline Function) --------`--------     Windows_UI_Xaml!DirectUI::DXamlCore::FireEvent+0x32441a [onecoreuap\windows\dxaml\xcp\dxaml\lib\dxamlcore.cpp @ 2003] 
05 (Inline Function) --------`--------     Windows_UI_Xaml!AgCoreCallbacks::FireEvent+0x324443 [onecoreuap\windows\dxaml\xcp\dxaml\lib\fxcallbacks.cpp @ 93] 
06 (Inline Function) --------`--------     Windows_UI_Xaml!CFxCallbacks::JoltHelper_FireEvent+0x324443 [onecoreuap\windows\dxaml\xcp\dxaml\lib\fxcallbacks.cpp @ 1019] 
07 00000066`a8cfe540 00007ffa`397a666d     Windows_UI_Xaml!CCoreServices::CLR_FireEvent+0x3245e4 [onecoreuap\windows\dxaml\xcp\core\dll\xcpcore.cpp @ 3230] 
08 00000066`a8cfe610 00007ffa`398e353c     Windows_UI_Xaml!CommonBrowserHost::CLR_FireEvent+0x1d [onecoreuap\Windows\dxaml\xcp\control\common\shared\CommonBrowserHost.hpp @ 771] 
09 00000066`a8cfe650 00007ffa`3983d71a     Windows_UI_Xaml!CControlBase::ScriptCallback+0x16c [onecoreuap\windows\dxaml\xcp\control\common\shared\controlbase.cpp @ 267] 
0a 00000066`a8cfe6e0 00007ffa`3983d44d     Windows_UI_Xaml!CXcpDispatcher::OnScriptCallback+0x13a [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1376] 
0b 00000066`a8cfe780 00007ffa`3983d322     Windows_UI_Xaml!CXcpDispatcher::OnWindowMessage+0x3d [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1218] 
0c 00000066`a8cfe7c0 00007ffa`3983d220     Windows_UI_Xaml!CXcpDispatcher::ProcessMessage+0x72 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 927] 
0d 00000066`a8cfe800 00007ffa`53df1cac     Windows_UI_Xaml!CXcpDispatcher::WindowProc+0x90 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 841] 
0e 00000066`a8cfe870 00007ffa`53df17fc     user32!UserCallWinProcCheckWow+0x33c [clientcore\windows\core\ntuser\client\clmsg.cxx @ 282] 
0f 00000066`a8cfe9e0 00007ffa`53e04c6d     user32!DispatchClientMessage+0x9c [clientcore\windows\core\ntuser\client\daytona\objfre\amd64\client.cxx @ 3435] 
10 00000066`a8cfea40 00007ffa`55307b24     user32!__fnDWORD+0x3d [onecoreuap\restricted\windows\inc\ntuser\inc\ntcb.h @ 1214] 
11 00000066`a8cfeaa0 00007ffa`52d91434     ntdll!KiUserCallbackDispatcherContinue [minkernel\ntos\rtl\amd64\trampoln.asm @ 603] 
12 00000066`a8cfeb28 00007ffa`53df0ac4     win32u!ZwUserMessageCall+0x14 [onecoreuap\windows\core\umode\moderncore\objfre\amd64\usrstubs.asm @ 197] 
13 00000066`a8cfeb30 00007ffa`53df0797     user32!SendMessageWorker+0x2c4 [clientcore\windows\core\ntuser\client\clmsg.cxx @ 665] 
14 (Inline Function) --------`--------     user32!SendMessageInternal+0xfb [clientcore\windows\core\ntuser\client\clmsg.cxx @ 3633] 
15 00000066`a8cfebd0 00007ffa`398daa76     user32!SendMessageW+0x137 [onecoreuap\restricted\windows\inc\private\core\ntuser\client\cltxt.h @ 899] 
16 (Inline Function) --------`--------     Windows_UI_Xaml!CXcpDispatcher::SendMessageW+0x12 [onecoreuap\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 811] 
17 00000066`a8cfec30 00007ffa`39815203     Windows_UI_Xaml!CXcpBrowserHost::SyncScriptCallbackRequest+0x146 [onecoreuap\windows\dxaml\xcp\host\win\browserdesktop\winbrowserhost.cpp @ 1048] 
18 (Inline Function) --------`--------     Windows_UI_Xaml!CEventManager::RaiseControlEvents+0x19a [onecoreuap\windows\dxaml\xcp\core\dll\eventmgr.cpp @ 1133] 
19 00000066`a8cfecc0 00007ffa`39814bb7     Windows_UI_Xaml!CEventManager::Raise+0x513 [onecoreuap\windows\dxaml\xcp\core\dll\eventmgr.cpp @ 887] 
1a 00000066`a8cfedc0 00007ffa`399e89c0     Windows_UI_Xaml!CEventManager::RaiseRoutedEventBubbling+0x197 [onecoreuap\windows\dxaml\xcp\core\dll\eventmgr.cpp @ 1334] 
1b 00000066`a8cfee60 00007ffa`397ef572     Windows_UI_Xaml!ContentRootInput::PointerInputProcessor::ProcessPointerInput+0xd94 [onecoreuap\windows\dxaml\xcp\components\contentroot\pointerinputprocessor.cpp @ 591] 
1c 00000066`a8cfefd0 00007ffa`397ef391     Windows_UI_Xaml!CInputServices::ProcessInput+0x1c2 [onecoreuap\windows\dxaml\xcp\core\input\inputservices.cpp @ 888] 
1d 00000066`a8cff020 00007ffa`397ef206     Windows_UI_Xaml!CCoreServices::ProcessInput+0x45 [onecoreuap\windows\dxaml\xcp\core\dll\xcpcore.cpp @ 992] 
1e 00000066`a8cff050 00007ffa`399f8858     Windows_UI_Xaml!CXcpBrowserHost::HandleInputMessage+0x136 [onecoreuap\windows\dxaml\xcp\host\win\browserdesktop\winbrowserhost.cpp @ 1411] 
1f 00000066`a8cff120 00007ffa`399f86cc     Windows_UI_Xaml!CJupiterControl::HandlePointerMessage+0xfc [onecoreuap\windows\dxaml\xcp\dxaml\lib\jupitercontrol.cpp @ 754] 
20 00000066`a8cff1e0 00007ffa`399f857d     Windows_UI_Xaml!CJupiterWindow::OnIslandPointerMessage+0x108 [onecoreuap\windows\dxaml\xcp\dxaml\lib\jupiterwindow.cpp @ 2367] 
21 00000066`a8cff270 00007ffa`399f83d9     Windows_UI_Xaml!CXamlIslandRoot::InjectPointerMessage+0x65 [onecoreuap\windows\dxaml\xcp\core\core\elements\xamlislandroot.cpp @ 634] 
22 (Inline Function) --------`--------     Windows_UI_Xaml!CXamlIslandRoot::OnIslandPointerMoved+0x12 [onecoreuap\windows\dxaml\xcp\core\core\elements\xamlislandroot.cpp @ 558] 
23 (Inline Function) --------`--------     Windows_UI_Xaml!CXamlIslandRoot::SubscribeToPointerInputObserverEvents::__l27::<lambda_18714c66bdc179464f83501e730ba3b5>::operator()+0x2b [onecoreuap\windows\dxaml\xcp\core\core\elements\xamlislandroot.cpp @ 1452] 
24 00000066`a8cff2a0 00007ffa`36ad1607     Windows_UI_Xaml!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Internal::Input::IPointerInputObserver *>,Windows::Foundation::Internal::AggregateType<Windows::UI::Core::PointerEventArgs *,Windows::UI::Core::IPointerEventArgs *> >::*)(Windows::UI::Internal::Input::IPointerInputObserver *,Windows::UI::Core::IPointerEventArgs *)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::ITypedEventHandler<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Core::PointerEventArgs *>,Microsoft::WRL::FtmBase>,<lambda_18714c66bdc179464f83501e730ba3b5> &,-1,Windows::UI::Internal::Input::IPointerInputObserver *,Windows::UI::Core::IPointerEventArgs *>::Invoke+0x39 [onecore\external\sdk\inc\wrl\event.h @ 354] 
25 (Inline Function) --------`--------     InputHost!Microsoft::WRL::Details::CreateAgileHelper::__l2::<lambda_b5222d234632a4a0be2fddaf062a0811>::operator()+0x3d [onecore\external\sdk\inc\wrl\event.h @ 440] 
26 00000066`a8cff2d0 00007ffa`36ad017a     InputHost!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Internal::Input::IPointerInputObserver *>,Windows::Foundation::Internal::AggregateType<Windows::UI::Core::PointerEventArgs *,Windows::UI::Core::IPointerEventArgs *> >::*)(Windows::UI::Internal::Input::IPointerInputObserver *,Windows::UI::Core::IPointerEventArgs *)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::ITypedEventHandler<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Core::PointerEventArgs *>,Microsoft::WRL::FtmBase>,<lambda_b5222d234632a4a0be2fddaf062a0811>,-1,Windows::UI::Internal::Input::IPointerInputObserver *,Windows::UI::Core::IPointerEventArgs *>::Invoke+0x57 [onecore\external\sdk\inc\wrl\event.h @ 354] 
27 (Inline Function) --------`--------     InputHost!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Core::PointerEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >::InvokeAll::__l2::<lambda_f45aed66b5921ed661cdce4c5fc41fcc>::operator()+0x28 [onecore\external\sdk\inc\wrl\event.h @ 964] 
28 00000066`a8cff300 00007ffa`36acff4d     InputHost!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_f45aed66b5921ed661cdce4c5fc41fcc>,Windows::Foundation::ITypedEventHandler<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Core::PointerEventArgs *> >+0x72 [onecore\internal\sdk\inc\wrl\internalevent.h @ 121] 
29 00000066`a8cff360 00007ffa`36ad0633     InputHost!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Core::PointerEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >::DoInvoke<<lambda_f45aed66b5921ed661cdce4c5fc41fcc> >+0x75 [onecore\external\sdk\inc\wrl\event.h @ 954] 
2a (Inline Function) --------`--------     InputHost!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Core::PointerEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >::InvokeAll+0x35 [onecore\external\sdk\inc\wrl\event.h @ 964] 
2b (Inline Function) --------`--------     InputHost!PointerInputObserverWinRT::InvokeEventDirectlyHelper_Callback::__l2::<lambda_e3ec73fb4105148165e124077d5d30c6>::operator()+0x4d [onecoreuap\windows\moderncore\inputv2\components\attachableinputobject\system\windowsmessagedelivery\client\lib\PointerInputObserverWinRT.h @ 121] 
2c 00000066`a8cff3a0 00007ffa`36ad02c4     InputHost!Microsoft::WRL2::ContextSession::LeaveSession_Callback<<lambda_e3ec73fb4105148165e124077d5d30c6> >+0x77 [onecore\private\sdk\inc\wrl2\Wrl2Agile.h @ 1140] 
2d 00000066`a8cff400 00007ffa`36ad048d     InputHost!PointerInputObserverWinRT::InvokeEventDirectlyHelper_Callback<Microsoft::WRL2::ContextEventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Core::PointerEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >,PointerInputObserverWinRT::Api>+0x2c [onecoreuap\windows\moderncore\inputv2\components\attachableinputobject\system\windowsmessagedelivery\client\lib\PointerInputObserverWinRT.h @ 125] 
2e 00000066`a8cff450 00007ffa`36ad1993     InputHost!PointerInputObserverWinRT::InvokeEventHelper_Callback<Microsoft::WRL2::ContextEventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::Internal::Input::PointerInputObserver *,Windows::UI::Core::PointerEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >,PointerInputObserverWinRT::Api>+0x59 [onecoreuap\windows\moderncore\inputv2\components\attachableinputobject\system\windowsmessagedelivery\client\lib\PointerInputObserverWinRT.h @ 182] 
2f (Inline Function) --------`--------     InputHost!Microsoft::WRL::operator!=+0x39 [onecore\external\sdk\inc\wrl\client.h @ 823] 
30 00000066`a8cff490 00007ffa`36aab70f     InputHost!PointerInputObserverWinRT::OnWindowMessage_Callback+0xb3 [onecoreuap\windows\moderncore\inputv2\components\attachableinputobject\system\windowsmessagedelivery\client\lib\pointerinputobserverwinrt.cpp @ 437] 
31 00000066`a8cff4c0 00007ffa`36aaac66     InputHost!<lambda_7ff7aeac0ddd8d862d847848f86f2968>::operator()+0x43 [onecoreuap\windows\moderncore\inputv2\components\inputsitemanager\client\lib\system\windowsmessagedeliveryinputsitewinrt.cpp @ 142] 
32 00000066`a8cff4f0 00007ffa`36aab9fd     InputHost!InputSiteWinRT::ForEachAttachedObject+0xca [onecoreuap\windows\moderncore\inputv2\components\inputsitemanager\client\lib\system\inputsitewinrt.cpp @ 138] 
33 00000066`a8cff550 00007ffa`36aad148     InputHost!WindowsMessageDeliveryInputSiteWinRT::OnWindowMessage_Callback+0x8d [onecoreuap\windows\moderncore\inputv2\components\inputsitemanager\client\lib\system\windowsmessagedeliveryinputsitewinrt.cpp @ 137] 
34 00000066`a8cff610 00007ffa`36aab8f6     InputHost!SystemIslandInputSiteWinRT::OnWindowMessage_Callback+0x58 [onecoreuap\windows\moderncore\inputv2\components\inputsitemanager\client\lib\system\islandinputsitewinrt.cpp @ 304] 
35 00000066`a8cff640 00007ffa`36aadbd1     InputHost!WindowsMessageDeliveryInputSiteWinRT::Private::OnWindowMessage_Callback+0x96 [onecoreuap\windows\moderncore\inputv2\components\inputsitemanager\client\lib\system\windowsmessagedeliveryinputsitewinrt.cpp @ 262] 
36 00000066`a8cff710 00007ffa`36aadecf     InputHost!WindowsMessageDeliveryAdapter::ProcessWindowMessage_NoLock+0x10d [onecoreuap\windows\moderncore\inputv2\components\inputsitemanager\client\lib\system\windowsmessagedeliveryadapter.cpp @ 320] 
37 00000066`a8cff7f0 00007ffa`53df1cac     InputHost!WindowsMessageDeliveryAdapter::StaticWndProc+0xcf [onecoreuap\windows\moderncore\inputv2\components\inputsitemanager\client\lib\system\windowsmessagedeliveryadapter.cpp @ 262] 
38 00000066`a8cff830 00007ffa`53df0f06     user32!UserCallWinProcCheckWow+0x33c [clientcore\windows\core\ntuser\client\clmsg.cxx @ 282] 
39 00000066`a8cff9a0 00007ff6`51d21404     user32!DispatchMessageWorker+0x2a6 [clientcore\windows\core\ntuser\client\clmsg.cxx @ 3167] 
3a 00000066`a8cffa20 00007ff6`51d2f962     WindowsTerminal!wWinMain+0x194 [C:\a\_work\1\s\src\cascadia\WindowsTerminal\main.cpp @ 149] 
3b (Inline Function) --------`--------     WindowsTerminal!invoke_main+0x21 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 118] 
3c 00000066`a8cffe10 00007ffa`547e55a0     WindowsTerminal!__scrt_common_main_seh+0x106 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 
3d 00000066`a8cffe50 00007ffa`5526485b     kernel32!BaseThreadInitThunk+0x10 [clientcore\base\win32\client\thread.c @ 75] 
3e 00000066`a8cffe80 00000000`00000000     ntdll!RtlUserThreadStart+0x2b [minkernel\ntdll\rtlstrt.c @ 1152] 

Oh boy that looks like a XAML crash. Great. I'll try and find anything else like it.

Any chance this repros with the WinUI 2 Gallery? There's a page in that app that's got a TabView for testing

@carlos-zamora carlos-zamora removed the Needs-Attention The core contributors need to come back around and look at this ASAP. label Jul 26, 2023
@zadjii-msft
Copy link
Member

Out of curiosity, are you running the Terminal elevated? Or with UAC disabled (the EnableLua=0 thing)/?

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 26, 2023
@mwaltersbmc
Copy link
Author

Out of curiosity, are you running the Terminal elevated? Or with UAC disabled (the EnableLua=0 thing)/?

It's a corporate PC that has BeyondTrust privilege management software installed so I don't have options to run elevated.

@microsoft-github-policy-service microsoft-github-policy-service bot 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 Jul 27, 2023
@mwaltersbmc
Copy link
Author

Re WinUI - I installed and used the TabView samples under the Navigation section and was able to rearrange tabs on all the examples without a crash. I also launched the sample app and it too worked.

@zadjii-msft
Copy link
Member

It's a corporate PC that has BeyondTrust privilege management software installed

WELL That's sure an interesting observation.

Sorry to be just seemingly shooting in the dark on this. We've really ruled out most of the... usual... things that cause crashes like this, so I'm a bit shooting blindly.

As a test, can you rearrange tabs with the moveTab action?

@mwaltersbmc
Copy link
Author

I set ctrl+u to be move tab forward and then move tab backwards. In both cases it worked as expected and did not cause a crash.

@zadjii-msft
Copy link
Member

Okay, well at least that very specifically reduces the problem space to the drag/drop interaction, and not necessarily the "move tabs" implementation.

But it also doesn't repro in the XAML controls gallery. We're not doing too much different than what they do, especially in 1.17. Hmm.

Maybe my contacts on XAML will have some insight as to why I couldn't find the stowed exception, or how to get it out of the dump. That might help point a finger.

@lhecker
Copy link
Member

lhecker commented Sep 21, 2023

@zadjii-msft FYI What I meant is the manipulation of _tabView.TabItems() which is a vector owned by the WUX::Controls class.
It's similar to our previous use of SettingsNav().MenuItems() which resulted in random crashes.

@zadjii-msft
Copy link
Member

WELL that certainly would seem to point the finger at us.


CXamlIslandRoot::OnIslandPointerMoved ... _tabRow.PointerMoved({ get_weak(), &TerminalPage::_RestorePointerCursorHandler }); -

image

... Nah that seems like a dead end.

What I meant is the manipulation of _tabView.TabItems() which is a vector owned by the WUX::Controls class.

Oh I mean, that's certainly bound for pain. But at this point,

Single tab open ... Click on tab, move mouse slightly, remaining within tab limits - crash

we haven't done any tomfoolery with the TabItems yet, other than just add one.


Gonna keep picking through this dump but I can't find anything useful.

zadjii-msft added a commit that referenced this issue Oct 5, 2023
`GetAt` can throw if the index is out of range. We don't check that in
some places. This fixes some of those.

I don't think this will take care of #15689, but it might help?
DHowett pushed a commit that referenced this issue Oct 5, 2023
`GetAt` can throw if the index is out of range. We don't check that in
some places. This fixes some of those.

I don't think this will take care of #15689, but it might help?

(cherry picked from commit 5aaddda)
Service-Card-Id: 90731980
Service-Version: 1.18
DHowett pushed a commit that referenced this issue Oct 5, 2023
`GetAt` can throw if the index is out of range. We don't check that in
some places. This fixes some of those.

I don't think this will take care of #15689, but it might help?

(cherry picked from commit 5aaddda)
Service-Card-Id: 90731981
Service-Version: 1.19
@mwaltersbmc
Copy link
Author

I've just downloaded and tested Windows Terminal Preview v1.19.2831.0 and it fixes this issue. I can click on tabs and drag them to reorder or break out to a new window without crashing. Thank you!

Tested on the same Windows 11 system where Version: 1.19.2682.0 crashes attempting the same actions. I downloaded the new x64 release zip, unpacked to a new directory, created several SSH profiles that I frequently use and tested the actions that would fail on earlier versions. No crashes.

@zadjii-msft
Copy link
Member

I've just downloaded and tested Windows Terminal Preview v1.19.2831.0 and it fixes this issue

🙃

Well. That sure doesn't make any sense. Maybe this really was #16016 after all? @seamonstr you too?

@Summerh15

This comment was marked as off-topic.

@seamonstr
Copy link

seamonstr commented Oct 27, 2023 via email

@seamonstr
Copy link

seamonstr commented Oct 27, 2023 via email

@mwaltersbmc
Copy link
Author

Some further testing shows something a bit odd - using the WindowsTerminal app from the release download Microsoft.WindowsTerminalPreview_1.19.2831.0_x64.zip file the problem does not happen. I just unzipped the archive and double clicked on the binary to start the app. Dragging tabs does not cause a crash.
Terminal (Unpackaged)
Version: 1.19.231010001-preview

However, having updated my already installed Terminal preview app using Microsoft.WindowsTerminalPreview_1.19.2831.0_8wekyb3d8bbwe.msixbundle, I do get a crash when dragging tabs!
Windows Terminal Preview
Version: 1.19.2831.0

@zadjii-msft
Copy link
Member

wat

that's insane. I have no idea why that would make a difference. The package identity itself? That's insane. Especially since the WinUI 2 Gallery would also have package identity...

@mwaltersbmc
Copy link
Author

mwaltersbmc commented Nov 13, 2023

It may be related to permissions. I have the working wt.exe in c:\temp and if I open a DOS or PowerShell command prompt in that dir and run wt.exe then I can drag tabs without a crash. If I open the command prompt with "Run as administrator" launch wt.exe then dragging causes a crash.

@zadjii-msft
Copy link
Member

If I open the command prompt with "Run as administrator" launch wt.exe then dragging causes a crash

Oh, elevated (as admin) vs unelevated might be a valuable data point here. There's literally endless issues with elevated drag/drop. I don't think you're supposed to be able to do that at all actually

@mwaltersbmc
Copy link
Author

When I launch Terminal from the GUI it shows in Task Manager as running from C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.19.2831.0_x64__8wekyb3d8bbwe

However

cd "C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.19.2831.0_x64__8wekyb3d8bbwe"
Access is denied.

But I can dir the contents.

I've worked around the problem by creating a copy of the working set up in c:\apps\wt and running it from there and I can drag without issue - may be worth a shot @seamonstr

@mwaltersbmc
Copy link
Author

If I open the command prompt with "Run as administrator" launch wt.exe then dragging causes a crash

Oh, elevated (as admin) vs unelevated might be a valuable data point here. There's literally endless issues with elevated drag/drop. I don't think you're supposed to be able to do that at all actually

Tested on a Windows 10 system - run terminal as normal user and I can drag tabs without issue. Run elevated via right click Run As Admin and tab dragging doesn't work. No crash, dragging just doesn't do anything. Perhaps the BeyondTrust software is doing something odd with the way it handles elevated permissions.

The workaround of running the Terminal binary from the x64 release download rather than installed via the store is working for me so I'm happy to close this.

@zadjii-msft
Copy link
Member

Run elevated via right click Run As Admin and tab dragging doesn't work.

FWIW, that's unfortunately by design: #6661. The drag-drop service will CRASH YOUR APP if you run an app elevated and try to drag/drop tabs.

Perhaps that actually leads to the root cause here? Maybe BeyondTrust is getting up in the drag/drop service's business, and causing the drag/drop service to crash, bringing the Terminal down with it. We pre-emptively disable dragging if we know we're elevated (a known case that will crash us), but maybe there's something else unique going on here.

Then again, I dunno why it would act differently for the store package vs the unpackaged version 🤷

@korpx
Copy link

korpx commented May 24, 2024

The bug is still in v1.19.3172.0

@korpx
Copy link

korpx commented May 24, 2024

The bug is still in v1.20.11271.0

@SiMoStro
Copy link

SiMoStro commented Jun 3, 2024

Always replicating with 1.20.11215.0
This happens only when starting the Terminal with "Run as Administrator".

WindowsTerminal.exe.25164.dmp.zip
WindowsTerminal.exe.25364.dmp.zip

@zadjii-msft
Copy link
Member

This happens only when starting the Terminal with "Run as Administrator"

excuse me what? I was pretty confident that tab dragging is disabled entirely when running as Admin1. If it's not, then yea - the Terminal will always crash if a tab is dragged in an admin window.

Footnotes

  1. See: https://github.com/microsoft/terminal/blob/01e4df152e6e4d5156ef394412eb63025f7d743b/src/cascadia/TerminalApp/TerminalPage.cpp#L175-L176 -> https://github.com/microsoft/terminal/blob/01e4df152e6e4d5156ef394412eb63025f7d743b/src/cascadia/TerminalApp/AppLogic.cpp#L140 -> https://github.com/microsoft/terminal/blob/01e4df152e6e4d5156ef394412eb63025f7d743b/src/types/utils.cpp#L680

@SiMoStro
Copy link

SiMoStro commented Jun 3, 2024

Don't know what to say; in Admin mode tabs can be reordered, and it crashes 🤷
And no matter if it's the ZIP or the Store-installed version: it's the same for both.

@seamonstr
Copy link

seamonstr commented Jun 3, 2024 via email

@zadjii-msft zadjii-msft modified the milestones: Terminal v1.21, Backlog Sep 4, 2024
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-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Projects
Status: To Cherry Pick
Development

No branches or pull requests

9 participants