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

Xaml Islands Crash on Start #5766

Closed
hoo29 opened this issue Aug 25, 2021 · 25 comments
Closed

Xaml Islands Crash on Start #5766

hoo29 opened this issue Aug 25, 2021 · 25 comments
Labels
area-Islands Xaml Islands feature bug Something isn't working team-Reach Issue for the Reach team

Comments

@hoo29
Copy link

hoo29 commented Aug 25, 2021

Describe the bug

Raising based on advice from microsoft/terminal/issues/11025

When I start apps such as Windows Terminal or Microsoft PowerToys settings page, I very briefly see a window and then the app crashes. Event Viewer contains entries such as these:

Faulting application name: PowerToys.Settings.exe, version: 0.43.0.0, time stamp: 0x5e222541
Faulting module name: KERNELBASE.dll, version: 10.0.19041.1151, time stamp: 0x891df6d3
Exception code: 0xc000027b
Fault offset: 0x000000000010bd3e
Faulting process ID: 0xdbc
Faulting application start time: 0x01d799b68eb0cd0d
Faulting application path: C:\Program Files\PowerToys\Settings\PowerToys.Settings.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report ID: c419a60a-bf62-47c4-b429-801ff1665c6b
Faulting package full name: 
Faulting package-relative application ID: 
Faulting application name: WindowsTerminal.exe, version: 1.9.2107.13002, time stamp: 0x60edf3e3
Faulting module name: KERNELBASE.dll, version: 10.0.19041.1151, time stamp: 0x891df6d3
Exception code: 0xc000027b
Fault offset: 0x000000000010bd3e
Faulting process ID: 0xed0
Faulting application start time: 0x01d798dffb5a7eb6
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.9.1942.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report ID: ac419911-ee2b-4ffe-a588-009d02877944
Faulting package full name: Microsoft.WindowsTerminal_1.9.1942.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App

Steps to reproduce the bug
Open the settings page for Microsoft PowerToys
Open Windows Terminal

Expected behavior
They open

Screenshots
n/a

Version Info
Latest stable builds from GitHub / Microsoft Store

NuGet package version:
n/a

Windows version Saw the problem?
Insider Build (xxxxx)
May 2021 Update (19043) Yes
October 2020 Update (19042)
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context
Have tried

  • sfc /scannow
  • repair install of .NET Core 3.1 Desktop Runtime (v3.1.15) - Windows x64
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Aug 25, 2021
@zadjii-msft
Copy link
Member

I recommended filing this here because both the Terminal and the PowerToys settings are XAML Islands apps. I presumed that both crashing would indicate some sort of issue in Islands itself for this user.

@asklar
Copy link
Member

asklar commented Aug 25, 2021

can you please share a call stack trace? this may be the same as #5435

@hoo29
Copy link
Author

hoo29 commented Aug 26, 2021

I submitted a windows feedback item which I believe contains dumps https://aka.ms/AAdl7c0 which microsoft people can access?

This is the call stack when I open the dump file at AppData\Local\CrashDumps in VS.

KERNELBASE.dll!RaiseFailFastException�()
combase.dll!RoFailFastWithErrorContextInternal2(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V2 * * aStowedExceptionPointers) Line 1455
	at onecore\com\combase\winrt\error\error.cpp(1455)
Windows.UI.Xaml.dll!CXamlIslandRoot::InitInputObjects(Windows::UI::Internal::Input::IInputSite * const inputSite) Line 1226
	at onecoreuap\windows\dxaml\xcp\core\core\elements\xamlislandroot.cpp(1226)
Windows.UI.Xaml.dll!CXamlIslandRoot::InitializeInput() Line 179
	at onecoreuap\windows\dxaml\xcp\core\core\elements\xamlislandroot.cpp(179)
Windows.UI.Xaml.dll!CXamlIslandRoot::Initialize(Windows::UI::Composition::Desktop::IDesktopWindowContentBridgeInterop *) Line 298
	at onecoreuap\windows\dxaml\xcp\core\core\elements\xamlislandroot.cpp(298)
[Inline Frame] Windows.UI.Xaml.dll!DirectUI::XamlIsland::Initialize(Windows::UI::Composition::Desktop::IDesktopWindowContentBridgeInterop *) Line 49
	at onecoreuap\windows\dxaml\xcp\dxaml\lib\xamlisland_partial.cpp(49)
