java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Jenkins JIRA | jamesvecore | 7 years ago
  1. 0

    I am running a Hudson master version 1.315 on windows xp 64-bit. I have a slave node setup that is running as a windows service (as a domain user) on windows server 2003. I am trying to run a “Windows Batch Command” on the build slave and it is erroring out. I have narrowed down to the simplest batch script I could think of: “dir” and tried running this both on the master and slave nodes. The master runs just fine. The slave however has a problem during the process clean up. The batch script is executed successfully, but when control returns to java I get an exception which fails the build. Here is the full console output from the job running on the slave node: Started by user jamesvecore Building remotely on dtw-sp001-2k3 C:\Hudson\workspace\BidTrail Updates>dir Volume in drive C has no label. Volume Serial Number is 7CBE-B88F Directory of C:\Hudson\workspace\BidTrail Updates 07/14/2009 11:52 AM <DIR> . 07/14/2009 11:52 AM <DIR> .. 0 File(s) 0 bytes 2 Dir(s) 49,062,682,624 bytes free C:\Hudson\workspace\BidTrail Updates>exit 0 FATAL: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:136) at org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:109) at hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:320) at hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:204) at hudson.util.ProcessTree$OSProcess.access$200(ProcessTree.java:137) at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:340) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:742) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:734) at hudson.remoting.UserRequest.perform(UserRequest.java:103) at hudson.remoting.UserRequest.perform(UserRequest.java:47) at hudson.remoting.Request$2.run(Request.java:236) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Not sure what is going on here but it looks like a bug to me.

    Jenkins JIRA | 7 years ago | jamesvecore
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  2. 0

    I am running a Hudson master version 1.315 on windows xp 64-bit. I have a slave node setup that is running as a windows service (as a domain user) on windows server 2003. I am trying to run a “Windows Batch Command” on the build slave and it is erroring out. I have narrowed down to the simplest batch script I could think of: “dir” and tried running this both on the master and slave nodes. The master runs just fine. The slave however has a problem during the process clean up. The batch script is executed successfully, but when control returns to java I get an exception which fails the build. Here is the full console output from the job running on the slave node: Started by user jamesvecore Building remotely on dtw-sp001-2k3 C:\Hudson\workspace\BidTrail Updates>dir Volume in drive C has no label. Volume Serial Number is 7CBE-B88F Directory of C:\Hudson\workspace\BidTrail Updates 07/14/2009 11:52 AM <DIR> . 07/14/2009 11:52 AM <DIR> .. 0 File(s) 0 bytes 2 Dir(s) 49,062,682,624 bytes free C:\Hudson\workspace\BidTrail Updates>exit 0 FATAL: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:136) at org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:109) at hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:320) at hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:204) at hudson.util.ProcessTree$OSProcess.access$200(ProcessTree.java:137) at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:340) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:742) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:734) at hudson.remoting.UserRequest.perform(UserRequest.java:103) at hudson.remoting.UserRequest.perform(UserRequest.java:47) at hudson.remoting.Request$2.run(Request.java:236) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Not sure what is going on here but it looks like a bug to me.

    Jenkins JIRA | 7 years ago | jamesvecore
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  3. 0

    Error at startup when scanning players

    GitHub | 3 years ago | LemADEC
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    FTB Ultimate Server.. Crashing when opening iventory..

    GitHub | 4 years ago | JBrondum
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  6. 0

    StringIndexOutOfBoundsException > PlayerTracker.onPlayerLogin

    GitHub | 2 years ago | Selbie
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1

  1. richard77 2 times, last 2 days ago
  2. kjhdofjosvs 2 times, last 6 days ago
  3. archenroot 17 times, last 2 weeks ago
  4. Alexandru Popa 2 times, last 3 weeks ago
  5. poroszd 3 times, last 1 month ago
18 more registered users
58 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.StringIndexOutOfBoundsException

    String index out of range: -1

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(Unknown Source)
    1 frame
  3. org.jvnet.winp
    WinProcess.getEnvironmentVariables
    1. org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:136)
    2. org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:109)
    2 frames
  4. Hudson
    Launcher$RemoteLauncher$KillTask.call
    1. hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:320)
    2. hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:204)
    3. hudson.util.ProcessTree$OSProcess.access$200(ProcessTree.java:137)
    4. hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:340)
    5. hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:742)
    6. hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:734)
    6 frames
  5. Hudson :: Remoting Layer
    Request$2.run
    1. hudson.remoting.UserRequest.perform(UserRequest.java:103)
    2. hudson.remoting.UserRequest.perform(UserRequest.java:47)
    3. hudson.remoting.Request$2.run(Request.java:236)
    3 frames
  6. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    2. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    3. java.util.concurrent.FutureTask.run(Unknown Source)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    6. java.lang.Thread.run(Unknown Source)
    6 frames