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

InputNonClientPointerSource::GetForWindowId crashes app #9982

Open
etvorun opened this issue Sep 12, 2024 · 0 comments
Open

InputNonClientPointerSource::GetForWindowId crashes app #9982

etvorun opened this issue Sep 12, 2024 · 0 comments
Labels
area-AppWindow bug Something isn't working team-CompInput Issue for IXP (Composition, Input) team

Comments

@etvorun
Copy link

etvorun commented Sep 12, 2024

Describe the bug

WinUI app crashes when XAML Hot Reload is enabled

Steps to reproduce the bug

Follow repro steps in dotnet/maui#24293

Expected behavior

App does not crash

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

Crash dump available upon request. Too big to attach. Below is partial call stack. Comparing to a blank WinUI app there seems to be missing InputNonClientPointerSource HWND, which correlates with offender API InputNonClientPointerSource::GetForWindowId.

image

Microsoft.UI.Input.dll!WRL2ContextSession::GetDispatcherQueue() Line 312
Microsoft.UI.Input.dll!InputNonClientPointerSourceWinRT::Configure_DispatcherQueue() Line 128
Microsoft.UI.Input.dll!InputNonClientPointerSourceWinRTStatics::GetForWindowIdHelper(Microsoft::UI::WindowId windowId, Microsoft::UI::Input::IInputNonClientPointerSource * * instance, bool isPublicApi) Line 1368
[Inline Frame] Microsoft.VisualStudio.DesignTools.WinUITap.dll!winrt::impl::consume_Microsoft_UI_Input_IInputNonClientPointerSourceStaticswinrt::Microsoft::UI::Input::IInputNonClientPointerSourceStatics::GetForWindowId(const winrt::Microsoft::UI::WindowId & windowId) Line 461
[Inline Frame] Microsoft.VisualStudio.DesignTools.WinUITap.dll!winrt::Microsoft::UI::Input::InputNonClientPointerSource::GetForWindowId::__l2::<lambda_1>::operator()(const winrt::Microsoft::UI::Input::IInputNonClientPointerSourceStatics &) Line 691
Microsoft.VisualStudio.DesignTools.WinUITap.dll!winrt::impl::factory_cache_entrywinrt::Microsoft::UI::Input::InputNonClientPointerSource,winrt::Microsoft::UI::Input::IInputNonClientPointerSourceStatics::call<winrt::Microsoft::UI::Input::InputNonClientPointerSource::GetForWindowId'::2'::<lambda_1> &>(winrt::Microsoft::UI::Input::InputNonClientPointerSource::GetForWindowId::__l2::<lambda_1> & callback) Line 6107
[Inline Frame] Microsoft.VisualStudio.DesignTools.WinUITap.dll!winrt::impl::call_factory(winrt::Microsoft::UI::Input::InputNonClientPointerSource::GetForWindowId::l2::<lambda_1> &&) Line 6129
Microsoft.VisualStudio.DesignTools.WinUITap.dll!winrt::Microsoft::UI::Input::InputNonClientPointerSource::GetForWindowId(const winrt::Microsoft::UI::WindowId & windowId) Line 691
Microsoft.VisualStudio.DesignTools.WinUITap.dll!Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::InAppMenu::InAppMenu(Microsoft::VisualStudio::DesignTools::UwpTap::ActivationFactoryProviderBase & factoryProvider, std::shared_ptrMicrosoft::VisualStudio::DesignTools::UwpTap::OM::ObjectIdentityService identityService, Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::InAppMenuModel & model, winrt::Microsoft::UI::Xaml::Controls::Panel uiLayer, winrt::Microsoft::UI::Xaml::XamlRoot xamlRoot, HWND
* hostHwnd) Line 162
[Inline Frame] Microsoft.VisualStudio.DesignTools.WinUITap.dll!std::make_unique(Microsoft::VisualStudio::DesignTools::UwpTap::ActivationFactoryProviderBase & <_Args_0>, std::shared_ptrMicrosoft::VisualStudio::DesignTools::UwpTap::OM::ObjectIdentityService &) Line 3465
Microsoft.VisualStudio.DesignTools.WinUITap.dll!Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::UILayerManager::OnInAppMenuStateChanged() Line 507
[Inline Frame] Microsoft.VisualStudio.DesignTools.WinUITap.dll!std::_Func_class::operator()() Line 854
Microsoft.VisualStudio.DesignTools.WinUITap.dll!Microsoft::VisualStudio::DesignTools::UwpTap::WinrtRunOnUIThread<std::function<void __cdecl(void)>>(const Microsoft::VisualStudio::DesignTools::UwpTap::DispatcherHelper & dispatcher, Microsoft::VisualStudio::DesignTools::UwpTap::DispatcherPriority function, std::function<void __cdecl(void)>) Line 178
[Inline Frame] Microsoft.VisualStudio.DesignTools.WinUITap.dll!Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::DispatcherBindingBase::Initialize::__l5::<lambda_1>::operator()() Line 27
[Inline Frame] Microsoft.VisualStudio.DesignTools.WinUITap.dll!std::invoke(Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::DispatcherBindingBase::Initialize::__l5::<lambda_1> &) Line 1731
Microsoft.VisualStudio.DesignTools.WinUITap.dll!std::_Func_impl_no_alloc<Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::DispatcherBindingBase<bool>::Initialize'::5'::<lambda_1>,void>::_Do_call() Line 808
[Inline Frame] Microsoft.VisualStudio.DesignTools.WinUITap.dll!std::_Func_class::operator()() Line 854
Microsoft.VisualStudio.DesignTools.WinUITap.dll!Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::SimpleBinding::Initialize(std::function<void __cdecl(void)> updateView, bool invokeValueHandler) Line 48
Microsoft.VisualStudio.DesignTools.WinUITap.dll!Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::DispatcherBindingBase::Initialize(std::function<void __cdecl(void)> updateView, bool invokeValueHandler) Line 24
Microsoft.VisualStudio.DesignTools.WinUITap.dll!Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::UILayerManager::SetBinding(Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::NotifyingValue & value, void(Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::UILayerManager::*)() memberFn) Line 364
Microsoft.VisualStudio.DesignTools.WinUITap.dll!Microsoft::VisualStudio::DesignTools::UwpTap::InAppUI::UILayerManager::Initialize() Line 137

@etvorun etvorun added the bug Something isn't working label Sep 12, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Sep 12, 2024
@codendone codendone added area-AppWindow team-CompInput Issue for IXP (Composition, Input) team and removed needs-triage Issue needs to be triaged by the area owners labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-AppWindow bug Something isn't working team-CompInput Issue for IXP (Composition, Input) team
Projects
None yet
Development

No branches or pull requests

2 participants