ContosoAirlinePOSCpp Application does not start
spiovesan opened this issue · 0 comments
spiovesan commented
I have few issues with the ContosoAirlinePOSCpp sample:
- I was not able to compile because I could not found SDL2_image.lib to link. SDL2 libs are missing from this repo in the
ContosoAirlinePOS\ContosoAirlinePOSCpp\ContosoSeatBooking\SDL2-devel-2.0.12-VC\SDL2-2.0.12
folder. I downloaded SDL2 libs from SDL2 website, but SDL2_image.lib does not exist. - I commented out the
IMG_Init
calls and I was able to compile - when starting, the application crashes at line 260 of
winrt\Microsoft.UI.Xaml.h.
This is the call stack and this is the log output log.txt
> ContosoAirlinePOSCpp_x64d.exe!winrt::impl::consume_Microsoft_UI_Xaml_IApplicationStatics<winrt::Microsoft::UI::Xaml::IApplicationStatics>::Start(const winrt::Microsoft::UI::Xaml::ApplicationInitializationCallback & callback) Line 260 C++
ContosoAirlinePOSCpp_x64d.exe!winrt::Microsoft::UI::Xaml::Application::Start::__l2::<lambda>(const winrt::Microsoft::UI::Xaml::IApplicationStatics & f) Line 12900 C++
ContosoAirlinePOSCpp_x64d.exe!winrt::impl::factory_cache_entry<winrt::Microsoft::UI::Xaml::Application,winrt::Microsoft::UI::Xaml::IApplicationStatics>::call<void <lambda>(const winrt::Microsoft::UI::Xaml::IApplicationStatics &) &>(winrt::Microsoft::UI::Xaml::Application::Start::__l2::void <lambda>(const winrt::Microsoft::UI::Xaml::IApplicationStatics &) & callback) Line 6084 C++
ContosoAirlinePOSCpp_x64d.exe!winrt::impl::call_factory<winrt::Microsoft::UI::Xaml::Application,winrt::Microsoft::UI::Xaml::IApplicationStatics,void <lambda>(const winrt::Microsoft::UI::Xaml::IApplicationStatics &)>(winrt::Microsoft::UI::Xaml::Application::Start::__l2::void <lambda>(const winrt::Microsoft::UI::Xaml::IApplicationStatics &) && callback) Line 6107 C++
ContosoAirlinePOSCpp_x64d.exe!winrt::Microsoft::UI::Xaml::Application::Start(const winrt::Microsoft::UI::Xaml::ApplicationInitializationCallback & callback) Line 12901 C++
The DemoBuildCpp
project has the same error.
I am able to run an app created with the Blank App, Packaged (WinUI in Desktop) C++
template, installed with the WinUI.ProjectTemplates.vsix
I am using VS2019 16.9.0 Preview 4.0
and Windows10 Pro 21H1 Build 19043.844
Changing PC to a VS2019 16.10.0 Preview 1.0
and Windows10 LTSC 1809 Build 17763.1817
now I get the error:
WinRT originate error - 0x80004005 : 'Cannot locate resource from 'ms-appx:///Microsoft.UI.Xaml/Themes/themeresources.xaml'.'.
with this call stack
> ContosoAirlinePOSCpp.exe!winrt::Windows::Foundation::IActivationFactory::ActivateInstance<winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources>() Line 6236 C++
ContosoAirlinePOSCpp.exe!winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources::<lambda>(const winrt::Windows::Foundation::IActivationFactory & f) Line 69080 C++
ContosoAirlinePOSCpp.exe!winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources <lambda>(const winrt::Windows::Foundation::IActivationFactory &)::<lambda_invoker_cdecl>(const winrt::Windows::Foundation::IActivationFactory & f) Line 69080 C++
ContosoAirlinePOSCpp.exe!winrt::impl::factory_cache_entry<winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources,winrt::Windows::Foundation::IActivationFactory>::call<winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources (__cdecl*)(winrt::Windows::Foundation::IActivationFactory const &)>(winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources(*)(const winrt::Windows::Foundation::IActivationFactory &) && callback) Line 6084 C++
ContosoAirlinePOSCpp.exe!winrt::impl::call_factory_cast<winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources (__cdecl*)(winrt::Windows::Foundation::IActivationFactory const &),winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources,winrt::Windows::Foundation::IActivationFactory,winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources <lambda>(const winrt::Windows::Foundation::IActivationFactory &)>(winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources::winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources <lambda>(const winrt::Windows::Foundation::IActivationFactory &) && callback) Line 6123 C++
ContosoAirlinePOSCpp.exe!winrt::Microsoft::UI::Xaml::Controls::XamlControlsResources::XamlControlsResources() Line 69082 C++
[External Code]
ContosoAirlinePOSCpp.exe!winrt::impl::produce<winrt::ContosoAirlinePOSCpp::implementation::XamlUserType,winrt::Microsoft::UI::Xaml::Markup::IXamlType>::ActivateInstance(void * * result) Line 1003 C++
[External Code]
ContosoAirlinePOSCpp.exe!winrt::impl::consume_Microsoft_UI_Xaml_IApplicationStatics<winrt::Microsoft::UI::Xaml::IApplicationStatics>::Start(const winrt::Microsoft::UI::Xaml::ApplicationInitializationCallback & callback) Line 260 C++
Instead the DemoBuildCpp
project starts.