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

Uncatchable COM interop exception crossing abi boundaries #2518

Closed
mqudsi opened this issue May 21, 2020 · 2 comments
Closed

Uncatchable COM interop exception crossing abi boundaries #2518

mqudsi opened this issue May 21, 2020 · 2 comments
Labels

Comments

@mqudsi
Copy link

mqudsi commented May 21, 2020

Describe the bug
I have a very basic repro for a memory reference exception calling Geolocator.GetGeopositionAsync() from a new WinUI3 project on Windows 10 18363. The initial call to Geolocator.RequestAccessAsync() succeeds, but the followup call to GetGeoPositionAsync() always crashes in both x86 and x64 modes with the following messages in the output window:

AsyncCausalityTracer : System.InvalidCastException: Unable to cast object of type 'WinRT.IInspectable' to type 'Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics'.
   at System.Threading.Tasks.AsyncCausalityTracer..cctor()
Exception thrown at 0x00007FFD8434C330 (coreclr.dll) in WinUIAccessLocationTest.exe: 0xC0000005: Access violation reading location 0x0000000000000010.
The Common Language Runtime cannot stop at this exception. Common causes include: incorrect COM interop marshalling and memory corruption. To investigate further use native-only debugging.

This crash does not happen without a managed debugger attached. With no managed debugger attached and a native debugger attached (run without debugging then attach a native debugger to the process), I can catch a EEMessageException with the following massive stacktrace:

