Index was outside the bounds of the array using WorkItemStore

I've got a major problem with VSTS and everything that interacts with the Work Item Store (including creating new projects, running work item queries, creating new work items, etc.) generates a:

Index was outside the bounds of the array.

message within Visual Studio 2005. This problem isn't restricted to Visual Studio and also occurs if you try and interact directly with the WorkItemStore API.

Here are the details from WinDbg if they are of any help:

0:000> !pe
Exception object: 01e540b0
Exception type: Microsoft.TeamFoundation.WorkItemTracking.Client.UnexpectedErrorException
Message: Cannot complete the operation. An unexpected error occurred.
InnerException: Microsoft.TeamFoundation.WorkItemTracking.Client.ClientException, use !PrintException 01e52160 to see more
StackTrace (generated):
<none>
StackTraceString: <none>
HResult: 80131600

0:000> !dumpstack -EE
OS Thread Id: 0xbe8 (0)
Current frame:
ChildEBP RetAddr Caller,Callee
0012b470 32736f6b (MethodDesc 0x3290bfa0 +0x63 <Module>.Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.HandleComException(Int32))
0012b480 3271652f (MethodDesc 0x3290d4f0 +0x123 Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DatastoreClass.CreateDatastoreItem(Int32, System.String))
0012b498 3271650d (MethodDesc 0x3290d4f0 +0x101 Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DatastoreClass.CreateDatastoreItem(Int32, System.String))
0012b4d4 32d66fbe (MethodDesc 0x32dbc5c8 +0xee Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem..ctor(Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemType))
0012b4f4 32d66fbe (MethodDesc 0x32dbc5c8 +0xee Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem..ctor(Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemType))
0012b514 0f86dd5f (MethodDesc 0xfbd1868 +0x57 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WorkItemDocument.Load())
0012b524 0f86db34 (MethodDesc 0xfbd6e90 +0x154 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WorkItemDocData.Load(System.String))
0012b544 0f86d97f (MethodDesc 0xfbd6bc8 +0x17 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.BaseDocData.Microsoft.VisualStudio.Shell.Interop.IVsPersistDocData.LoadDocData(System.String))
0012dffc 0f86a0f3 (MethodDesc 0xb1de028 +0x243 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.DocumentService.ShowWorkItem(Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.IWorkItemDocument, Boolean, Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame ByRef))
0012e01c 0f86a0f3 (MethodDesc 0xb1de028 +0x243 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.DocumentService.ShowWorkItem(Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.IWorkItemDocument, Boolean, Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame ByRef))
0012e084 0f869e9b (MethodDesc 0xb1de020 +0x13 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.DocumentService.ShowWorkItem(Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.IWorkItemDocument))
0012e0a4 0f869e9b (MethodDesc 0xb1de020 +0x13 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.DocumentService.ShowWorkItem(Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.IWorkItemDocument))
0012e0b4 0f868147 (MethodDesc 0xb1dd6e8 +0xd7 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPackage.OpenNewWorkItem(Microsoft.TeamFoundation.Client.TeamFoundationServer, System.String, System.String, Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem))
0012e0c4 0f868050 (MethodDesc 0xb1ddb68 +0x1b0 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPackage+WitDefaultCommandHandler.ExecRanges(Microsoft.VisualStudio.TeamFoundation.CommandHandler, Command, Int32))
0012e0e4 0f868050 (MethodDesc 0xb1ddb68 +0x1b0 Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPackage+WitDefaultCommandHandler.ExecRanges(Microsoft.VisualStudio.TeamFoundation.CommandHandler, Command, Int32))
0012e124 0c027680 (MethodDesc 0xba96a98 +0xd0 Microsoft.VisualStudio.TeamFoundation.CommandHandler.Exec(System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr))
0012e170 0f866bf4 (MethodDesc 0xdd32ef8 +0x36c Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WorkItemUIHierarchy.ExecCommand(Microsoft.TeamFoundation.Common.SelectionPair[], System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr))
0012e194 0dc91caa (MethodDesc 0xd48f7d8 +0xb2 Microsoft.TeamFoundation.Common.BaseUIHierarchy.ExecCommand(UInt32, System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr))
0012edcc 631bbd5e (MethodDesc 0x631fa020 +0x9a Microsoft.VisualStudio.Shell.OleMenuCommandService.ShowContextMenu(System.ComponentModel.Design.CommandID, Int32, Int32))
0012edec 631bbd5e (MethodDesc 0x631fa020 +0x9a Microsoft.VisualStudio.Shell.OleMenuCommandService.ShowContextMenu(System.ComponentModel.Design.CommandID, Int32, Int32))
0012ee24 0dc9915a (MethodDesc 0xd48f868 +0x2ca Microsoft.TeamFoundation.Common.BaseUIHierarchy.ExecCommand(Microsoft.TeamFoundation.Common.SelectionPair[], System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr))
0012ee5c 0f866c16 (MethodDesc 0xdd32ef8 +0x38e Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WorkItemUIHierarchy.ExecCommand(Microsoft.TeamFoundation.Common.SelectionPair[], System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr))
0012ee84 0dc91caa (MethodDesc 0xd48f7d8 +0xb2 Microsoft.TeamFoundation.Common.BaseUIHierarchy.ExecCommand(UInt32, System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr))



Answer this question

Index was outside the bounds of the array using WorkItemStore

  • Novelle

    Naren,

    I did try that.

    It actually appears that the data is corrupt in some manner because the machines that were working stopped working after their caches were cleared. We haven't done any direct editing of the database, all we did was witexport a work item type, add a new field, and then witimport it.

    Regards,

    William


  • .net sukbir

    No, that was the first thing I tried.
  • Parceval

    Please take a look at the following posting: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=572946&SiteID=1

    Let me know if this fixes your problem.



  • UnknownScripter

    Can you try deleting the client cache

    · Shut down VS (or Team Explorer)

    · Remove %USERPROFILE%\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache

    · Start up VS or TE, connect back and try work item operations



  • Alex Michael Leonard Klein

    Since it seems like data corruption issue, it might actually need extensive troubleshooting to find the cause, and you might want to contact CSS by calling 800/936-5800 if from US (see <http://support.microsoft.com/> for calling from other countries) - They can help by spending a lot more time with various troubleshooting than forum answerers and you won't have to wait for replies to your post.



  • Index was outside the bounds of the array using WorkItemStore