Olaf Kober Posted September 24, 2015 Report Share Posted September 24, 2015 Hi! I tried to upgrade our build infrastructure to the newest versions of TeamCity (9.1.3), Plastic SCM (5.4.16.692) and Plastic SCM plugin for Teamcity (SNAPSHOT-201504131654 which was the latest version I found on the download page today). After upgrading the first builds run fine, but then when I commited a change the next time TeamCity determines the change differences I got following error: Error collecting changes for VCS repository '"DarwinVCS" {instance id=2, parent internal id=1, parent id=Darwin_DarwinVCS, description: "repository "Darwin.Backbone@localhost:8087" path "/" branch "/main" checkout "/main""}' jetbrains.buildServer.vcs.VcsOperationProgressRunner$VcsOperationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 with stack trace: jetbrains.buildServer.vcs.VcsOperationProgressRunner$VcsOperationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at jetbrains.buildServer.buildTriggers.vcs.ConnectionStateReporterImpl.reportConnectionFailed(ConnectionStateReporterImpl.java:12) at jetbrains.buildServer.buildTriggers.vcs.ConnectionStateReporterImpl.reportConnectionFailed(ConnectionStateReporterImpl.java:0) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader$RunLoadChanges.run(VcsRootChangesLoader.java:68) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader.loadChanges(VcsRootChangesLoader.java:20) at jetbrains.buildServer.vcs.impl.VcsChangesFetcher$LoadChangesForRoot.run(VcsChangesFetcher.java:8) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl$ImmediateFutureExecService$1.call(VcsChangesLoaderImpl.java) at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59) at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68) at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.waitForTaskToComplete(PeriodicChangesLoader.java:13) at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.loadChanges(PeriodicChangesLoader.java:11) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.tryLoadChanges(VcsChangesLoaderImpl.java:24) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:0) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:2) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: jetbrains.buildServer.vcs.VcsException: jetbrains.buildServer.vcs.VcsOperationProgressRunner$VcsOperationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesWithProgress(LoadChanges.java:23) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesForCheckoutRules(LoadChanges.java:49) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesByCombinedRule(LoadChanges.java:11) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChanges(LoadChanges.java:34) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader$RunLoadChanges.run(VcsRootChangesLoader.java:39) ... 17 more Caused by: jetbrains.buildServer.vcs.VcsOperationProgressRunner$VcsOperationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:29) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesWithProgress(LoadChanges.java:26) ... 21 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at java.lang.String.substring(String.java:1931) at com.codicesoftware.plugins.teamcity.PlasticVcsSupport$1.collectChanges(PlasticVcsSupport.java:284) at jetbrains.buildServer.vcs.utils.VcsPluginUtil.collectBuildChanges(VcsPluginUtil.java:63) at jetbrains.vcs.api.services.collectChanges.CollectRepositoryChangesPolicyFactory$8.collectChanges(CollectRepositoryChangesPolicyFactory.java:2) at jetbrains.vcs.api.services.collectChanges.SingleVersionCollectChangesCommand.collectChanges(SingleVersionCollectChangesCommand.java:1) at jetbrains.vcs.api.services.collectChanges.CollectChangesServiceProvider$1.collectChanges(CollectChangesServiceProvider.java:4) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:12) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:8) at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27) ... 22 more jetbrains.buildServer.vcs.VcsException: jetbrains.buildServer.vcs.VcsOperationProgressRunner$VcsOperationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesWithProgress(LoadChanges.java:23) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesForCheckoutRules(LoadChanges.java:49) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesByCombinedRule(LoadChanges.java:11) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChanges(LoadChanges.java:34) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader$RunLoadChanges.run(VcsRootChangesLoader.java:39) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader.loadChanges(VcsRootChangesLoader.java:20) at jetbrains.buildServer.vcs.impl.VcsChangesFetcher$LoadChangesForRoot.run(VcsChangesFetcher.java:8) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl$ImmediateFutureExecService$1.call(VcsChangesLoaderImpl.java) at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59) at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68) at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.waitForTaskToComplete(PeriodicChangesLoader.java:13) at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.loadChanges(PeriodicChangesLoader.java:11) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.tryLoadChanges(VcsChangesLoaderImpl.java:24) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:0) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:2) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: jetbrains.buildServer.vcs.VcsOperationProgressRunner$VcsOperationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:29) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesWithProgress(LoadChanges.java:26) ... 21 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at java.lang.String.substring(String.java:1931) at com.codicesoftware.plugins.teamcity.PlasticVcsSupport$1.collectChanges(PlasticVcsSupport.java:284) at jetbrains.buildServer.vcs.utils.VcsPluginUtil.collectBuildChanges(VcsPluginUtil.java:63) at jetbrains.vcs.api.services.collectChanges.CollectRepositoryChangesPolicyFactory$8.collectChanges(CollectRepositoryChangesPolicyFactory.java:2) at jetbrains.vcs.api.services.collectChanges.SingleVersionCollectChangesCommand.collectChanges(SingleVersionCollectChangesCommand.java:1) at jetbrains.vcs.api.services.collectChanges.CollectChangesServiceProvider$1.collectChanges(CollectChangesServiceProvider.java:4) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:12) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:8) at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27) ... 22 more jetbrains.buildServer.vcs.VcsOperationProgressRunner$VcsOperationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:29) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesWithProgress(LoadChanges.java:26) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesForCheckoutRules(LoadChanges.java:49) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesByCombinedRule(LoadChanges.java:11) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChanges(LoadChanges.java:34) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader$RunLoadChanges.run(VcsRootChangesLoader.java:39) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader.loadChanges(VcsRootChangesLoader.java:20) at jetbrains.buildServer.vcs.impl.VcsChangesFetcher$LoadChangesForRoot.run(VcsChangesFetcher.java:8) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl$ImmediateFutureExecService$1.call(VcsChangesLoaderImpl.java) at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59) at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68) at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.waitForTaskToComplete(PeriodicChangesLoader.java:13) at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.loadChanges(PeriodicChangesLoader.java:11) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.tryLoadChanges(VcsChangesLoaderImpl.java:24) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:0) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:2) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at java.lang.String.substring(String.java:1931) at com.codicesoftware.plugins.teamcity.PlasticVcsSupport$1.collectChanges(PlasticVcsSupport.java:284) at jetbrains.buildServer.vcs.utils.VcsPluginUtil.collectBuildChanges(VcsPluginUtil.java:63) at jetbrains.vcs.api.services.collectChanges.CollectRepositoryChangesPolicyFactory$8.collectChanges(CollectRepositoryChangesPolicyFactory.java:2) at jetbrains.vcs.api.services.collectChanges.SingleVersionCollectChangesCommand.collectChanges(SingleVersionCollectChangesCommand.java:1) at jetbrains.vcs.api.services.collectChanges.CollectChangesServiceProvider$1.collectChanges(CollectChangesServiceProvider.java:4) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:12) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:8) at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27) ... 22 more java.lang.StringIndexOutOfBoundsException: String index out of range: -33 at java.lang.String.substring(String.java:1931) at com.codicesoftware.plugins.teamcity.PlasticVcsSupport$1.collectChanges(PlasticVcsSupport.java:284) at jetbrains.buildServer.vcs.utils.VcsPluginUtil.collectBuildChanges(VcsPluginUtil.java:63) at jetbrains.vcs.api.services.collectChanges.CollectRepositoryChangesPolicyFactory$8.collectChanges(CollectRepositoryChangesPolicyFactory.java:2) at jetbrains.vcs.api.services.collectChanges.SingleVersionCollectChangesCommand.collectChanges(SingleVersionCollectChangesCommand.java:1) at jetbrains.vcs.api.services.collectChanges.CollectChangesServiceProvider$1.collectChanges(CollectChangesServiceProvider.java:4) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:12) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:8) at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesWithProgress(LoadChanges.java:26) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesForCheckoutRules(LoadChanges.java:49) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesByCombinedRule(LoadChanges.java:11) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChanges(LoadChanges.java:34) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader$RunLoadChanges.run(VcsRootChangesLoader.java:39) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader.loadChanges(VcsRootChangesLoader.java:20) at jetbrains.buildServer.vcs.impl.VcsChangesFetcher$LoadChangesForRoot.run(VcsChangesFetcher.java:8) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl$ImmediateFutureExecService$1.call(VcsChangesLoaderImpl.java) at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59) at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68) at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.waitForTaskToComplete(PeriodicChangesLoader.java:13) at jetbrains.buildServer.vcs.impl.PeriodicChangesLoader.loadChanges(PeriodicChangesLoader.java:11) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.tryLoadChanges(VcsChangesLoaderImpl.java:24) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:0) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:2) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) I was able to reproduce it by installing a fresh version of the above mentioned software packages creating a new empty plastic scm repository creating a new TeamCity project with a VCS root that uses the newly created plastic repository creating a build configuration that uses the new VCS root run that build configuration -> TC should check for pending changes, do a server-side checkout, run your build now, add a new file to your repository, checkin the change re-run your teamcity build configuration => StringIndexOutOfBoundsException Seems to me like a bug introduced somewhere after 5.4.16.686, because downgrading Plastic SCM to 5.4.16.686 fixed that issue for me. Kind regards, Olaf Link to comment Share on other sites More sharing options...
manu Posted September 24, 2015 Report Share Posted September 24, 2015 Hello Olaf, thank you for the detailed information, I'm going to test this asap and of course it will be fixed too. Link to comment Share on other sites More sharing options...
Olaf Kober Posted September 25, 2015 Author Report Share Posted September 25, 2015 Opps, I mistyped something. I was downgrading to 5.4.16.668 to workaround that issue.... 668 not 686. Link to comment Share on other sites More sharing options...
manu Posted September 25, 2015 Report Share Posted September 25, 2015 installing a fresh version of the above mentioned software packages creating a new empty plastic scm repository creating a new TeamCity project with a VCS root that uses the newly created plastic repository creating a build configuration that uses the new VCS root run that build configuration -> TC should check for pending changes, do a server-side checkout, run your build now, add a new file to your repository, checkin the change re-run your teamcity build configuration => StringIndexOutOfBoundsException So far I can't reproduce it. I'll keep testing it. Link to comment Share on other sites More sharing options...
manu Posted September 25, 2015 Report Share Posted September 25, 2015 Hello Olaf, I noticed that the web current plugin version is: VCS support: Plastic SCM SNAPSHOT-201509221250 That's the one it's working for me, it's weird because the plugin was uploaded on Monday so maybe the plugin you are running is still the old one. Please use the new one. I'm attaching it here: com.codicesoftware.plugins.teamcity.PlasticSCM.zip On the other hand, I'm going to test with the SNAPSHOT-201504131654 one. Link to comment Share on other sites More sharing options...
Olaf Kober Posted September 25, 2015 Author Report Share Posted September 25, 2015 Now, this is really strange. I downloaded the TeamCity plugin yesterday to be sure that I use the latest version and got the version SNAPSHOT-201504131654. Today I get the correct version, the same you attached. Will try this one... Link to comment Share on other sites More sharing options...
Olaf Kober Posted September 25, 2015 Author Report Share Posted September 25, 2015 Everything fine!! Using the newest Plugin SNAPSHOT-201509221250 the problem goes away. So, the real problem was that I downloaded the wrong version, however that happened. Thanks Manu and sorry for the trouble! Link to comment Share on other sites More sharing options...
manu Posted September 25, 2015 Report Share Posted September 25, 2015 Ok, great!! However, I'll test the issue with the previous plugin because it shouldn't be failing like that. Link to comment Share on other sites More sharing options...
reekjohns Posted October 2, 2019 Report Share Posted October 2, 2019 StringIndexOutOfBoundsException error is realted to Java substring and it means you are attempting to access a character which would come after the end of the string. If a String is only 4 characters long, attempting to get the substring from index 0 - 8, will throw this exception. substring(beginIndex, endInded) throws IndexOutOfBoundsException if the beginIndex is negative, or endIndex is larger than the length of this String object, or beginIndex is larger than endIndex. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now