UWP app crash when building in release mode and compiling with .NET native toolchain

243 views Asked by At

I’m developing a UWP app and when building in release mode and compiling with .NET native toolchain I get some crashes in several scenarios (do not occur when .NET native toolchain is disabled). I have tried using Microsoft.NETCore.Platforms version 5.0.0 and version 3.1.3. The Dump file:

SharedLibrary!Interop::mincore.RaiseFailFastException+7e [f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\Interop\Interop.manual.cs @ 88 + 47]     0000000     0000007     afce56c     0000000   f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\Interop\Interop.manual.cs @ 88 + 47 
SharedLibrary!System::RuntimeExceptionHelpers.FailFast+98 [f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\RuntimeExceptionHelpers.cs @ 236 + b]     0000007     0000000     0000000     0000007   f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\RuntimeExceptionHelpers.cs @ 236 + b 
SharedLibrary!System::RuntimeExceptionHelpers.RuntimeFailFast+88 [f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\RuntimeExceptionHelpers.cs @ 193 + 10]     0000000     0000000     4cbe2a8     081b0d0   f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\RuntimeExceptionHelpers.cs @ 193 + 10 
mrt100_app!System::Runtime::EH.GetClasslibExceptionFromEEType$catch$1+62     a836a13     4cbe16c     ba63200     4cbe7ec    
mrt100_app!RhpFailFastForPInvokeExceptionPreemp+36     a836a13     4cbe258     4cbe2a8     0000000    
mrt100_app!RhpPInvokeExceptionGuard+77     4cbe258     4cbe8f0     4cbe2a8     4cbe1e4    
ntdll!ExecuteHandler2+26     4cbe258     4cbe8f0     4cbe2a8     4cbe1e4    
ntdll!ExecuteHandler+24     4cbe258     4cbe2a8     4cbe258     4cbe2a8    
ntdll!KiUserExceptionDispatcher+26     4cbe258     4cbe2a8     4cbe258     4cbe2a8    
bellesip!belle_sip_object_clone+1a     23cc718     101a72c     b44e204     e5b5150    
linphone!linphone_call_accept_with_params+159     e44cb70     23cc718     e44cb70     4cbe80c    
linphone!linphone_core_accept_call_with_params+5f     e44cb70     e5b5150     23cc718     b44e204    
UWP!$4_Linphone::Core.AcceptCallWithParams+63 [C:\Users\Mickael\Documents\Projets\linphone-windows10\CsWrapper\LinphoneWrapper.cs @ 19511 + 4e]     b44e320     4cbe88c     b448b28     0f8ea88   C:\Users\Mickael\Documents\Projets\linphone-windows10\CsWrapper\LinphoneWrapper.cs @ 19511 + 4e 
UWP!$0_LinphoneXamarin::Services::CallService.answerCall+189 [C:\Xamarin - Copy - Copy\LinphoneXamarin\LinphoneXamarin\Services\CallService.cs @ 793 + 11]     0f8428c     0000000     0000000     0f83c54   C:\Xamarin - Copy - Copy\LinphoneXamarin\LinphoneXamarin\Services\CallService.cs @ 793 + 11 
UWP!$0_UWP::App::<OnActivated>d__8.MoveNext+207 [C:\Xamarin - Copy - Copy\UWP\App.xaml.cs @ 121]     0000000     a525c60     0f83c54     fffffff   C:\Xamarin - Copy - Copy\UWP\App.xaml.cs @ 121 
UWP!$0_UWP::App.OnActivated+72     4cbe8dc     a3b0f53     0000000     0f83c54    
UWP!$92_Windows::UI::Xaml::Application.global::Windows.UI.Xaml.IApplicationOverrides.OnActivated+8 [global::Windows.UI.Xaml.IApplicationOverrides.OnActivated @ 15732480]     0000000     0f83c54     a3bedd0     90f3838   global::Windows.UI.Xaml.IApplicationOverrides.OnActivated @ 15732480 
UWP!$92___Interop::ReverseComStubs.Stub_5<System.__Canon>+63 [Stub_5 @ 15732480 + 63]     09a0038     a525c60     4cbe910     4cbe9cc   Stub_5 @ 15732480 + 63 
UWP!$92_Windows::UI::Xaml::IApplicationOverrides__Impl::Vtbl.OnActivated__n+55 [OnActivated__n @ 15732480]     57ce420     09a0038     02456a0     4cbe930   OnActivated__n @ 15732480 
Windows_UI_Xaml!DirectUI::FrameworkApplicationGenerated::OnActivatedProtected+41 [onecoreuap\windows\dxaml\xcp\dxaml\lib\winrtgeneratedclasses\frameworkapplication.g.cpp @ 280 + 2]     09a0038     0253150     4cbe950     0000000   onecoreuap\windows\dxaml\xcp\dxaml\lib\winrtgeneratedclasses\frameworkapplication.g.cpp @ 280 + 2 
Windows_UI_Xaml!DirectUI::FrameworkApplication::DispatchGenericActivation+59 [onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkapplication_partial.cpp @ 770 + 9]     09a0038     085d090     5739260     c084290   onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkapplication_partial.cpp @ 770 + 9 
Windows_UI_Xaml!DirectUI::FrameworkView::OnActivated+25033b [onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkview_partial.cpp @ 319 + f]     0859978     09a0038     c084240     5739260   onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkview_partial.cpp @ 319 + f 
Windows_UI_Xaml!Microsoft::WRL::Details::DelegateArgTraits<long (__stdcall Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Windows::ApplicationModel::Core::CoreApplicationView *,Windows::ApplicationModel::Core::ICoreApplicationView *>,Windows::ApplicationModel::Activation::IActivatedEventArgs *>::*)(Windows::ApplicationModel::Core::ICoreApplicationView *,Windows::ApplicationModel::Activation::IActivatedEventArgs *)>::DelegateInvokeHelper<Windows::Foundation::ITypedEventHandler<Windows::ApplicationModel::Core::CoreApplicationView *,Windows::ApplicationModel::Activation::IActivatedEventArgs *>,<lambda_8cb6a44a772cf529a3569069a4a24e7d>,-1,Windows::ApplicationModel::Core::ICoreApplicationView *,Windows::ApplicationModel::Activation::IActivatedEventArgs *>::Invoke+2d [sdk\inc\wrl\event.h @ 245 + 28]     5721b10     0859978     09a0038     62994f9   sdk\inc\wrl\event.h @ 245 + 28 
twinapi_appcore!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_5b8ed61dc30875efd1faa9507c79d8c2>,Windows::Foundation::ITypedEventHandler<Windows::ApplicationModel::Core::CoreApplicationView *,Windows::ApplicationModel::Activation::IActivatedEventArgs *> >+4d     4cbea5c     4cbea58     09a0038     0000000    
twinapi_appcore!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::ApplicationModel::Core::CoreApplicationView *,Windows::ApplicationModel::Activation::IActivatedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >::DoInvoke<<lambda_5b8ed61dc30875efd1faa9507c79d8c2> >+44     4cbea5c     4cbea58     6299781     4cbeaa4    
twinapi_appcore!Windows::ApplicationModel::Core::CoreApplicationView::Activate+203     085998c     8ddd438     09a0038     0000206    
rpcrt4!NdrByteCountPointerUnmarshall+214     fb52920     4cbecd8     0000003     71d173a    
rpcrt4!NdrStubCall2+38b     577c430     085eee0     e4adb88     4cbef20    
combase!CStdStubBuffer_Invoke+cd [onecore\com\combase\ndr\ndrole\stub.cxx @ 1446]     577c430     e4adb88     085eee0     b6f9710   onecore\com\combase\ndr\ndrole\stub.cxx @ 1446 
rpcrt4!CStdStubBuffer_Invoke+2a     577c430     e4adb88     085eee0     fdb8191    
combase!ObjectMethodExceptionHandlingAction<<lambda_ee1df801181086a03fa4f8f75bd5617f> >+78 [onecore\com\combase\dcomrem\excepn.hxx @ 87 + 2]     577c430     e4adb88     085eee0     4cbf04c   onecore\com\combase\dcomrem\excepn.hxx @ 87 + 2 
combase!DefaultStubInvoke+263 [onecore\com\combase\dcomrem\channelb.cxx @ 1452 + 95]     085eee0     577c430     4cbf538     5eff290   onecore\com\combase\dcomrem\channelb.cxx @ 1452 + 95 
combase!ServerCall::ContextInvoke+461 [onecore\com\combase\dcomrem\ctxchnl.cxx @ 1418 + 29]     e4adb88     577c430     085eee0     084dae0   onecore\com\combase\dcomrem\ctxchnl.cxx @ 1418 + 29 
combase!ASTAInvokeInApartment+14f [onecore\com\combase\dcomrem\applicationsta.cpp @ 470 + 5c]     e4adb88     0000001     0000000     577c430   onecore\com\combase\dcomrem\applicationsta.cpp @ 470 + 5c 
combase!AppInvoke+831 [onecore\com\combase\dcomrem\channelb.cxx @ 1182]     577c430     084dae0     86b70c8     084dae0   onecore\com\combase\dcomrem\channelb.cxx @ 1182 
combase!ComInvokeWithLockAndIPID+762 [onecore\com\combase\dcomrem\channelb.cxx @ 2290 + 24]     4cbf76f     101d8b0     5f8f0d0     101d8a8   onecore\com\combase\dcomrem\channelb.cxx @ 2290 + 24 
combase!ThreadDispatch+25c [onecore\com\combase\dcomrem\chancont.cxx @ 416 + 1b7]     4cbf9d0     101d8b0     0000001     4cbf954   onecore\com\combase\dcomrem\chancont.cxx @ 416 + 1b7 
combase!ModernSTAState::HandleMessage+50 [onecore\com\combase\dcomrem\modernsta.cpp @ 472]     101d8b0     0000000     0859490     0000100   onecore\com\combase\dcomrem\modernsta.cpp @ 472 
combase!ModernSTAWaitContext::Wait+427 [onecore\com\combase\dcomrem\modernsta.cpp @ 1432]     0000001     4cbf9c8     fffffff     4cbf97c   onecore\com\combase\dcomrem\modernsta.cpp @ 1432 
combase!CoMsgWaitInProcessEvents+8a [onecore\com\combase\dcomrem\modernsta.cpp @ 2528]     4cbf9d0     0000001     4cbf9c8     fffffff   onecore\com\combase\dcomrem\modernsta.cpp @ 2528 
Windows_UI!Windows::UI::Core::CDispatcher::WaitAndProcessMessagesInternal+fc [onecoreuap\windows\advcore\winrt\onecoreiwindow\corewindow\common\dispatcher.cpp @ 2001 + 1d]     0000000     0000000     bb77980     4cbfa90   onecoreuap\windows\advcore\winrt\onecoreiwindow\corewindow\common\dispatcher.cpp @ 2001 + 1d 
Windows_UI!Windows::UI::Core::CDispatcher::ProcessEvents+65 [onecoreuap\windows\advcore\winrt\onecoreiwindow\corewindow\common\dispatcher.cpp @ 581 + 15]     0904428     0000002     0853bd0     c083170   onecoreuap\windows\advcore\winrt\onecoreiwindow\corewindow\common\dispatcher.cpp @ 581 + 15 
Windows_UI_Xaml!DirectUI::FrameworkView::Run+8c [onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkview_partial.cpp @ 101 + 2]     085d0c8     0853bd0     4cbfb08     fb6c94b   onecoreuap\windows\dxaml\xcp\dxaml\lib\frameworkview_partial.cpp @ 101 + 2 
twinapi_appcore!Windows::ApplicationModel::Core::CoreApplicationView::Run+32     0859978     6298629     0000000     0000000    
twinapi_appcore!<lambda_a740d69e4550265529206848c8e72a27>::<lambda_invoker_stdcall>+8b     0853bd0     67099b0     67099b0     01cfa58    
SHCore!_WrapperThreadProc+e0     01cfa58     62d6340     4cbfbf8     7067c24    
kernel32!BaseThreadInitThunk+19     01cfa58     c7d7cb4     0000000     0000000    
ntdll!__RtlUserThreadStart+2f     fffffff     7088ff8     0000000     0000000    
ntdll!_RtlUserThreadStart+1b     67099b0     01cfa58     0000000     0000000    
1

There are 1 answers

0
Michael S. Scherotter On

Try building a debug version with .net native and .net native static analysis. see if there are any complier warnings about .net native.