An unhanded exception occurs on a Lync Server 2013 Persistent Chat SDK-based application

Article translations Article translations
Article ID: 2846484 - View products that this article applies to.
Expand all | Collapse all

Symptoms

Assume that you develop an application by using Microsoft Lync Server 2013 Persistent Chat SDK. The application creates multiple endpoints, and users on the endpoints use the application to perform actions in multiple threads. For example, users on the endpoints join a chat room, send a message, and then leave a chat room. In this situation, the application throws the following unhandled exception and then crashes:
Unhandled System.Collections.Generic.KeyNotFoundException
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.Rtc.Collaboration.PersistentChat.Internal.ChatRoomCache.get_Item(Uri uri)
at Microsoft.Rtc.Collaboration.PersistentChat.PersistentChatEndpoint.get_Item(Uri uri)
at Microsoft.Rtc.Collaboration.PersistentChat.Internal.MessageHandler.HandlePartNotify(Object messageIn)
at Microsoft.Rtc.Collaboration.PersistentChat.Internal.MessageHandler.ProcessQueuedMessage(TransportMessage message)
at Microsoft.Rtc.Collaboration.PersistentChat.Internal.MessageRouter.HandleMessage(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

Cause

This issue is caused by a timing issue that occurs between two threads. When one thread deletes an item in a dictionary, and then another thread tries to access the item in the dictionary, the application throws an unhandled KeyNotFoundException exception. Then, the application crashes.

Resolution

To resolve this issue, install the following cumulative update:
2835432 Description of the cumulative update 5.0.8308.420 for Lync Server 2013, Core Components: July 2013

More information

For more information about Lync Server 2013 Persistent Chat SDK, go to the following Microsoft website:
General information about Lync Server 2013 Persistent Chat SDK

Properties

Article ID: 2846484 - Last Review: August 27, 2013 - Revision: 2.0
Applies to
  • Microsoft Lync Server 2013
Keywords: 
kbqfe kbfix kbsurveynew kbexpertisebeginner kberrmsg KB2846484

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com