>	coreclr.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 75	C++
 	coreclr.dll!RealCOMPlusThrow(RuntimeExceptionKind reKind, unsigned int resID, const wchar_t * wszArg1, const wchar_t * wszArg2, const wchar_t * wszArg3, const wchar_t * wszArg4, const wchar_t * wszArg5, const wchar_t * wszArg6) Line 12926	C++
 	coreclr.dll!RealCOMPlusThrowInvalidCastException(TypeHandle thCastFrom, TypeHandle thCastTo) Line 13092	C++
 	coreclr.dll!RealCOMPlusThrowInvalidCastException(Object * * pObj, TypeHandle thCastTo) Line 13115	C++
 	coreclr.dll!ObjIsInstanceOfCore(Object * pObject, TypeHandle toTypeHnd, int throwCastException) Line 2162	C++
 	coreclr.dll!ChkCastAny_NoCacheLookup(CORINFO_CLASS_STRUCT_ * type, Object * obj) Line 2204	C++
 	System.Private.CoreLib.dll!00007ffdaa89582f()	Unknown
 	System.Private.CoreLib.dll!00007ffdaa8958ac()	Unknown
 	System.Private.CoreLib.dll!00007ffdaa8199ad()	Unknown
 	coreclr.dll!CallDescrWorkerInternal() Line 101	Unknown
 	coreclr.dll!DispatchCallDebuggerWrapper(CallDescrData * pCallDescrData, int fCriticalCall) Line 162	C++
 	coreclr.dll!DispatchCallSimple(unsigned __int64 * pSrc, unsigned long numStackSlotsToCopy, unsigned __int64 pTargetAddress, unsigned long dwDispatchCallSimpleFlags) Line 227	C++
 	coreclr.dll!MethodTable::RunClassInitEx(Object * * pThrowable) Line 3115	C++
 	coreclr.dll!MethodTable::DoRunClassInitThrowing() Line 3345	C++
 	coreclr.dll!MethodTable::CheckRunClassInitThrowing() Line 3500	C++
 	coreclr.dll!DynamicHelperFixup(TransitionBlock * pTransitionBlock, unsigned __int64 * pCell, unsigned long sectionIndex, Module * pModule, CORCOMPILE_FIXUP_BLOB_KIND * pKind, TypeHandle * pTH, MethodDesc * * ppMD, FieldDesc * * ppFD) Line 3177	C++
 	coreclr.dll!DynamicHelperWorker(TransitionBlock * pTransitionBlock, unsigned __int64 * pCell, unsigned long sectionIndex, Module * pModule, int frameFlags) Line 3484	C++
 	coreclr.dll!DelayLoad_Helper() Line 87	Unknown
 	System.Private.CoreLib.dll!00007ffdaa81984d()	Unknown
 	System.Private.CoreLib.dll!00007ffdaa82f75c()	Unknown
 	System.Private.CoreLib.dll!00007ffdaa971e88()	Unknown
 	System.Private.CoreLib.dll!00007ffdaa96f61e()	Unknown
 	System.Private.CoreLib.dll!00007ffdaa82f980()	Unknown
 	System.Private.CoreLib.dll!00007ffdaa8306d7()	Unknown
 	coreclr.dll!CallDescrWorkerInternal() Line 101	Unknown
 	coreclr.dll!DispatchCallDebuggerWrapper(CallDescrData * pCallDescrData, int fCriticalCall) Line 162	C++
 	coreclr.dll!DispatchCallSimple(unsigned __int64 * pSrc, unsigned long numStackSlotsToCopy, unsigned __int64 pTargetAddress, unsigned long dwDispatchCallSimpleFlags) Line 227	C++
 	coreclr.dll!MethodTable::RunClassInitEx(Object * * pThrowable) Line 3115	C++
 	coreclr.dll!MethodTable::DoRunClassInitThrowing() Line 3345	C++
 	coreclr.dll!MethodTable::CheckRunClassInitThrowing() Line 3500	C++
 	coreclr.dll!DynamicHelperFixup(TransitionBlock * pTransitionBlock, unsigned __int64 * pCell, unsigned long sectionIndex, Module * pModule, CORCOMPILE_FIXUP_BLOB_KIND * pKind, TypeHandle * pTH, MethodDesc * * ppMD, FieldDesc * * ppFD) Line 3177	C++
 	coreclr.dll!DynamicHelperWorker(TransitionBlock * pTransitionBlock, unsigned __int64 * pCell, unsigned long sectionIndex, Module * pModule, int frameFlags) Line 3484	C++
 	coreclr.dll!DelayLoad_Helper() Line 87	Unknown
 	System.Private.CoreLib.dll!00007ffdaa9c391e()	Unknown
 	00007ffd4c0a4acd()	Unknown
 	00007ffd4c0a4639()	Unknown
 	00007ffd4c0a45a3()	Unknown
 	00007ffd4c09245e()	Unknown
 	System.Private.CoreLib.dll!00007ffdaa896751()	Unknown
 	System.Private.CoreLib.dll!00007ffdaa89a352()	Unknown
 	00007ffd4c091d84()	Unknown
 	00007ffd4c0905e2()	Unknown
 	00007ffd4bea77a9()	Unknown
 	00007ffd4c0904cb()	Unknown
 	00007ffd4c0903b9()	Unknown
 	Microsoft.UI.Xaml.dll!DirectUI::CRoutedEventSourceBase<DirectUI::IUntypedEventSource,ABI::Microsoft::UI::Xaml::IRoutedEventHandler,IInspectable,ABI::Microsoft::UI::Xaml::IRoutedEventArgs>::Raise(IInspectable * pSource, ABI::Microsoft::UI::Xaml::IRoutedEventArgs * pArgs) Line 1037	C++
 	Microsoft.UI.Xaml.dll!DirectUI::ButtonBase::OnClick() Line 887	C++
 	Microsoft.UI.Xaml.dll!DirectUI::Button::OnClick() Line 83	C++
 	Microsoft.UI.Xaml.dll!DirectUI::ButtonBase::PerformPointerUpAction() Line 788	C++
 	Microsoft.UI.Xaml.dll!DirectUI::ButtonBase::OnPointerReleased(ABI::Microsoft::UI::Xaml::Input::IPointerRoutedEventArgs * pArgs) Line 768	C++
 	Microsoft.UI.Xaml.dll!DirectUI::ControlGenerated::OnPointerReleasedProtected(ABI::Microsoft::UI::Xaml::Input::IPointerRoutedEventArgs * pE) Line 1428	C++
 	Microsoft.UI.Xaml.dll!DirectUI::Control::FireEvent(KnownEventIndex nDelegate, DirectUI::DependencyObject * pSender, IInspectable * pArgs) Line 249	C++
 	Microsoft.UI.Xaml.dll!DirectUI::DXamlCore::FireEvent(CDependencyObject * pCoreListener, KnownEventIndex eventId, CDependencyObject * pCoreSender, CEventArgs * pCoreArgs, unsigned int flags) Line 1896	C++
 	Microsoft.UI.Xaml.dll!CCoreServices::CLR_FireEvent(CDependencyObject * pListener, EventHandle hEvent, CDependencyObject * pSender, CEventArgs * pArgs, unsigned int flags) Line 3099	C++
 	Microsoft.UI.Xaml.dll!CommonBrowserHost::CLR_FireEvent(CDependencyObject * pListener, EventHandle hEvent, CDependencyObject * pSender, CEventArgs * pArgs, unsigned int flags) Line 690	C++
 	Microsoft.UI.Xaml.dll!CControlBase::ScriptCallback(void * pControl, CDependencyObject * pListener, EventHandle hEvent, CDependencyObject * pSender, CEventArgs * pArgs, int flags, IScriptObject * pScriptObject, HRESULT(*)(CDependencyObject *, CEventArgs *) pInternalHandler) Line 213	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!CXcpDispatcher::OnScriptCallback(CEventInfo *) Line 1104	C++
 	Microsoft.UI.Xaml.dll!CXcpDispatcher::OnWindowMessage(HWND__ * msg, unsigned int wParam, unsigned __int64 lParam, __int64) Line 874	C++
 	Microsoft.UI.Xaml.dll!CXcpDispatcher::ProcessMessage(HWND__ * msg, unsigned int wParam, unsigned __int64 lParam, __int64 plRet, __int64 * pbDoDefault, unsigned int *) Line 725	C++
 	Microsoft.UI.Xaml.dll!CXcpDispatcher::WindowProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 648	C++
 	user32.dll!UserCallWinProcCheckWow()	Unknown
 	user32.dll!DispatchClientMessage()	Unknown
 	user32.dll!__fnDWORD�()	Unknown
 	ntdll.dll!KiUserCallbackDispatcherContinue�()	Unknown
 	win32u.dll!NtUserMessageCall�()	Unknown
 	user32.dll!SendMessageWorker()	Unknown
 	user32.dll!SendMessageW()	Unknown
 	[Inline Frame] Microsoft.UI.Xaml.dll!CXcpDispatcher::SendMessageW(unsigned int) Line 621	C++
 	Microsoft.UI.Xaml.dll!CXcpBrowserHost::SyncScriptCallbackRequest(void * pVoidBH, CDependencyObject * pListener, EventHandle hEvent, CDependencyObject * pSender, CEventArgs * pArgs, int flags, IScriptObject * pScriptObject, HRESULT(*)(CDependencyObject *, CEventArgs *) pHandler) Line 827	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!CEventManager::RaiseControlEvents(EventHandle) Line 1125	C++
 	Microsoft.UI.Xaml.dll!CEventManager::Raise(EventHandle hEvent, int bRefire, CDependencyObject * pSender, CEventArgs * pArgs, bool fRaiseSync, bool fInputEvent, bool bAllowErrorFallback, CDependencyObject * pSenderOverride) Line 880	C++
 	Microsoft.UI.Xaml.dll!CEventManager::RaiseRoutedEventBubbling(EventHandle hEvent, CDependencyObject * pSource, CRoutedEventArgs * pArgs, bool bIgnoreVisibility, bool fRaiseSync, bool fInputEvent, CDependencyObject * coerceToHandledAtElement) Line 1326	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!CEventManager::RaiseRoutedEvent(EventHandle) Line 1233	C++
 	Microsoft.UI.Xaml.dll!CInputServices::RaiseDelayedPointerUpEvent(TouchInteractionMsg * pMsgGesture, CDependencyObject * pElement) Line 2508	C++
 	Microsoft.UI.Xaml.dll!CInputServices::ProcessGestureInput(CDependencyObject * pElement, TouchInteractionMsg * pMsg) Line 2258	C++
 	Microsoft.UI.Xaml.dll!CInputServices::ProcessTouchInteractionCallback(const xref_ptr<CUIElement> & element, TouchInteractionMsg * message) Line 2155	C++
 	Microsoft.UI.Xaml.dll!CCoreServices::ProcessTouchInteractionCallback(const xref_ptr<CUIElement> & element, TouchInteractionMsg * message) Line 970	C++
 	Microsoft.UI.Xaml.dll!GestureRecognizerAdapter::OnTapped(ElementGestureTracker * elementGestureTracker, ABI::Windows::UI::Input::IGestureRecognizer * args, ABI::Windows::UI::Input::ITappedEventArgs *) Line 165	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!GestureRecognizerAdapter::Init::__l3::<lambda_1364b8d7cb6d325dc994677406f7b1ee>::operator()(ABI::Windows::UI::Input::IGestureRecognizer *) Line 33	C++
 	Microsoft.UI.Xaml.dll!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl ABI::Windows::Foundation::ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::UI::Input::GestureRecognizer *,ABI::Windows::UI::Input::IGestureRecognizer *>,ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::UI::Input::TappedEventArgs *,ABI::Windows::UI::Input::ITappedEventArgs *>>::*)(ABI::Windows::UI::Input::IGestureRecognizer *,ABI::Windows::UI::Input::ITappedEventArgs *)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::UI::Input::GestureRecognizer *,ABI::Windows::UI::Input::TappedEventArgs *>,Microsoft::WRL::FtmBase>,<lambda_1364b8d7cb6d325dc994677406f7b1ee> &,1,ABI::Windows::UI::Input::IGestureRecognizer *,ABI::Windows::UI::Input::ITappedEventArgs *>::Invoke(ABI::Windows::UI::Input::IGestureRecognizer * <args_0>, ABI::Windows::UI::Input::ITappedEventArgs * <args_1>) Line 245	C++
 	[Inline Frame] Windows.UI.dll!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::ViewManagement::UISettings *,Windows::UI::ViewManagement::UISettingsAutoHideScrollBarsChangedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2>>::InvokeAll::__l2::<lambda_08dd5dfb716ea7695a7d7cb6cc7c16cb>::operator()(Microsoft::WRL::ComPtr<IUnknown> &) Line 820	C++
 	Windows.UI.dll!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_08dd5dfb716ea7695a7d7cb6cc7c16cb>,Windows::Foundation::ITypedEventHandler<Windows::UI::ViewManagement::UISettings *,Windows::UI::ViewManagement::UISettingsAutoHideScrollBarsChangedEventArgs *>>(Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::ViewManagement::UISettings *,Windows::UI::ViewManagement::UISettingsAutoHideScrollBarsChangedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2>>::InvokeAll::__l2::<lambda_08dd5dfb716ea7695a7d7cb6cc7c16cb> invokeOne, Microsoft::WRL::Details::EventTargetArray * targetArray, Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::ViewManagement::UISettings *,Windows::UI::ViewManagement::UISettingsAutoHideScrollBarsChangedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2>> * pEvent) Line 119	C++
 	Windows.UI.dll!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::ViewManagement::UISettings *,Windows::UI::ViewManagement::UISettingsAutoHideScrollBarsChangedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2>>::DoInvoke<<lambda_08dd5dfb716ea7695a7d7cb6cc7c16cb>>(Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::ViewManagement::UISettings *,Windows::UI::ViewManagement::UISettingsAutoHideScrollBarsChangedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2>>::InvokeAll::__l2::<lambda_08dd5dfb716ea7695a7d7cb6cc7c16cb> invokeOne) Line 810	C++
 	[Inline Frame] Windows.UI.dll!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::UI::Input::GestureRecognizer *,Windows::UI::Input::TappedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2>>::InvokeAll(Windows::UI::Input::GestureRecognizerServer * <args_0>, Windows::UI::Input::CTappedEventArgs * <args_1>) Line 820	C++
 	Windows.UI.dll!Windows::UI::Input::GestureRecognizerServer::OnTappedEvent(Windows::Devices::Input::PointerDeviceType type, Windows::Foundation::Point position, unsigned int tapCount) Line 2010	C++
 	Windows.UI.dll!Windows::UI::Input::GestureRecognizerServer::OnOutput(const INTERACTION_CONTEXT_OUTPUT * output) Line 900	C++
 	Windows.UI.dll!Windows::UI::Input::GestureRecognizerServer::OutputCallback(void * clientData, const INTERACTION_CONTEXT_OUTPUT * output) Line 818	C++
 	ninput.dll!COutputConverter::Process(class CInteractionContextConfiguration const &,enum InteractionContextProperties::MeasurementUnits,enum CInteractionContextGlobal::FeedbackSettings,struct DigitizerInfo const *,struct INTERACTION_INPUT const *,unsigned int,struct INTERACTION_OUTPUT const &,int)	Unknown
 	ninput.dll!CInteractionContextImpl::OutputCallback(void *,struct INTERACTION_OUTPUT const *)	Unknown
 	ninput.dll!CInteractionGroupingFilter::_SendOutput(struct INTERACTION_OUTPUT const &)	Unknown
 	ninput.dll!CInteractionGroupingFilter::_OnInput(struct INTERACTION_OUTPUT const &)	Unknown
 	ninput.dll!COutputCoalescingFilter::Flush(void)	Unknown
 	ninput.dll!COutputCoalescingFilter::_OnInput(struct INTERACTION_OUTPUT const &)	Unknown
 	ninput.dll!CInteractionEngineImpl::DigitizerInput(enum DIGITIZER_KIND,unsigned __int64,unsigned int,unsigned int,struct INTERACTION_INPUT const *)	Unknown
 	ninput.dll!CInteractionContextImpl::ProcessFrameHistory(unsigned int,unsigned int,struct tagPOINTER_INFO const *)	Unknown
 	ninput.dll!CInteractionContextImpl::ProcessBufferedPackets(void)	Unknown
 	ninput.dll!ProcessBufferedPacketsInteractionContext�()	Unknown
 	Windows.UI.dll!Windows::UI::Input::GestureRecognizerServer::ProcessUpEvent(Windows::UI::Input::IPointerPoint * value) Line 2705	C++
 	Microsoft.UI.Xaml.dll!ElementGestureTracker::ProcessPointerInformation(const InputMessage & msg, ABI::Windows::UI::Input::IPointerPointStatics * const pointerPointStatics) Line 486	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!ElementGestureTracker::ProcessPointerMessage(const InputMessage & pointerPointStatics, ABI::Windows::UI::Input::IPointerPointStatics * const) Line 54	C++
 	Microsoft.UI.Xaml.dll!CInputServices::ProcessPointerMessagesWithInteractionEngine(unsigned int pMsg, InputMessage * pInteractionElement, CUIElement * pManipulationElement, CUIElement * bIgnoreManipulationElement, unsigned int pInteractionContext, ElementGestureTracker * bForceDisableGesture, unsigned int) Line 1891	C++
 	Microsoft.UI.Xaml.dll!CInputServices::ProcessInteractionPointerMessages(unsigned int pointerId, InputMessage * pMsg) Line 1659	C++
 	Microsoft.UI.Xaml.dll!ContentRootInput::PointerInputProcessor::ProcessPointerInput(InputMessage * pMsg, int * handled) Line 659	C++
 	Microsoft.UI.Xaml.dll!CInputServices::ProcessInput(InputMessage * pMsg, CContentRoot * contentRoot, int * handled) Line 801	C++
 	Microsoft.UI.Xaml.dll!CCoreServices::ProcessInput(InputMessage * pMessage, CContentRoot * contentRoot, int * fHandled) Line 944	C++
 	Microsoft.UI.Xaml.dll!CXcpBrowserHost::HandleInputMessage(unsigned int uMsg, MsgPacket * pMsgPack, CContentRoot * contentRoot, bool & fHandled) Line 1179	C++
 	Microsoft.UI.Xaml.dll!CJupiterControl::HandlePointerMessage(unsigned int uMsg, unsigned __int64 wParam, __int64 lParam, CContentRoot * contentRoot, ABI::Windows::UI::Input::IPointerPoint * pointerPoint, ABI::Windows::UI::Core::IPointerEventArgs * pointerArgs) Line 647	C++
 	Microsoft.UI.Xaml.dll!CJupiterWindow::OnIslandPointerMessage(unsigned int uMsg, CContentRoot * contentRoot, ABI::Windows::UI::Core::IPointerEventArgs * args) Line 1296	C++
 	Microsoft.UI.Xaml.dll!CXamlIslandRoot::InjectPointerMessage(unsigned int msg, ABI::Windows::UI::Core::IPointerEventArgs * args) Line 521	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!CXamlIslandRoot::OnIslandPointerReleased(IInspectable *) Line 480	C++
 	[Inline Frame] Microsoft.UI.Xaml.dll!CXamlIslandRoot::SubscribeToPointerInputObserverEvents::__l43::<lambda_cebf9c25bc09f042df56e8671bc7b720>::operator()(ABI::Microsoft::UI::Input::IPointerInputObserver *) Line 1299	C++
 	Microsoft.UI.Xaml.dll!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl ABI::Windows::Foundation::ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Microsoft::UI::Input::PointerInputObserver *,ABI::Microsoft::UI::Input::IPointerInputObserver *>,ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::UI::Core::PointerEventArgs *,ABI::Windows::UI::Core::IPointerEventArgs *>>::*)(ABI::Microsoft::UI::Input::IPointerInputObserver *,ABI::Windows::UI::Core::IPointerEventArgs *)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,ABI::Windows::Foundation::ITypedEventHandler<ABI::Microsoft::UI::Input::PointerInputObserver *,ABI::Windows::UI::Core::PointerEventArgs *>,Microsoft::WRL::FtmBase>,<lambda_cebf9c25bc09f042df56e8671bc7b720> &,1,ABI::Microsoft::UI::Input::IPointerInputObserver *,ABI::Windows::UI::Core::IPointerEventArgs *>::Invoke(ABI::Microsoft::UI::Input::IPointerInputObserver * <args_0>, ABI::Windows::UI::Core::IPointerEventArgs * <args_1>) Line 245	C++
 	Microsoft.UI.Input.dll!00007ffdb6b9153b()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6b8b608()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6b8abbd()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6b90991()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6b8fa8f()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6b8f396()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6b97691()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6ba3ed1()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6ba4b8c()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6ba3627()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6ba5ebd()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6ba3985()	Unknown
 	Microsoft.UI.Input.dll!00007ffdb6ba6889()	Unknown
 	user32.dll!UserCallWinProcCheckWow()	Unknown
 	user32.dll!DispatchMessageWorker()	Unknown
 	Microsoft.UI.Xaml.dll!DirectUI::FrameworkApplication::ProcessEvents() Line 1154	C++
 	Microsoft.UI.Xaml.dll!DirectUI::FrameworkApplication::StartDesktop() Line 215	C++
 	Microsoft.UI.Xaml.dll!DirectUI::FrameworkApplicationFactory::Start(ABI::Microsoft::UI::Xaml::IApplicationInitializationCallback * pCallback) Line 713	C++
 	00007ffd4b22da3b()	Unknown
 	00007ffd4b22ed46()	Unknown
 	00007ffd4b226555()	Unknown
 	00007ffd4b221042()	Unknown
 	coreclr.dll!CallDescrWorkerInternal() Line 101	Unknown
 	coreclr.dll!MethodDescCallSite::CallTargetWorker(const unsigned __int64 * pArguments, unsigned __int64 * pReturnValue, int cbReturnValue) Line 554	C++
 	[Inline Frame] coreclr.dll!MethodDescCallSite::Call(const unsigned __int64 *) Line 459	C++
 	coreclr.dll!RunMainInternal(Param * pParam) Line 1488	C++
 	coreclr.dll!RunMain(MethodDesc * pFD, short piRetVal, int * stringArgs, PtrArray * *) Line 1559	C++
 	coreclr.dll!Assembly::ExecuteMainMethod(PtrArray * * stringArgs, int) Line 1671	C++
 	coreclr.dll!CorHost2::ExecuteAssembly(unsigned long dwAppDomainId, const wchar_t * pwzAssemblyPath, int argc, const wchar_t * * argv, unsigned long * pReturnValue) Line 389	C++
 	coreclr.dll!coreclr_execute_assembly(void * hostHandle, unsigned int domainId, int argc, const char * * argv, const char * managedAssemblyPath, unsigned int * exitCode) Line 407	C++
 	hostpolicy.dll!00007ffdcfbb027e()	Unknown
 	hostpolicy.dll!00007ffdcfbb04e7()	Unknown
 	hostpolicy.dll!00007ffdcfbb101b()	Unknown
 	hostfxr.dll!00007ffdcfc273ee()	Unknown
 	hostfxr.dll!00007ffdcfc2ac00()	Unknown
 	hostfxr.dll!00007ffdcfc295ab()	Unknown
 	hostfxr.dll!00007ffdcfc258c2()	Unknown
 	WinUIAccessLocationTest.exe!00007ff7f3f18b9f()	Unknown
 	WinUIAccessLocationTest.exe!00007ff7f3f1907c()	Unknown
 	WinUIAccessLocationTest.exe!00007ff7f3f225f8()	Unknown
 	kernel32.dll!BaseThreadInitThunk�()	Unknown
 	ntdll.dll!RtlUserThreadStart�()	Unknown

