stammen / dnssd-uwp

This project is no longer being supported. It is sample code only.
MIT License
6 stars 5 forks source link

Exception being thrown from system on quit (sometimes) #6

Open ewmailing opened 6 years ago

ewmailing commented 6 years ago

Sometimes when I quit the sample program, an exception gets thrown from some where in the system. (it does not appear to be directly thrown by the project code).

I seem to get slightly different traces, but this is the one I see the most.

dnssd_uwp.dll!`Windows::Foundation::TypedEventHandler<Windows::Networking::Sockets::StreamSocketListener ^ __ptr64,Windows::Networking::Sockets::StreamSocketListenerConnectionReceivedEventArgs ^ __ptr64>::TypedEventHandler<Windows::Networking::Sockets::StreamSocketListener ^ __ptr64,Windows::Networking::Sockets::StreamSocketListenerConnectionReceivedEventArgs ^ __ptr64><dnssd_uwp::DnssdService,void (__cdecl dnssd_uwp::DnssdService::*)(Windows::Networking::Sockets::StreamSocketListener ^ __ptr64,Windows::Networking::Sockets::StreamSocketListenerConnectionReceivedEventArgs ^ __ptr64) __ptr64>'::`2'::__abi_PointerToMemberWeakRefCapture::`scalar deleting destructor'(unsigned int)    C++
dnssd_uwp.dll!Windows::Foundation::AsyncOperationCompletedHandler<Windows::Networking::ServiceDiscovery::Dnssd::DnssdRegistrationResult ^ __ptr64>::__abi_Release() C++
combase.dll!ReleaseCallback(void * prm) Line 1542   C++
combase.dll!PerformCallback(CObjectContext * pServerCtx, HRESULT(*)(void *) pfnCallback, void * pv, const _GUID & riid, unsigned long iMethod, IUnknown * pUnk) Line 1550   C++
combase.dll!CObjectContext::InternalContextCallback(HRESULT(*)(void *) pfnCallback, void * pParam, const _GUID & riid, int iMethod, IUnknown * pUnk) Line 4420  C++
combase.dll!CGIPTable::RevokeInterfaceInCurrentApartment::__l66::<lambda>() Line 1344   C++
combase.dll!ObjectMethodExceptionHandlingAction<void <lambda>(void) >(CGIPTable::RevokeInterfaceInCurrentApartment::__l66::void <lambda>(void) action, ObjectMethodExceptionHandlingInfo * pExceptionHandlingInfo, ExceptionHandlingResult * pExceptionHandlingResult, void *) Line 132 C++
combase.dll!CGIPTable::RevokeInterfaceInCurrentApartment(GIPEntry * pGIPEntry) Line 1377    C++
combase.dll!CGIPTable::_RevokeInterfaceFromGlobal(unsigned long dwCookie, bool bPostedRevoke) Line 1136 C++
Windows.Devices.Enumeration.dll!Gip<Windows::Foundation::ITypedEventHandler<Windows::Devices::Enumeration::DeviceWatcher * __ptr64,IInspectable * __ptr64> >::Unglobalize() Line 137    C++
Windows.Devices.Enumeration.dll!GitDelegate2<Windows::Foundation::ITypedEventHandler<Windows::Devices::Enumeration::DeviceWatcher * __ptr64,IInspectable * __ptr64>,Windows::Devices::Enumeration::IDeviceWatcher * __ptr64,IInspectable * __ptr64>::Release() Line 271 C++
Windows.Devices.Enumeration.dll!Microsoft::WRL::ComPtr<DeviceUnpairingResultServer>::InternalRelease() Line 230 C++
Windows.Devices.Enumeration.dll!`vector destructor iterator'(void * __t, unsigned __int64 __s, unsigned __int64 __n, void(*)(void *) __f)   C++
Windows.Devices.Enumeration.dll!Microsoft::WRL::ComPtr<IUnknown>::`vector deleting destructor'(unsigned int)    C++

Windows.Devices.Enumeration.dll!Microsoft::WRL::Details::EventTargetArray::scalar deleting destructor'(unsigned int) C++ Windows.Devices.Enumeration.dll!Watcher<Windows::Devices::Enumeration::DeviceWatcher,Windows::Devices::Enumeration::IDeviceWatcher,Windows::Devices::Enumeration::IDeviceWatcher2,Windows::Devices::Enumeration::DeviceInformation,Windows::Devices::Enumeration::IDeviceInformation,Windows::Devices::Enumeration::IDeviceInformation2,DeviceInformationServer,Windows::Devices::Enumeration::DeviceInformationUpdate,Windows::Devices::Enumeration::IDeviceInformationUpdate,DeviceInformationUpdateServer,&RuntimeClass_Windows_Devices_Enumeration_DeviceWatcher>::Impl::~Impl() Line 661 C++ Windows.Devices.Enumeration.dll!Watcher<Windows::Devices::Enumeration::DeviceWatcher,Windows::Devices::Enumeration::IDeviceWatcher,Windows::Devices::Enumeration::IDeviceWatcher2,Windows::Devices::Enumeration::DeviceInformation,Windows::Devices::Enumeration::IDeviceInformation,Windows::Devices::Enumeration::IDeviceInformation2,DeviceInformationServer,Windows::Devices::Enumeration::DeviceInformationUpdate,Windows::Devices::Enumeration::IDeviceInformationUpdate,DeviceInformationUpdateServer,&RuntimeClass_Windows_Devices_Enumeration_DeviceWatcher>::Impl::scalar deleting destructor'(unsigned int) C++ Windows.Devices.Enumeration.dll!Watcher<Windows::Devices::Enumeration::Pnp::PnpObjectWatcher,Windows::Devices::Enumeration::Pnp::IPnpObjectWatcher,Windows::Devices::Enumeration::Pnp::IPnpObjectWatcher,Windows::Devices::Enumeration::Pnp::PnpObject,Windows::Devices::Enumeration::Pnp::IPnpObject,Windows::Devices::Enumeration::Pnp::IPnpObject,PnpObjectServer,Windows::Devices::Enumeration::Pnp::PnpObjectUpdate,Windows::Devices::Enumeration::Pnp::IPnpObjectUpdate,PnpObjectUpdateServer,&RuntimeClass_Windows_Devices_Enumeration_Pnp_PnpObjectWatcher>::Impl::Release() Line 155 C++ Windows.Devices.Enumeration.dll!Watcher<Windows::Devices::Enumeration::DeviceWatcher,Windows::Devices::Enumeration::IDeviceWatcher,Windows::Devices::Enumeration::IDeviceWatcher2,Windows::Devices::Enumeration::DeviceInformation,Windows::Devices::Enumeration::IDeviceInformation,Windows::Devices::Enumeration::IDeviceInformation2,DeviceInformationServer,Windows::Devices::Enumeration::DeviceInformationUpdate,Windows::Devices::Enumeration::IDeviceInformationUpdate,DeviceInformationUpdateServer,&RuntimeClass_Windows_Devices_Enumeration_DeviceWatcher>::Impl::DevQueryCallback(HDEVQUERY * formal, void pContext, const _DEV_QUERY_RESULT_ACTION_DATA pActionData) Line 861 C++ cfgmgr32.dll!TQuery::ServiceActionQueue(struct _TP_CALLBACK_INSTANCE *) Unknown ntdll.dll!TppWorkpExecuteCallback() Unknown ntdll.dll!TppWorkerThread() Unknown kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown

The line: Windows.Devices.Enumeration.dll!Microsoft::WRL::Details::EventTargetArray::`scalar deleting destructor'(unsigned int) C++

seems to be the top of the stack.