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

WinUI 3.0 in Desktop crash on startup #2773

Closed
smk2007 opened this issue Jun 28, 2020 · 7 comments
Closed

WinUI 3.0 in Desktop crash on startup #2773

smk2007 opened this issue Jun 28, 2020 · 7 comments
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps area-ProjectSystem needs-review 👀 product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@smk2007
Copy link
Member

smk2007 commented Jun 28, 2020

The unmodified "Blank App, Packaged (WinUI in Desktop)" visual studio project template crashes on startup with error:
Unhandled exception at 0x00007FFE94FF6589 (Microsoft.Internal.XamlUdk.dll) in App16.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x000002F2E3AD6350, 0x0000000000000001).
I am on 1803, OS Build 17134.1550.

Steps to reproduce the behavior:

  1. Install Windows 10 OS 1803, OS Build 17134.1550.
  2. Install Microsoft Visual Studio Enterprise 2019 Preview (Version 16.7.0 Preview 3.1)
  3. Include .NET Desktop Development, Universal Windows Platform development, Desktop development with C++, and The C++ (v142) Universal Windows Platform tools
  4. Create a new "Blank App, Packaged (WinUI in Desktop)" visual studio project
  5. Build application project (Debug, x86).
  6. Run the exe produced.
    Note the crash that occurs in:
    template WINRT_IMPL_AUTO(void) consume_Microsoft_UI_Xaml_IApplicationStatics::Start(Microsoft::UI::Xaml::ApplicationInitializationCallback const& callback) const
    {
    check_hresult(WINRT_IMPL_SHIM(Microsoft::UI::Xaml::IApplicationStatics)->Start(*(void**)(&callback)));
    }

Unhandled exception at 0x00007FFE94FF6589 (Microsoft.Internal.XamlUdk.dll) in App16.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x000002F2E3AD6350, 0x0000000000000001).

Expected behavior
No Crashes.

Screenshots
N/A

Version Info
NuGet package version:
[Microsoft.WinUI 3.0.0-preview1.200515.3]

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

Additional context

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jun 28, 2020
@huoyaoyuan
Copy link

Probably related: #2677

@smk2007
Copy link
Member Author

smk2007 commented Jun 28, 2020

Call Stack

combase.dll!RoFailFastWithErrorContextInternal2(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V2 * * aStowedExceptionPointers) Line 1455
at onecore\com\combase\winrt\error\error.cpp(1455)
Microsoft.Internal.XamlUdk.dll!_FailFastWithStowedExceptionInfo@12�()
Microsoft.UI.Xaml.dll!UdkShim::FailFastWithStowedExceptions(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V2 * * aStowedExceptionPointers) Line 85
at E:\BA\51\s\dxaml\xcp\components\UdkShim\UdkShim.cpp(85)
Microsoft.UI.Xaml.dll!FailFastWithStowedExceptions(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V2 * * aStowedExceptionPointers) Line 93
at E:\BA\51\s\dxaml\xcp\components\UdkShim\UdkShim.cpp(93)
Microsoft.UI.Xaml.dll!CXcpDispatcher::Init(IXcpHostSite * pSite) Line 356
at E:\BA\51\s\dxaml\xcp\win\shared\xcpwindow.cpp(356)
Microsoft.UI.Xaml.dll!CXcpDispatcher::Create(IXcpHostSite * pSite, IXcpDispatcher * * ppInterface) Line 505
at E:\BA\51\s\dxaml\xcp\win\shared\xcpwindow.cpp(505)
Microsoft.UI.Xaml.dll!CJupiterControl::Init() Line 145
at E:\BA\51\s\dxaml\xcp\dxaml\lib\JupiterControl.cpp(145)
Microsoft.UI.Xaml.dll!CJupiterControl::Create(CJupiterControl * * ppControl) Line 32
at E:\BA\51\s\dxaml\xcp\dxaml\lib\JupiterControl.cpp(32)
Microsoft.UI.Xaml.dll!DirectUI::DXamlCore::InitializeInstance(InitializationType initializationType, bool runWithoutCoreApplication) Line 373
at E:\BA\51\s\dxaml\xcp\dxaml\lib\DXamlCore.cpp(373)
Microsoft.UI.Xaml.dll!DirectUI::DXamlCore::InitializeImpl(InitializationType initializationType, bool runWithoutCoreApplication) Line 2628
at E:\BA\51\s\dxaml\xcp\dxaml\lib\DXamlCore.cpp(2628)
Microsoft.UI.Xaml.dll!DirectUI::FrameworkApplication::StartDesktop() Line 188
at E:\BA\51\s\dxaml\xcp\dxaml\lib\FrameworkApplication_Partial.cpp(188)
[External Code]
App18.exe!winrt::impl::consume_Microsoft_UI_Xaml_IApplicationStaticswinrt::Microsoft::UI::Xaml::IApplicationStatics::Start(const winrt::Microsoft::UI::Xaml::ApplicationInitializationCallback & callback) Line 260
at C:\Users\sheil\source\repos\App18\App18\Generated Files\winrt\Microsoft.UI.Xaml.h(260)
App18.exe!winrt::Microsoft::UI::Xaml::Application::Start::__l2::(const winrt::Microsoft::UI::Xaml::IApplicationStatics & f) Line 12898
at C:\Users\sheil\source\repos\App18\App18\Generated Files\winrt\Microsoft.UI.Xaml.h(12898)
App18.exe!winrt::impl::factory_cache_entrywinrt::Microsoft::UI::Xaml::Application,winrt::Microsoft::UI::Xaml::IApplicationStatics::call<void (const winrt::Microsoft::UI::Xaml::IApplicationStatics &) &>(winrt::Microsoft::UI::Xaml::Application::Start::__l2::void (const winrt::Microsoft::UI::Xaml::IApplicationStatics &) & callback) Line 5984
at C:\Users\sheil\source\repos\App18\App18\Generated Files\winrt\base.h(5984)
App18.exe!winrt::impl::call_factory<winrt::Microsoft::UI::Xaml::Application,winrt::Microsoft::UI::Xaml::IApplicationStatics,void (const winrt::Microsoft::UI::Xaml::IApplicationStatics &)>(winrt::Microsoft::UI::Xaml::Application::Start::__l2::void (const winrt::Microsoft::UI::Xaml::IApplicationStatics &) && callback) Line 6007
at C:\Users\sheil\source\repos\App18\App18\Generated Files\winrt\base.h(6007)
App18.exe!winrt::Microsoft::UI::Xaml::Application::Start(const winrt::Microsoft::UI::Xaml::ApplicationInitializationCallback & callback) Line 12898
at C:\Users\sheil\source\repos\App18\App18\Generated Files\winrt\Microsoft.UI.Xaml.h(12898)

@StephenLPeters StephenLPeters added area-ProjectSystem appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps product-winui3 WinUI 3 issues labels Jun 29, 2020
@StephenLPeters
Copy link
Contributor

Given that you state "run the .exe that is produced" I assume you are attempting to make and unpackaged app. That is not supported for the WinUI Preview. Does F5 or running the appx work? here is the documentation on winui3 desktop. @MikeHillberg and @stevenbrix FYI.

@stevenbrix
Copy link
Contributor

stevenbrix commented Jun 30, 2020

I think @StephenLPeters guess is correct, this looks similar to other callstacks we've seen when people try to run the application unpackaged. We don't have support for this quite yet, we're expecting it to arrive sometime in September.

@smk2007
Copy link
Member Author

smk2007 commented Jun 30, 2020

Ah, you are correct. Launching via F5 works. Keen on the unpackaged solution. Will stay tuned!

@smk2007 smk2007 closed this as completed Jun 30, 2020
@msft-github-bot msft-github-bot removed the needs-triage Issue needs to be triaged by the area owners label Jun 30, 2020
@rcohn
Copy link

rcohn commented Jul 29, 2022

Hello -

I am seeing the same problem. This exception (0xC000027B) has only showed up on one Win10 system (build 1809) we tested. The problem is impacting our ability to ship our application.

I have not heard of this problem on other Win 10 and Win 11 systems we've tested. We are building with WindowsAppSDK 1.1. A WinUI3 unpackaged desktop app, configured as self-contained.

BTW - the only way I know of to start an via F5 is from Visual Studio - is there some other meaning that I'm missing?

Anyway, hopefully there will be a fix soon.

Thanks very much.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jul 29, 2022
@ranjeshj ranjeshj added team-Markup Issue for the Markup team needs-review 👀 labels Sep 16, 2022
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Mar 13, 2023
@rcohn
Copy link

rcohn commented Mar 28, 2023

Hello -

I am also seeing this same crash when trying to run an unpackaged WinUI 3 desktop app on Windows Server 2019. The app runs just fine on Win10 and Win11.

Here is as much of a stacktrace as I could get (exception: 0xC000027B):

KERNELBASE.dll!00007ff92b9526ef() Unknown combase.dll!00007ff92f215090() Unknown Microsoft.ui.xaml.dll!DirectUI::FrameworkApplication::StartDesktop() Unknown Microsoft.ui.xaml.dll!DirectUI::FrameworkApplicationFactory::Start() Unknown [External Code] Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.IApplicationStaticsMethods.Start(WinRT.IObjectReference _obj, Microsoft.UI.Xaml.ApplicationInitializationCallback callback) Unknown Microsoft.WinUI.dll!Microsoft.UI.Xaml.Application.Start(Microsoft.UI.Xaml.ApplicationInitializationCallback callback) Unknown [External Code]

I'm running with Microsoft.WindowsAppSDK 1.1.2.

To make things even more challenging, I was able to build a toy app: GettingStarted, with a couple of pages and that does not have this crash. The real application is pretty large and it could take a long time (if ever) to strip out implementation until I don't get the crash, so any pointers on what to look for would be most appreciated.

Thank you.

Robert Cohn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps area-ProjectSystem needs-review 👀 product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

8 participants