Trados Studio generates error "Object reference not set to an instance of an object" upon exit

In developing a plug-in for Trados Studio, encountering the error "Object reference not set to an instance of an object" upon exit, which references Sdl.TranslationStudio.Editor.TranslationMemory.TranslationProvider.DetachEventListeners().  What might be causing such an error?

The full call stack is as follows.

<StackTrace><![CDATA[   at Sdl.TranslationStudio.Editor.TranslationMemory.TranslationProvider.DetachEventListeners()
   at Sdl.TranslationStudio.Editor.TranslationMemory.TranslationProvider.Dispose()
   at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.OnClosed()
   at Sdl.TranslationStudio.Api.Editor.AbstractInternalDocument.CloseImpl()
   at Sdl.TranslationStudio.Api.Editor.AbstractInternalDocument.Close()
   at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.Close()
   at Sdl.TranslationStudio.Editor.EditorService.<CloseAllDocuments>b__4e(IDocument t)
   at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate)
   at Sdl.TranslationStudio.Editor.EditorService.CloseAllDocuments()
   at Sdl.TranslationStudio.Editor.EditorService.Window_Closing(IStudioWindow window, CancelEventArgs e)
   at Sdl.Desktop.Platform.StudioWindowCancelEventHandler.Invoke(IStudioWindow window, CancelEventArgs cancel)
   at Sdl.Desktop.Platform.Implementation.StudioWindow.OnClosing()
   at Sdl.Desktop.Platform.Implementation.StudioWindow._form_Closing(Object sender, CancelEventArgs e)
   at System.Windows.Forms.Form.OnClosing(CancelEventArgs e)
   at System.Windows.Forms.Form.WmClose(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at Sdl.Desktop.Platform.WinForms.StudioWindowForm.WndProc(Message& message)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]></StackTrace>