0

I have a Windows Phone 8.1 application which I am trying to port to UWP. I have a custom control which uses pivot control to show the months in the calendar (each month being a separate pivot item). Now, in some scenarios (when I tap different dates in the month and swipe to the next pivot item) it crashes without throwing any exception (I enabled all the exceptions in exception setting windows of VS). Also, it does not get caught in the application level unhandled exception handler. So, I ended up using crash dumps to analyse the situation and found out that it is throwing exception somewhere internally inside the Windows.UI.Xaml.Phone.dll Below the the stack trace from the crash dump analysis:

Analysis Summary
Type Description Recommendation Error In ABC.App.exe.3192.dmp the assembly instruction at Windows_UI_Xaml_Phone!Windows::UI::Xaml::Controls::Pivot::GiveFocusTo+29 in C:\Windows\System32\Windows.UI.Xaml.Phone.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000000 on thread 10 Please follow up with the vendor Microsoft Corporation for C:\Windows\System32\Windows.UI.Xaml.Phone.dll

Full Call Stack

Function     Arg 1     Arg 2     Arg 3     Arg 4   Source 
Windows_UI_Xaml_Phone!Windows::UI::Xaml::Controls::Pivot::GiveFocusTo<Windows::UI::Xaml::IDependencyObject>+29     00000000`00000000     00000000`00000000     00000000`00000000     0000001e`fa1ff019    
Windows_UI_Xaml_Phone!`Microsoft::WRL::Module<1,Microsoft::WRL::Details::DefaultModule<1> >::Create'::`2'::`dynamic atexit destructor for 'module''+be31     00000000`01000000     00000000`00000000     00007ffb`1da54fe0     00007ffb`42172ffd    
Windows_UI_Xaml_Phone!`Microsoft::WRL::Module<1,Microsoft::WRL::Details::DefaultModule<1> >::Create'::`2'::`dynamic atexit destructor for 'module''+140de     00000150`3951e990     00000150`00000006     00000000`00000000     00007ffb`2669fd01    
Windows_UI_Xaml_Phone!Windows::UI::Xaml::Controls::PivotStateMachine::AnimationCompleteEvent+28     00007ffb`25e5d860     00000000`00000000     00000000`00000000     00000150`3b494700    
Windows_UI_Xaml_Phone!Windows::UI::Xaml::Controls::PivotAnimator::OnCompleted+21     00000150`3bc474f0     00000150`3a0270b0     00000000`00000000     00007ffb`44f2a8d8    
Windows_UI_Xaml!DirectUI::CEventSourceBase<DirectUI::IUntypedEventSource,Windows::Foundation::IEventHandler<IInspectable * __ptr64>,IInspectable,IInspectable>::Raise+a5     00000150`3bc474f0     00007ffb`2606b8a0     00000000`00000000     00000000`00000000   d:\th\windows\dxaml\xcp\dxaml\lib\joltclasses.h @ 277 + b 
Windows_UI_Xaml!DirectUI::CEventSourceBase<DirectUI::IUntypedEventSource,Windows::Foundation::IEventHandler<IInspectable * __ptr64>,IInspectable,IInspectable>::UntypedRaise+41     00007ffb`25ec3a30     00000150`3b494720     0000001e`fa1ff270     00000000`00000000   d:\th\windows\dxaml\xcp\dxaml\lib\joltclasses.h @ 250 + 12 
Windows_UI_Xaml!DirectUI::DependencyObject::FireEvent+f7     00000150`3b494700     00000150`3ba5f8c0     00000000`00000000     00000000`000029d0   d:\th\windows\dxaml\xcp\dxaml\lib\dependencyobject.cpp @ 3634 + 2e 
Windows_UI_Xaml!DirectUI::DXamlCore::FireEvent+205     00000000`00000000     00007ffb`25e8f125     00000150`15880044     00000000`00000000   d:\th\windows\dxaml\xcp\dxaml\lib\dxamlcore.cpp @ 2497 + 1d 
Windows_UI_Xaml!AgCoreCallbacks::FireEvent+4f     00000150`3ba5f8c0     00000150`2ee7f300     00007ffb`25e6daa0     00000150`3ba5f8c0   d:\th\windows\dxaml\xcp\dxaml\lib\dxamlcore.cpp @ 388 
Windows_UI_Xaml!CCoreServices::CLR_FireEvent+16f     00000000`0000000a     00007ffb`25e6dd90     0000cb61`61ca0044     00000150`3ba5f8c0   d:\th\windows\dxaml\xcp\core\dll\xcpcore.cpp @ 3288 + 41 
Windows_UI_Xaml!CommonBrowserHost::CLR_FireEvent+21     00000000`00000001     00007ffb`42c462f5     00007ffb`00000000     00000000`00000000   d:\th\windows\dxaml\xcp\control\common\shared\commonbrowserhost.hpp @ 734 + 1b 
Windows_UI_Xaml!CControlBase::ScriptCallback+1b6     0000001e`00000000     00000000`00000044     00007ffb`26030044     00000150`3ba5f8c0   d:\th\windows\dxaml\xcp\control\common\shared\controlbase.cpp @ 300 + 3b 
Windows_UI_Xaml!CXcpDispatcher::OnScriptCallback+25c     00000000`00000000     00000150`3ba5f8c0     00000150`3ba5f8c0     00000150`159756c8   d:\th\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1311 
Windows_UI_Xaml!CXcpDispatcher::OnWindowMessage+3a     00000000`00000001     00007ffb`25c30000     00000000`00000000     00000000`00000000   d:\th\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 1144 
Windows_UI_Xaml!CXcpDispatcher::WindowProc+11b     0000001e`fa1ff7e9     00000000`00000001     00000000`00000000     00000150`3bbca850   d:\th\windows\dxaml\xcp\win\shared\xcpwindow.cpp @ 805 + b0 
user32!UserCallWinProcCheckWow+1f9     00000150`2f2efaa0     00007ffb`25e6ece0     00000000`00060976     0000001e`f95df800    
user32!DispatchMessageWorker+1a7     00000000`00000000     00000000`00000000     00000000`00000000     0000001e`fa1ff8b0    
Windows_UI!Windows::UI::Core::CDispatcher::ProcessMessage+43c     00000150`15c6c078     00007ffb`00000000     0000001e`fa1ff890     00000000`00000001   d:\th\windows\advcore\winrt\iwindow\corewindow\dispatcher.cpp @ 235 
Windows_UI!Windows::UI::Core::CDispatcher::WaitAndProcessMessages+fa     00000150`2ee7c2f0     00000000`00000000     00000150`15c6c040     00000150`2ee7c2f0   d:\th\windows\advcore\winrt\iwindow\corewindow\dispatcher.cpp @ 397 + 1b 
Windows_UI!Windows::UI::Core::CDispatcher::ProcessEvents+a8     00007ffb`33042780     00007ffb`3304acf0     00000150`15c6c040     00000000`00000001   d:\th\windows\advcore\winrt\iwindow\corewindow\dispatcher.cpp @ 541 + 18 
Windows_UI_Xaml!CJupiterWindow::RunCoreWindowMessageLoop+61     00000150`15c6c040     00000000`00000000     00000150`2eeebe50     00007ffb`25e2ad4e   d:\th\windows\dxaml\xcp\dxaml\lib\jupiterwindow.cpp @ 1118 + a 
Windows_UI_Xaml!DirectUI::DXamlCore::RunMessageLoop+47     00007ffb`26056640     00000000`00000005     00007ffb`2601ced0     00000000`00000000   d:\th\windows\dxaml\xcp\dxaml\lib\dxamlcore.cpp @ 2767 + 1e 
twinapi_appcore!Windows::ApplicationModel::Core::CoreApplicationView::Run+46     00000150`15c088f0     00000000`00000000     00000000`00000000     00007ffb`3abb4ecf    
twinapi_appcore!MIDL_user_allocate+fa     00000000`00000000     00000150`00000000     00000150`15c13940     00000150`15c06d00    
SHCore!??$MakeAndInitialize@VCClosableStreamWrapper@@UIStream@@PEAU2@$$T@Details@WRL@Microsoft@@YAJPEAPEAUIStream@@$$QEAPEAU3@$$QEA$$T@Z+1c4     00000000`00000000     00000000`00000000     00007ffb`418a8ee0     00000000`00000000    
kernel32!BaseThreadInitThunk+22     00007ffb`44e780e0     00000000`00000000     00000000`00000000     00000000`00000000    
ntdll!RtlUserThreadStart+34     00000000`00000000     00000000`00000000     00000000`00000000     00000000`0000000
tavier
  • 1,744
  • 4
  • 24
  • 53
  • Can you please post some code? Did you change the default style of the pivot in windows phone 8.1 app, and copy it into uwp app? – Grace Feng Jun 02 '16 at 02:33
  • Yes. Thanks for the hint. I disabled some styles and it fixed the issue :) – tavier Jun 02 '16 at 07:17
  • You're welcome, the styles and resources are based on the SDK, they might be different between different version of SDK. If you want to override the style, you can try using the new one for windows 10, version 1511. You can refer to [Default control styles and templates](https://msdn.microsoft.com/en-us/library/windows/apps/mt299122.aspx). – Grace Feng Jun 02 '16 at 07:29
  • That's a useful link. Thanks for sharing. – tavier Jun 02 '16 at 07:34

0 Answers0