locked
{UWP} Pivot control GiveFocusTo crash RRS feed

  • Question

  • 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 xxx.App.exe.3192.dmp the assembly instruction at Windows_UI_Xaml_Phone!Windows::UI::Xaml::Controls::Pivot::GiveFocusTo<windows::ui::xaml::idependencyobject>+29</windows::ui::xaml::idependencyobject> 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`00000000   

    Can anyone help me fix this crash?



    Wednesday, June 1, 2016 9:58 AM

Answers

  • Hi Ashishks1987,

    Based on your description, it seems that your app works in the Windows Phone 8.1, but it does not work after you port to the UWP app. If so, could you please tell us how do you port your Windows Phone 8.1 app to the UWP app? The crash may be caused due to the incorrect porting operation to the UWP. So please check the following article to see if you have missed something:
    #Migrate apps to the Universal Windows Platform (UWP):
    https://msdn.microsoft.com/en-us/library/mt148501.aspx#MigrateCSharp .
    Besides, you can also try to port your Windows Phone 8.1 app to UWP app by copying the Windows Phone 8.1 code to the UWP code manually to see if it works.

    If the above still can not work, please try to post a simple reproduced project in here, in this way it will help us analyze this issue directly.

    Best Regards,
    Amy Peng 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Krunal Parekh Thursday, June 30, 2016 5:18 AM
    • Marked as answer by Krunal Parekh Thursday, June 30, 2016 5:18 AM
    Wednesday, June 15, 2016 9:36 AM

All replies

  • Hi Ashishks,

    Does the project work in windows 8.1? but does not work after porting to UWP? How do you port your application to UWP? 

    You can look into this article for migration details. 

    Migrate apps to the Universal Windows Platform (UWP)

    Do you have any reproduction sample in which I can reproduce the issue?


    Thanks MSDN Community Support Please remember to Mark as Answer the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Thursday, June 2, 2016 6:40 AM
  • Hi Ashishks1987,

    Based on your description, it seems that your app works in the Windows Phone 8.1, but it does not work after you port to the UWP app. If so, could you please tell us how do you port your Windows Phone 8.1 app to the UWP app? The crash may be caused due to the incorrect porting operation to the UWP. So please check the following article to see if you have missed something:
    #Migrate apps to the Universal Windows Platform (UWP):
    https://msdn.microsoft.com/en-us/library/mt148501.aspx#MigrateCSharp .
    Besides, you can also try to port your Windows Phone 8.1 app to UWP app by copying the Windows Phone 8.1 code to the UWP code manually to see if it works.

    If the above still can not work, please try to post a simple reproduced project in here, in this way it will help us analyze this issue directly.

    Best Regards,
    Amy Peng 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Krunal Parekh Thursday, June 30, 2016 5:18 AM
    • Marked as answer by Krunal Parekh Thursday, June 30, 2016 5:18 AM
    Wednesday, June 15, 2016 9:36 AM