DisposedObjectException

Jan 6, 2015 at 10:21 PM
Hello everyone,

I have written a C# application with Visual Studio 2013, which relies on ITAPI3. The application logs all events being observed on all lines.

The application appears to function exactly as expected over short periods, but when left to run for a few hours, a DisposedObjectException is being reported with the following call stack:

ITapi3.dll!JulMar.Tapi3.Internal.TapiBase.Compare(IUnknown p)
ITapi3.dll!JulMar.Tapi3.TTapi.FindInterface
ITapi3.dll!JulMar.Tapi3.TCall.CreateCallAppearance
ITapi3.dll!JulMar.Tapi3.TapiCallStateEventArgs.TapiCallStateEventArgs
ITapi3.dll!JulMar.Tapi3.TTapi.CollectEventArgsFromIDispatch
ITapi3.dll!JulMar.Tapi3.TTapi.TapiEventHandlerFunc
ITapi3.dll!<Module>.JulMar.Tapi3.Native.TapiEventHandler.Event(JulMar.Tapi3.Native.TAPI_EVENT TapiEvent, IDispatch
pEvent)

It appears as if something is disposing of an object while this sets of calls are in progress.

Has anyone else experienced this? Any suggestions on the best way to track down the disposal?

Thanks,
Nathan