Windows.UI.Xaml.dll!ctl::make<DirectUI::XamlIsland,Windows::UI::Composition::Desktop::IDesktopWindowContentBridgeInterop *>(Windows::UI::Composition::Desktop::IDesktopWindowContentBridgeInterop * && ppNewInstance, ctl::Internal::ComPtrRef<ctl::ComPtr<DirectUI::XamlIsland>>) Line 82
	at onecoreuap\windows\dxaml\xcp\dxaml\lib\comInstantiation.h(82)
Windows.UI.Xaml.dll!DirectUI::FrameworkApplication::CreateIslandWithContentBridgeImpl(IInspectable * owner, IInspectable * contentBridge, Windows::UI::Xaml::Hosting::IXamlIsland * * returnValue) Line 160
	at onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkapplication_partial.cpp(160)
Windows.UI.Xaml.dll!DirectUI::FrameworkApplicationGenerated::CreateIslandWithContentBridge(IInspectable * pOwner, IInspectable * pContentBridge, Windows::UI::Xaml::Hosting::IXamlIsland * * ppResult) Line 229
	at onecoreuap\windows\dxaml\xcp\dxaml\lib\winrtgeneratedclasses\frameworkapplication.g.cpp(229)
Windows.UI.Xaml.dll!DirectUI::DesktopWindowXamlSource::Initialize() Line 246
	at onecoreuap\windows\dxaml\xcp\dxaml\lib\desktopwindowxamlsource_partial.cpp(246)
Windows.UI.Xaml.dll!ctl::ComObjectBase::CreateInstanceBase(ctl::ComBase * pNewInstance, unsigned int) Line 52
	at onecoreuap\windows\dxaml\xcp\components\com\comobjectbase.cpp(52)
Windows.UI.Xaml.dll!ctl::ComObject<DirectUI::DesktopWindowXamlSource>::CreateInstance(IInspectable * ppNewInstance, IInspectable * *) Line 147
	at onecoreuap\windows\dxaml\xcp\components\com\inc\ComObject.h(147)
[Inline Frame] Windows.UI.Xaml.dll!ctl::ComObject<DirectUI::DesktopWindowXamlSource>::CreateInstance(IInspectable * *) Line 140
	at onecoreuap\windows\dxaml\xcp\components\com\inc\ComObject.h(140)
Windows.UI.Xaml.dll!ctl::AggregableActivationFactory<DirectUI::DesktopWindowXamlSource>::ActivateInstanceStatic(IInspectable * pOuter, IInspectable * * instance, bool) Line 229
	at onecoreuap\windows\dxaml\xcp\dxaml\lib\ComTemplateLibrary.h(229)
Windows.UI.Xaml.dll!ctl::ValidateFactoryCreateInstanceWithAggregableActivationFactory<DirectUI::DesktopWindowXamlSource,Windows::UI::Xaml::Hosting::IDesktopWindowXamlSource>(IInspectable * const pOuter, IInspectable * * const ppInner, IUnknown * * ppInstance, KnownTypeIndex) Line 430
	at onecoreuap\windows\dxaml\xcp\dxaml\lib\ComTemplateLibrary.h(430)
Windows.UI.Xaml.dll!DirectUI::DesktopWindowXamlSourceFactory::CreateInstance(IInspectable * pOuter, IInspectable * * ppInner, Windows::UI::Xaml::Hosting::IDesktopWindowXamlSource * * ppInstance) Line 200
	at onecoreuap\windows\dxaml\xcp\dxaml\lib\winrtgeneratedclasses\desktopwindowxamlsource.g.cpp(200)
WindowsTerminal.exe!00007ff7a73310f0()
WindowsTerminal.exe!00007ff7a7330f6b()
WindowsTerminal.exe!00007ff7a7330dae()
WindowsTerminal.exe!00007ff7a732542e()
WindowsTerminal.exe!00007ff7a7323c54()
WindowsTerminal.exe!00007ff7a73232c6()
WindowsTerminal.exe!00007ff7a73217f1()
WindowsTerminal.exe!00007ff7a73291c2()
kernel32.dll!BaseThreadInitThunk�()
ntdll.dll!RtlUserThreadStart�()

More than happy to send over the dmp files if needed.

@hoo29
Copy link
Author

hoo29 commented Sep 8, 2021

asklar - does the stack trace above help?

@asklar
Copy link
Member

asklar commented Sep 8, 2021

I couldn't glean anything from the dumps in the Feedback Hub bug unfortunately, and I'm out of the office for a couple of weeks :). @zadjii-msft @DHowett can you guys follow up?

@zadjii-msft
Copy link
Member

I think @minksa was taking a look at this in #5435?

@StephenLPeters
Copy link
Contributor

@hoo29 #5435 only repros on older versions of windows 10 (19h1 and 19h2 I think), you are seeing this on 21h1?

@StephenLPeters StephenLPeters added area-Islands Xaml Islands feature needs-author-feedback Asked author to supply more information. team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Sep 16, 2021
@hoo29
Copy link
Author

hoo29 commented Sep 17, 2021

Yep
image

@ghost ghost added needs-triage Issue needs to be triaged by the area owners and removed needs-author-feedback Asked author to supply more information. labels Sep 17, 2021
@StephenLPeters
Copy link
Contributor

@zadjii-msft and @miniksa given that this repros on 21h1 I don't think this is a dupe of #5435, have you seen this issue in terminal?

@zadjii-msft
Copy link
Member

I haven't come across any other reports of this, no.

@ranjeshj ranjeshj added team-Reach Issue for the Reach team and removed team-Controls Issue for the Controls team labels Sep 29, 2021
@ranjeshj
Copy link
Contributor

@kmelmon as FYI

@bpulliam bpulliam added needs-repro bug Something isn't working and removed needs-triage Issue needs to be triaged by the area owners labels Oct 5, 2021
@hoo29
Copy link
Author

hoo29 commented Oct 15, 2021

To add - I have also tried disabling all non MS startup apps, scheduled tasks, and services with no luck.

@htcfreek
Copy link

htcfreek commented Nov 7, 2021

We have a crash with the same crash data for PowerRemame too: On starting the app and sometimes (if start works) on resizing the window: microsoft/PowerToys#14180

@StephenLPeters
Copy link
Contributor

@marb2000 FYI

@stefansjfw
Copy link

Some more info here microsoft/PowerToys#14356, looks like it can be related to screen resolution and DPI

@hoo29
Copy link
Author

hoo29 commented Nov 16, 2021

Had a play by disabling my second monitor and trying out the resolutions mentioned in the other thread. Sadly, it did not change the behaviour for me.

e - to clarify I tried the resolutions and scaling settings mentioned.

@stefansjfw
Copy link

@hoo29 What is your default resolution and dpi? Can you try installing latest PowerToys and check whether PowerRename works for you? Thanks in advance!

@hoo29
Copy link
Author

hoo29 commented Nov 16, 2021

Main monitor is 2560x1440 at 100% scaling. Installed PowerToys 0.49.1 but PowerRename (and the other apps) don't work for me with the same issue.

@stefansjfw
Copy link

@hoo29 Did you try installing latest version of .NET core desktop? Just to rule out that one...

@hoo29
Copy link
Author

hoo29 commented Nov 17, 2021

Downloaded and installed the desktop runtime and runtime from https://dotnet.microsoft.com/download/dotnet/3.1 but no dice.

@MrM40
Copy link

MrM40 commented Aug 14, 2022

Version 1.13.220208005-release1.13 run fine, but 1.15.2207.19003 close immediately and give me the KERNELBASE.dll error in event viewer.
Running W10 LTSC 21H1

@MrM40
Copy link

MrM40 commented Aug 14, 2022

image
Ahh, I see it now Windows 11. I had to paste the picture here before I could see it :-P

@zadjii-msft
Copy link
Member

Woah wait if that's the issue, then the root cause all this time has just been "you're missing the vclibs". The Windows 10 Terminal package ships those in our package, while the Windows 11 version doesn't. The Windows 11 version of the package can get away with this, because there were certain fixes to framework packages in Windows 11 that weren't able to be backported to Windows 10[1]. If you're on Windows 10, then yea, install the Windows 10 version of the Terminal.

This probably applies to PowerToys too - if PT is using MUX then they too would be assuming that the VCLibs get installed properly as a dependency here.

[1]: this is a mild fact. My memory might be hazy here.

@MrM40
Copy link

MrM40 commented Aug 15, 2022

I must admit I install WT manually (extract the .msixbundle file etc)....I only had my eyes on the version numbers.
I did wonder about the size difference though, but now it all make sense :-))

@hoo29
Copy link
Author

hoo29 commented Aug 15, 2022

Since raising this issue I have installed windows 11 and this is no longer a problem, I will close this issue.

I did install WT from Microsoft store as part of the testing so would have assumed that gave me the W10 version with the required deps.

@hoo29 hoo29 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Islands Xaml Islands feature bug Something isn't working team-Reach Issue for the Reach team
Projects
None yet
Development

No branches or pull requests

9 participants