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

Access Violation App Crash #954

Open
aleibhardt opened this issue Apr 3, 2024 · 0 comments
Open

Access Violation App Crash #954

aleibhardt opened this issue Apr 3, 2024 · 0 comments

Comments

@aleibhardt
Copy link

I have a crash in my UWP application that is hitting when i switch between portrait and landscape mode.
I haven't been able to find a minimal way to reproduce this in a sample app yet.

I have been able to get the crash under a debugger though.
Here is the stack trace that I get:

00 0000009b`8f8fe0b0 00007ff8`0d0680a7     MSVCP140_APP!mtx_do_lock+0x9c [d:\a01\_work\3\s\src\vctools\crt\github\stl\src\mutex.cpp @ 103] 
01 (Inline Function) --------`--------     Microsoft_Graphics_Canvas_7ff80d000000!std::_Mutex_base::lock+0x9 [C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\mutex @ 76] 
02 (Inline Function) --------`--------     Microsoft_Graphics_Canvas_7ff80d000000!std::unique_lock<std::mutex>::{ctor}+0x12 [C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\mutex @ 179] 
03 (Inline Function) --------`--------     Microsoft_Graphics_Canvas_7ff80d000000!ABI::Microsoft::Graphics::Canvas::UI::Xaml::BaseControl<ABI::Microsoft::Graphics::Canvas::UI::Xaml::CanvasControlTraits>::GetLock+0x19 [D:\a\1\s\winrt\lib\xaml\BaseControl.h @ 648] 
04 (Inline Function) --------`--------     Microsoft_Graphics_Canvas_7ff80d000000!ABI::Microsoft::Graphics::Canvas::UI::Xaml::BaseControl<ABI::Microsoft::Graphics::Canvas::UI::Xaml::CanvasControlTraits>::OnXamlRootChanged::__l2::<lambda_4a8ce6f4bf424589ccf5c976a9930e6f>::operator()+0x1c [D:\a\1\s\winrt\lib\xaml\BaseControl.h @ 1010] 
05 0000009b`8f8fe110 00007ff8`0d067513     Microsoft_Graphics_Canvas_7ff80d000000!ExceptionBoundary<<lambda_4a8ce6f4bf424589ccf5c976a9930e6f> >+0x4b [D:\a\1\s\winrt\inc\ErrorHandling.h @ 221] 
06 0000009b`8f8fe160 00007ff8`0d05b7e9     Microsoft_Graphics_Canvas_7ff80d000000!ABI::Microsoft::Graphics::Canvas::UI::Xaml::BaseControl<ABI::Microsoft::Graphics::Canvas::UI::Xaml::CanvasControlTraits>::OnXamlRootChanged+0x13 [D:\a\1\s\winrt\lib\xaml\BaseControl.h @ 1023] 
07 (Inline Function) --------`--------     Microsoft_Graphics_Canvas_7ff80d000000!Microsoft::WRL::Callback::__l2::<lambda_9fbdbe06eca3691e643510eeee9cd40f>::operator()+0x12 [C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt\wrl\event.h @ 479] 
08 0000009b`8f8fe190 00007ff8`72af8502     Microsoft_Graphics_Canvas_7ff80d000000!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl ABI::Windows::Foundation::IEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::ApplicationModel::SuspendingEventArgs *,ABI::Windows::ApplicationModel::ISuspendingEventArgs *> >::*)(IInspectable *,ABI::Windows::ApplicationModel::ISuspendingEventArgs *)>::DelegateInvokeHelper<ABI::Windows::Foundation::IEventHandler<ABI::Windows::ApplicationModel::SuspendingEventArgs *>,<lambda_9fbdbe06eca3691e643510eeee9cd40f>,1,IInspectable *,ABI::Windows::ApplicationModel::ISuspendingEventArgs *>::Invoke+0x19 [C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt\wrl\event.h @ 354] 
09 0000009b`8f8fe1c0 00007ff8`72623dd5     Windows_UI_Xaml!DirectUI::CEventSourceBase<DirectUI::IUntypedEventSource,Windows::Foundation::ITypedEventHandler<Windows::UI::Xaml::XamlRoot *,Windows::UI::Xaml::XamlRootChangedEventArgs *>,Windows::UI::Xaml::IXamlRoot,Windows::UI::Xaml::IXamlRootChangedEventArgs>::Raise+0x4d464e [onecoreuap\windows\dxaml\xcp\dxaml\lib\JoltClasses.h @ 307] 
0a 0000009b`8f8fe230 00007ff8`72623ca5     Windows_UI_Xaml!DirectUI::XamlRoot::RaiseChangedEvent+0x81 [onecoreuap\windows\dxaml\xcp\dxaml\lib\xamlroot_partial.cpp @ 76] 
0b 0000009b`8f8fe270 00007ff8`726f9343     Windows_UI_Xaml!CFxCallbacks::XamlRoot_RaiseChanged+0x21 [onecoreuap\windows\dxaml\xcp\dxaml\lib\fxcallbacks.cpp @ 1610] 
0c 0000009b`8f8fe2a0 00007ff8`72762709     Windows_UI_Xaml!CContentRoot::RaisePendingXamlRootChangedEventIfNeeded+0x9b [onecoreuap\windows\dxaml\xcp\components\contentroot\contentroot.cpp @ 319] 
0d (Inline Function) --------`--------     Windows_UI_Xaml!CContentRoot::RaiseXamlRootChanged+0xf [onecoreuap\windows\dxaml\xcp\components\contentroot\contentroot.cpp @ 309] 
0e 0000009b`8f8fe2e0 00007ff8`72763bae     Windows_UI_Xaml!CCoreServices::OnWindowSizeChanged+0x55 [onecoreuap\windows\dxaml\xcp\core\dll\xcpcore.cpp @ 5439] 
0f 0000009b`8f8fe330 00007ff8`72892f0f     Windows_UI_Xaml!DirectUI::Window::OnWindowSizeChanged+0xde [onecoreuap\windows\dxaml\xcp\dxaml\lib\window_partial.cpp @ 1100] 
10 0000009b`8f8fe3b0 00007ff8`725fe035     Windows_UI_Xaml!DirectUI::Window::OnCoreWindowLayoutBoundsChanged+0x6f [onecoreuap\windows\dxaml\xcp\dxaml\lib\window_partial.cpp @ 1228] 
11 (Inline Function) --------`--------     Windows_UI_Xaml!Microsoft::WRL::Callback::__l2::<lambda_26927f60691664ba82371d86effe030e>::operator()+0x1f [onecore\external\sdk\inc\wrl\event.h @ 479] 
12 0000009b`8f8fe400 00007ff8`73c8a8fd     Windows_UI_Xaml!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Windows::UI::Core::CoreWindow *,Windows::UI::Core::ICoreWindow *>,IInspectable *>::*)(Windows::UI::Core::ICoreWindow *,IInspectable *)>::DelegateInvokeHelper<Windows::Foundation::ITypedEventHandler<Windows::UI::Core::CoreWindow *,IInspectable *>,<lambda_26927f60691664ba82371d86effe030e>,-1,Windows::UI::Core::ICoreWindow *,IInspectable *>::Invoke+0x25 [onecore\external\sdk\inc\wrl\event.h @ 354] 
13 0000009b`8f8fe430 00007ff8`73c8916e     Windows_UI!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_d10e6de357b49d61c68f2108b804a6c5>,Windows::Foundation::ITypedEventHandler<Windows::UI::Core::CoreWindow *,IInspectable *> >+0x9d
14 0000009b`8f8fe490 00007ff8`73c890c8     Windows_UI!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::Core::CoreWindow * __ptr64,IInspectable * __ptr64>,Microsoft::WRL::InvokeModeOptions<-2> >::DoInvoke<<lambda_d10e6de357b49d61c68f2108b804a6c5> >+0x92
15 0000009b`8f8fe4f0 00007ff8`73c88fc5     Windows_UI!Windows::UI::Core::WindowServer::OnLayoutBoundsChange+0x4c
16 0000009b`8f8fe530 00007ff8`73c88f44     Windows_UI!Windows::UI::Core::WindowServer::OnVisibleBoundsChangeEvent+0x65
17 0000009b`8f8fe6f0 00007ff8`73c96451     Windows_UI!Windows::UI::Core::WindowServer::OnVisibleBoundsChange+0x44
18 0000009b`8f8fe720 00007ff8`73c94c95     Windows_UI!Windows::UI::Core::WindowServer::OnVisibleBoundsChanged+0x21
19 0000009b`8f8fe750 00007ff8`7e99354b     Windows_UI!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::IEventHandler_impl<IInspectable * __ptr64>::*)(IInspectable * __ptr64,IInspectable * __ptr64) __ptr64>::DelegateInvokeHelper<Windows::Foundation::IEventHandler<IInspectable * __ptr64>,<lambda_db1e4b56a38545873f6e01e1fbba6b19>,-1,IInspectable * __ptr64,IInspectable * __ptr64>::Invoke+0x25
1a 0000009b`8f8fe780 00007ff8`7e905470     CoreUIComponents!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_b9c6a9526e98e8096438348dee47a029>,Windows::Foundation::IEventHandler<IInspectable * __ptr64> >+0x6b
1b 0000009b`8f8fe7e0 00007ff8`7e905101     CoreUIComponents!Microsoft::WRL::EventSource<Windows::Foundation::IEventHandler<IInspectable * __ptr64>,Microsoft::WRL::InvokeModeOptions<-2> >::InvokeAll<std::nullptr_t,std::nullptr_t>+0x7c
1c 0000009b`8f8fe830 00007ff8`7e904a73     CoreUIComponents!Windows::Phone::UI::Core::NavigationClient::NotifyVisibleBoundsChangeToCoreWindow+0xb9
1d 0000009b`8f8fe870 00007ff8`7e95654e     CoreUIComponents!Windows::Phone::UI::Core::NavigationClient::PropertyChanged+0x463
...

The crash is an access violation. I'm also seeing a large number of reports from partner center for similar crashes.

Any idea if this is an issue in win2D?
I figured i'm doing something wrong, but the level of information i'm getting here is very minimal.
Any advice on what I can do to debug this would be greatly appreciated?

The app is a UWP app. I've tested on v 1.26 and v1.27.1 of win2d, and both versions show the crash.
Our app targets 1903 version of windows.
Crash happens on windows 10, and windows 11 devices.

I can reproduce this somewhat reliably (but not 100%). I am able to get a crash dump if that is useful.

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