Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

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

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×