所以我在我的Winforms应用程序中添加了一个状态指示器控件,奇怪的是,将鼠标悬停在它上面以显示一张联系人卡片后,当我关闭我的应用程序时,它会导致空引用异常。 (打开和关闭应用程序而不将鼠标悬停在状态指示器上不会引发异常,但控件仍然存在,并且正确地用用户的存在进行颜色编码。)这也仅在为用户以外的用户打开联系卡时发生。自己。
这是我第一次使用Lync SDK,所以我想知道在关闭之前是否应该采取措施处理Lync控件?联系卡怎么可能导致空引用异常?
这是空引用异常的堆栈跟踪:
at Microsoft.Lync.Controls.Internal.Model.OcomModel.GroupsModel.UnwireGroupdAddRemove()
at Microsoft.Lync.Controls.Internal.Model.OcomModel.GroupsModel.Dispose(Boolean disposing)
at Microsoft.Lync.Controls.Internal.Framework.Common.UCBaseModel'1.Dispose()
at Microsoft.Lync.Controls.Internal.Model.OcomModel.ContactsAndGroupsManagerModel.Dispose(Boolean disposing)
at Microsoft.Lync.Controls.Internal.Framework.Common.UCBaseModel'1.Dispose()
at Microsoft.Lync.Controls.Internal.Model.OcomModel.UCClientModel.DisposeModels()
at Microsoft.Lync.Controls.Internal.Model.OcomModel.UCClientModel.Dispose(Boolean disposing
at Microsoft.Lync.Controls.Internal.Framework.Common.UCBaseModel`1.Dispose()
at Microsoft.Lync.Controls.LyncServiceProvider.DisposeUcClientModel()
at Microsoft.Lync.Controls.LyncServiceProvider.HandleWindowsFormsApplicationExit(Object sender, EventArgs e)
at System.Windows.Forms.Application.RaiseExit()
at System.Windows.Forms.Application.ThreadContext.Dispose(Boolean postQuit)
at System.Windows.Forms.Application.ThreadContext.ExitCommon(Boolean disposing)
at System.Windows.Forms.Application.ExitInternal()
at System.Windows.Forms.Application.Exit(CancelEventArgs e)
at System.Windows.Forms.Application.Exit()
at Console.Program.Main(String[] args)