Alex Davidson - 2010-01-30

ReinitialiseObjects(), VimHandleCache.cs:line 247 re-adds a handle to the cache if it fails to reinitialise as part of the reconnect. This allows it to be relinked later.

But at this stage the handle's Disposed handler has been disconnected, since ReinitialiseObjects() discards and rebuilds the cache instead of modifying it. If the handle is seen first by ReinitialiseObject(), the Unlink call in RenewHandle(), VimObjectUpdater.cs:line 116 will not remove it from the cache, causing a key conflict when it gets re-added.