-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins 2.152
Openjdk 1.8.0.181
ansicolor 0.6.0
Ansicolor plugin throws error when formatted string appears in console output. Archived console logs are rendered just fine.
Expected output:
[exec]
Api Tests (300)
--------------------------------------------
[exec] Testing api
[exec] ✔ SomeTest: Test (0.28s)
Rendered output:
[exec]
Api Tests (329)
--------------------------------------------
[exec] Testing api
Followed by Stack trace exception:
java.lang.IndexOutOfBoundsException at hudson.MarkupText.rangeCheck(MarkupText.java:276) at hudson.MarkupText.addMarkup(MarkupText.java:270) at hudson.plugins.ansicolor.ColorConsoleAnnotator$1EmitterImpl.emitHtml(ColorConsoleAnnotator.java:74) at hudson.plugins.ansicolor.AnsiAttributeElement.emitClose(AnsiAttributeElement.java:42) at hudson.plugins.ansicolor.AnsiHtmlOutputStream.closeTagOfType(AnsiHtmlOutputStream.java:150) at hudson.plugins.ansicolor.AnsiHtmlOutputStream.setForegroundColor(AnsiHtmlOutputStream.java:335) at hudson.plugins.ansicolor.AnsiHtmlOutputStream.processDefaultTextColor(AnsiHtmlOutputStream.java:589) at hudson.plugins.ansicolor.AnsiOutputStream.processEscapeCommand(AnsiOutputStream.java:352) at hudson.plugins.ansicolor.AnsiOutputStream.write(AnsiOutputStream.java:138) at hudson.plugins.ansicolor.AnsiHtmlOutputStream.write(AnsiHtmlOutputStream.java:220) ....
Whole stack trace in attachment.
Example text that causes issue with disabled plugin:
[32;1m✔[39;22m [35;SomeTest:[39;22m Test [32m(11.15s)[39m