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

NativeXamlIslands app cannot be deployed to remote machine #41

Open
kmelmon opened this issue May 18, 2021 · 4 comments
Open

NativeXamlIslands app cannot be deployed to remote machine #41

kmelmon opened this issue May 18, 2021 · 4 comments

Comments

@kmelmon
Copy link
Collaborator

kmelmon commented May 18, 2021

If you build the an appx package for the NativeXamlIslands project, it fails to deploy on a clean machine. There are 2 known issues:

  1. You must manually install the VCLibs on the remote machine. See: https://docs.microsoft.com/en-us/troubleshoot/cpp/c-runtime-packages-desktop-bridge. This can be worked around by remote debugging the app from VS, but obviously this won't work for customers wanting to actually deploy the app in real customer scenarios.
  2. Even after manually installing the VCLibs, the app crashes on launch with an apparent activation error. First you get a dialog box that says "Debug error! abort() has been called". And you get this debug output in VS: The program '[5764] SampleCppApp.exe' has exited with code -2147483645 (0x80000003).
@kmelmon
Copy link
Collaborator Author

kmelmon commented May 26, 2021

For now we're not sure how to support this mixed scenario properly, so we're updating the sample to use C++ only. See: #38

@kmelmon kmelmon mentioned this issue May 26, 2021
@kmelmon
Copy link
Collaborator Author

kmelmon commented Jun 4, 2021

This was temporarily fixed by #38.
We're now tracking getting this scenario working by #45

@kmelmon kmelmon closed this as completed Jun 4, 2021
@kmelmon
Copy link
Collaborator Author

kmelmon commented Jun 28, 2021

We're still seeing activation errors in this sample when launching remotely. Reactivating.

@kmelmon kmelmon reopened this Jun 28, 2021
@kmelmon
Copy link
Collaborator Author

kmelmon commented Jul 14, 2021

Oscar debugged this, which is now reproing locally:

I see that it comes from the MainUserControl.xaml when trying to load a resource.

Crash details:
KernelBase.dll!RaiseException () Unknown
vcruntime140d.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 75 C++
MyApp.dll!winrt::throw_hresult(const winrt::hresult result) Line 4274 C++
MyApp.dll!winrt::check_hresult(const winrt::hresult result) Line 4320 C++
MyApp.dll!winrt::impl::consume_Windows_UI_Xaml_IApplicationStaticswinrt::Windows::UI::Xaml::IApplicationStatics::LoadComponent(const winrt::Windows::Foundation::IInspectable & component, const winrt::Windows::Foundation::Uri & resourceLocator, const winrt::Windows::UI::Xaml::Controls::Primitives::ComponentResourceLocation & componentResourceLocation) Line 265 C++
MyApp.dll!winrt::Windows::UI::Xaml::Application::LoadComponent::__l2::(const winrt::Windows::UI::Xaml::IApplicationStatics & f) Line 12247 C++
MyApp.dll!winrt::impl::factory_cache_entrywinrt::Windows::UI::Xaml::Application,winrt::Windows::UI::Xaml::IApplicationStatics::call<void (const winrt::Windows::UI::Xaml::IApplicationStatics &) &>(winrt::Windows::UI::Xaml::Application::LoadComponent::__l2::void (const winrt::Windows::UI::Xaml::IApplicationStatics &) & callback) Line 5539 C++
MyApp.dll!winrt::impl::call_factory<winrt::Windows::UI::Xaml::Application,winrt::Windows::UI::Xaml::IApplicationStatics,void (const winrt::Windows::UI::Xaml::IApplicationStatics &)>(winrt::Windows::UI::Xaml::Application::LoadComponent::__l2::void (const winrt::Windows::UI::Xaml::IApplicationStatics &) && callback) Line 5562 C++
MyApp.dll!winrt::Windows::UI::Xaml::Application::LoadComponent(const winrt::Windows::Foundation::IInspectable & component, const winrt::Windows::Foundation::Uri & resourceLocator, const winrt::Windows::UI::Xaml::Controls::Primitives::ComponentResourceLocation & componentResourceLocation) Line 12248 C++
MyApp.dll!winrt::MyApp::implementation::MainUserControlTwinrt::MyApp::implementation::MainUserControl::InitializeComponent() Line 31 C++

MyApp.dll!winrt::MyApp::implementation::MainUserControl::MainUserControl() Line 12 C++
MyApp.dll!winrt::makewinrt::MyApp::implementation::MainUserControl() Line 6979 C++
MyApp.dll!winrt::MyApp::factory_implementation::MainUserControlTwinrt::MyApp::factory_implementation::MainUserControl,winrt::MyApp::implementation::MainUserControl::ActivateInstance() Line 44 C++
MyApp.dll!winrt::impl::producewinrt::MyApp::factory_implementation::MainUserControl,winrt::Windows::Foundation::IActivationFactory::ActivateInstance(void * * instance) Line 5609 C++
SampleCppApp.exe!winrt::Windows::Foundation::IActivationFactory::ActivateInstancewinrt::MyApp::MainUserControl() Line 5685 C++
SampleCppApp.exe!winrt::MyApp::MainUserControl::MainUserControl'::1'::<lambda_111_>::operator()(const winrt::Windows::Foundation::IActivationFactory & f) Line 319 C++
SampleCppApp.exe!_Closure_wrapper_d86ab5cd_1515::<lambda_invoker_cdecl>(const winrt::Windows::Foundation::IActivationFactory & __p1) Line 5578 C++
SampleCppApp.exe!winrt::impl::factory_cache_entrywinrt::MyApp::MainUserControl,winrt::Windows::Foundation::IActivationFactory::call<winrt::MyApp::MainUserControl (cdecl*)(winrt::Windows::Foundation::IActivationFactory const &)>(winrt::MyApp::MainUserControl()(const winrt::Windows::Foundation::IActivationFactory &) && callback) Line 5539 C++
SampleCppApp.exe!winrt::impl::call_factory_cast<winrt::MyApp::MainUserControl (__cdecl
)(winrt::Windows::Foundation::IActivationFactory const &),winrt::MyApp::MainUserControl,winrt::Windows::Foundation::IActivationFactory,winrt::MyApp::MainUserControl::MainUserControl'::1'::<lambda_111
>>(winrt::MyApp::MainUserControl::{ctor}::l1::<lambda_111> && callback) Line 5578 C++
SampleCppApp.exe!winrt::MyApp::MainUserControl::MainUserControl() Line 321 C++
SampleCppApp.exe!MyWindow::OnCreate(HWND
* __formal, tagCREATESTRUCTW * __formal) Line 113 C++
SampleCppApp.exe!MyWindow::MessageHandler(const unsigned int message, const unsigned int64 wParam, const int64 lParam) Line 50 C++
SampleCppApp.exe!DesktopWindowT::WndProc(HWND * const window, const unsigned int message, const unsigned int64 wparam, const int64 lparam) Line 65 C++
user32.dll!UserCallWinProcCheckWow() Unknown
user32.dll!DispatchClientMessage() Unknown
user32.dll!fnINLPCREATESTRUCT() Unknown
ntdll.dll!KiUserCallbackDispatcherContinue () Unknown
win32u.dll!NtUserCreateWindowEx () Unknown
user32.dll!VerNtUserCreateWindowEx() Unknown
user32.dll!CreateWindowInternal() Unknown
user32.dll!CreateWindowExW () Unknown
SampleCppApp.exe!MyWindow::InitInstance(HINSTANCE * hInstance, int nCmdShow) Line 74 C++
SampleCppApp.exe!MyWindow::MyWindow(HINSTANCE * hInstance, int nCmdShow) Line 40 C++
SampleCppApp.exe!wWinMain(HINSTANCE * hInstance, HINSTANCE
* hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 188 C++
SampleCppApp.exe!invoke_main() Line 123 C++
SampleCppApp.exe!__scrt_common_main_seh() Line 288 C++
SampleCppApp.exe!__scrt_common_main() Line 331 C++
SampleCppApp.exe!wWinMainCRTStartup(void * __formal) Line 17 C++
kernel32.dll!BaseThreadInitThunk () Unknown
ntdll.dll!RtlUserThreadStart () Unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant