Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6252

StringIndexOutOfBoundsException in console log

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Linux, Java 1.6

      Description

      HTTP Status 500 -

      java.lang.StringIndexOutOfBoundsException: String index out of range: 734
      java.lang.String.substring(String.java:1934)
      hudson.MarkupText$SubText.getText(MarkupText.java:106)
      hudson.console.UrlAnnotator$UrlConsoleAnnotator.annotate(UrlAnnotator.java:30)
      hudson.console.ConsoleAnnotationOutputStream.eol(ConsoleAnnotationOutputStream.java:145)
      hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)
      hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)
      hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:74)
      org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:70)
      org.apache.commons.io.output.CountingOutputStream.write(CountingOutputStream.java:71)
      org.kohsuke.stapler.framework.io.LargeText$HeadMark.moveTo(LargeText.java:237)
      org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:152)
      hudson.console.AnnotatedLargeText.writeHtmlTo(AnnotatedLargeText.java:150)
      hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:142)
      org.kohsuke.stapler.framework.io.LargeText.doProgressText(LargeText.java:187)
      hudson.console.AnnotatedLargeText.doProgressiveHtml(AnnotatedLargeText.java:92)
      sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:169)
      org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
      org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
      org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:75)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:519)
      org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:145)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:519)
      org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:319)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:519)
      org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:181)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:519)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:435)
      org.kohsuke.stapler.Stapler.service(Stapler.java:123)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)

        Issue Links

          Activity

          Hide
          mindless Alan Harder added a comment -

          I think this is caused by:
          this.end+end
          in hudson.MarkupText.SubText.subText(int,int)
          I think it should be this.start+end.
          When I get a chance I'll add a unit test to confirm this, and put in the fix.

          Show
          mindless Alan Harder added a comment - I think this is caused by: this.end+end in hudson.MarkupText.SubText.subText(int,int) I think it should be this.start+end . When I get a chance I'll add a unit test to confirm this, and put in the fix.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/MarkupText.java
          trunk/hudson/main/core/src/test/java/hudson/MarkupTextTest.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/30102
          Log:
          [FIXED JENKINS-6252] fix bad index calculation in SubText.subText which
          caused StringIndexOutOfBoundsException in UrlAnnotator. Added test.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/MarkupText.java trunk/hudson/main/core/src/test/java/hudson/MarkupTextTest.java trunk/www/changelog.html http://jenkins-ci.org/commit/30102 Log: [FIXED JENKINS-6252] fix bad index calculation in SubText.subText which caused StringIndexOutOfBoundsException in UrlAnnotator. Added test.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/test/java/hudson/console/UrlAnnotatorTest.java
          http://jenkins-ci.org/commit/30612
          Log:
          JENKINS-6252 add test for UrlAnnotator

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/test/java/hudson/console/UrlAnnotatorTest.java http://jenkins-ci.org/commit/30612 Log: JENKINS-6252 add test for UrlAnnotator

            People

            • Assignee:
              mindless Alan Harder
              Reporter:
              mcbain4711 mcbain4711
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: