DiffCalculator Exceptions on Update

May 12, 2008 at 7:06 AM
Hi guys,

Evenrytime I do an "SVN Update" with tortoise I receive errors like this: 

System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at SvnBridge.SourceControl.UpdateDiffCalculator.ProcessDeletedFile(String checkoutRootPath, String remoteName, SourceItemChange change, FolderMetaData root, Int32 targetVersion) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\SourceControl\UpdateDiffCalculator.cs:line 568
   at SvnBridge.SourceControl.UpdateDiffCalculator.PerformDelete(Int32 targetVersion, String checkoutRootPath, SourceItemChange change, FolderMetaData root) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\SourceControl\UpdateDiffCalculator.cs:line 246
   at SvnBridge.SourceControl.UpdateDiffCalculator.CalculateChangeBetweenVersions(String checkoutRootPath, FolderMetaData root, Int32 sourceVersion, Int32 targetVersion) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\SourceControl\UpdateDiffCalculator.cs:line 180
   at SvnBridge.SourceControl.UpdateDiffCalculator.CalculateDiff(String checkoutRootPath, Int32 versionTo, Int32 versionFrom, FolderMetaData root, UpdateReportData updateReportData) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\SourceControl\UpdateDiffCalculator.cs:line 57
   at SvnBridge.SourceControl.TFSSourceControlProvider.GetChangedItems(String path, Int32 versionFrom, Int32 versionTo, UpdateReportData reportData) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\SourceControl\TFSSourceControlProvider.cs:line 204
   at SvnBridge.Proxies.RemotingInvocation.Proceed() in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Proxies\RemotingInvocation.cs:line 73
   at SvnBridge.Proxies.TracingInterceptor.Invoke(IInvocation invocation) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Proxies\TracingInterceptor.cs:line 28
   at SvnBridge.Proxies.RemotingInvocation.Proceed() in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Proxies\RemotingInvocation.cs:line 59
   at SvnBridge.Proxies.RetryOnExceptionsInterceptor`1.Invoke(IInvocation invocation) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Proxies\RetryOnExceptionsInterceptor.cs:line 25
   at SvnBridge.Proxies.RemotingInvocation.Proceed() in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Proxies\RemotingInvocation.cs:line 59
   at SvnBridge.Proxies.ProxyFactory.RemotingProxy.Invoke(IMessage msg) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Proxies\ProxyFactory.cs:line 44
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at SvnBridge.Interfaces.ISourceControlProvider.GetChangedItems(String path, Int32 versionFrom, Int32 VersionTo, UpdateReportData reportData)
   at SvnBridge.Handlers.ReportHandler.GetMetadataForUpdate(IHttpRequest request, UpdateReportData updatereport, ISourceControlProvider sourceControlProvider, Int32& targetRevision) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Handlers\ReportHandler.cs:line 395
   at SvnBridge.Handlers.ReportHandler.Handle(IHttpContext context, ISourceControlProvider sourceControlProvider) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Handlers\ReportHandler.cs:line 44
   at SvnBridge.Handlers.HttpContextHandlerBase.Handle(IHttpContext context, IPathParser pathParser, NetworkCredential credentials) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Handlers\HttpContextHandlerBase.cs:line 47
   at SvnBridge.Net.HttpContextDispatcher.Dispatch(IHttpContext connection) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Net\HttpContextDispatcher.cs:line 93
   at SvnBridge.Net.Listener.Process(TcpClient tcpClient) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Net\Listener.cs:line 147
   at SvnBridge.Net.Listener.Accept(IAsyncResult asyncResult) in d:\Projects\Tortoise\SvnBridge\SvnBridgeLibrary\Net\Listener.cs:line 98

Can you guys give me some reason why this could be happening? I am using the latest version of SvnBridge now, but I receive the same problem with version 2.

Regards,
Joel
May 13, 2008 at 2:46 AM
I can try to reproduce it, is it a project on CodePlex?  What revision did you have checked out when you ran update?
May 16, 2008 at 7:30 AM
Well it happens against my local TFS 2008 server. My scenario 99% of the time is:

1. Perform a fresh check out with Tortoise.
2. Make a change to some file.
3. Check the change in with Tortoise.
4. Go to some other machine using Team Explorer.
5. Make a change to some/any file.
5. Check in the change with Team Explorer.
6. Get latest with Tortoise.
7. Exception occurs.

I will be moving my repository to a Windows 2008 Server and TFS 2008 box.
Jun 2, 2008 at 9:26 PM
Hm, can you try opening a project in CodePlex and trying it there? That would allow me to repro it.
Jun 10, 2008 at 3:21 PM
Stack trace:
System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at SvnBridge.SourceControl.UpdateDiffCalculator.ProcessDeletedItem(String checkoutRootPath, String remoteName, SourceItemChange change, FolderMetaData root, Int32 targetVersion) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\SourceControl\UpdateDiffCalculator.cs:line 614
   at SvnBridge.SourceControl.UpdateDiffCalculator.PerformDelete(Int32 targetVersion, String checkoutRootPath, SourceItemChange change, FolderMetaData root) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\SourceControl\UpdateDiffCalculator.cs:line 281
   at SvnBridge.SourceControl.UpdateDiffCalculator.CalculateChangeBetweenVersions(String checkoutRootPath, FolderMetaData root, Int32 sourceVersion, Int32 targetVersion) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\SourceControl\UpdateDiffCalculator.cs:line 213
   at SvnBridge.SourceControl.UpdateDiffCalculator.CalculateDiff(String checkoutRootPath, Int32 versionTo, Int32 versionFrom, FolderMetaData checkoutRoot, UpdateReportData updateReportData) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\SourceControl\UpdateDiffCalculator.cs:line 81
   at SvnBridge.SourceControl.TFSSourceControlProvider.GetChangedItems(String path, Int32 versionFrom, Int32 versionTo, UpdateReportData reportData) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\SourceControl\TFSSourceControlProvider.cs:line 204
   at SvnBridge.Proxies.RemotingInvocation.Proceed() in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Proxies\RemotingInvocation.cs:line 73
   at SvnBridge.Proxies.RetryOnExceptionsInterceptor`1.Invoke(IInvocation invocation) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Proxies\RetryOnExceptionsInterceptor.cs:line 25
   at SvnBridge.Proxies.RemotingInvocation.Proceed() in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Proxies\RemotingInvocation.cs:line 59
   at SvnBridge.Proxies.TracingInterceptor.Invoke(IInvocation invocation) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Proxies\TracingInterceptor.cs:line 28
   at SvnBridge.Proxies.RemotingInvocation.Proceed() in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Proxies\RemotingInvocation.cs:line 59
   at SvnBridge.Proxies.ProxyFactory.RemotingProxy.Invoke(IMessage msg) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Proxies\ProxyFactory.cs:line 44
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at SvnBridge.Interfaces.ISourceControlProvider.GetChangedItems(String path, Int32 versionFrom, Int32 VersionTo, UpdateReportData reportData)
   at SvnBridge.Handlers.ReportHandler.GetMetadataForUpdate(IHttpRequest request, UpdateReportData updatereport, ISourceControlProvider sourceControlProvider, Int32& targetRevision) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Handlers\ReportHandler.cs:line 389
   at SvnBridge.Handlers.ReportHandler.Handle(IHttpContext context, ISourceControlProvider sourceControlProvider) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Handlers\ReportHandler.cs:line 44
   at SvnBridge.Handlers.HttpContextHandlerBase.Handle(IHttpContext context, IPathParser pathParser, NetworkCredential credentials) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Handlers\HttpContextHandlerBase.cs:line 47
   at SvnBridge.Net.HttpContextDispatcher.Dispatch(IHttpContext connection) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Net\HttpContextDispatcher.cs:line 93
   at SvnBridge.Net.Listener.Process(TcpClient tcpClient) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Net\Listener.cs:line 147
   at SvnBridge.Net.Listener.Accept(IAsyncResult asyncResult) in c:\usr\src\eval\SvnBridge\SvnBridgeLibrary\Net\Listener.cs:line 98

Url:
http://localhost:8081/tfs07.codeplex.com/AspNet
Try to get this particular revision: 6256
Jun 12, 2008 at 10:26 AM
Hi, I cannot reproduce with the current version.