I have once observed a 0x0006 location address.

Steps to reproduce the bug

  1. Clone repro from https://github.com/mqudsi/WinUICrashingAccess
  2. Open in Visual Studio 16.7.0-Preview1 on Windows 10 18363
  3. Place a breakpoint on await locator.GetGeopositionAsync()
  4. Debug
  5. When breakpoint is hit, press F10 and observe crash

Version Info
WinUI3-Preview1 on Visual Studio 2019 16.7.0-Preview1 on Windows 10 18363

Windows 10 version Saw the problem?
Insider Build (xxxxx)
November 2019 Update (18363) Yes
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

(Side note: with UWP, I could use Visual Studio to debug only native code and inspect this inspection. The project template generated by the WinUI VSIX template only gives me an option to additionally debug native code (although it seems even with it unchecked native code is still debugged!) but does not give me an option to debug only native code.)

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label May 21, 2020
@mqudsi mqudsi changed the title Uncatchable COM interop exception using location api Uncatchable COM interop exception crossing abi boundaries May 21, 2020
@ranjeshj ranjeshj added product-winui3 WinUI 3 issues area-Tooling and removed needs-triage Issue needs to be triaged by the area owners labels May 27, 2020
@stevenbrix
Copy link
Contributor

stevenbrix commented Nov 30, 2020

@mqudsi, thanks for filing this issue! It looks like you found a duplicate in the C#/WinRT repro, is that correct? If so, I'll just close this out.

Not sure if this is necessary information or not, but #2716 seemed related since it only happened when the debugger was attached.

@krschau
Copy link
Contributor

krschau commented Jul 28, 2021

Closing as it is dupe of (fixed) CsWinRT issue mentioned above.

@krschau krschau closed this as completed Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants