{"action":"created","issue":{"url":"https://api.github.com/repos/dblock/jenkins-ansicolor-plugin/issues/57","labels_url":"https://api.github.com/repos/dblock/jenkins-ansicolor-plugin/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/dblock/jenkins-ansicolor-plugin/issues/57/comments","events_url":"https://api.github.com/repos/dblock/jenkins-ansicolor-plugin/issues/57/events","html_url":"https://github.com/dblock/jenkins-ansicolor-plugin/issues/57","id":108725210,"number":57,"title":"'Exception caught evaluating condition,' causes builds to fail ungracefully","user":{"login":"omehegan","id":1775894,"avatar_url":"https://avatars.githubusercontent.com/u/1775894?v=3","gravatar_id":"","url":"https://api.github.com/users/omehegan","html_url":"https://github.com/omehegan","followers_url":"https://api.github.com/users/omehegan/followers","following_url":"https://api.github.com/users/omehegan/following{/other_user}","gists_url":"https://api.github.com/users/omehegan/gists{/gist_id}","starred_url":"https://api.github.com/users/omehegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omehegan/subscriptions","organizations_url":"https://api.github.com/users/omehegan/orgs","repos_url":"https://api.github.com/users/omehegan/repos","events_url":"https://api.github.com/users/omehegan/events{/privacy}","received_events_url":"https://api.github.com/users/omehegan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dblock/jenkins-ansicolor-plugin/labels/bug?","name":"bug?","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-28T19:01:53Z","updated_at":"2015-10-13T23:12:11Z","closed_at":null,"body":"I updated from 0.4.1 to the latest master, built at commit 689f6bc4e02d964c738521f575635958d95c7bc8, because I wanted to start using the plugin with Jenkins Workflow jobs (support added in https://github.com/dblock/jenkins-ansicolor-plugin/pull/54). Then my builds which had ANSI color enabled started failing silently. The build job's console log would just end abruptly with no error shown and the build marked as a failure. Finally I looked at the Jenkins service log and found:\r\n\r\n```\r\n2015-09-28 18:24:27.695457500 Sep 28, 2015 6:24:27 PM org.jenkins_ci.plugins.run_condition.BuildStepRunner logEvaluateException\r\n2015-09-28 18:24:27.695459500 WARNING: Exception caught evaluating condition: [java.lang.NumberFormatException: For input string: \"31m108 108 108 108 108 108 108 108 108 108 108 108 108 108 108\"], action = [Fail the build]\r\n2015-09-28 18:24:27.695461500 java.lang.NumberFormatException: For input string: \"31m108 108 108 108 108 108 108 108 108 108 108 108 108 108 108\"\r\n2015-09-28 18:24:27.695461500   at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)\r\n2015-09-28 18:24:27.695483500   at java.lang.Integer.parseInt(Integer.java:492)\r\n2015-09-28 18:24:27.695484500   at java.lang.Integer.<init>(Integer.java:677)\r\n2015-09-28 18:24:27.695484500   at org.fusesource.jansi.AnsiOutputStream.write(AnsiOutputStream.java:120)\r\n2015-09-28 18:24:27.695485500   at hudson.plugins.ansicolor.AnsiHtmlOutputStream.write(AnsiHtmlOutputStream.java:166)\r\n2015-09-28 18:24:27.695485500   at java.io.FilterOutputStream.write(FilterOutputStream.java:125)\r\n2015-09-28 18:24:27.695489500   at hudson.plugins.ansicolor.AnsiColorBuildWrapper$ConsoleLogFilterImpl$1.eol(AnsiColorBuildWrapper.java:222)\r\n2015-09-28 18:24:27.695490500   at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)\r\n2015-09-28 18:24:27.695491500   at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)\r\n2015-09-28 18:24:27.695497500   at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:74)\r\n2015-09-28 18:24:27.695498500   at java.io.PrintStream.write(PrintStream.java:480)\r\n2015-09-28 18:24:27.695498500   at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)\r\n2015-09-28 18:24:27.695499500   at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)\r\n2015-09-28 18:24:27.695500500   at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)\r\n2015-09-28 18:24:27.695504500   at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)\r\n2015-09-28 18:24:27.695505500   at java.io.PrintStream.newLine(PrintStream.java:546)\r\n2015-09-28 18:24:27.695505500   at java.io.PrintStream.println(PrintStream.java:807)\r\n2015-09-28 18:24:27.695506500   at org.jenkins_ci.plugins.run_condition.core.BooleanCondition.runPerform(BooleanCondition.java:57)\r\n2015-09-28 18:24:27.695507500   at org.jenkins_ci.plugins.run_condition.logic.ConditionContainer.runPerform(ConditionContainer.java:60)\r\n2015-09-28 18:24:27.695524500   at org.jenkins_ci.plugins.run_condition.logic.Or.runPerform(Or.java:60)\r\n2015-09-28 18:24:27.695525500   at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.evaluate(BuildStepRunner.java:107)\r\n2015-09-28 18:24:27.695526500   at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:147)\r\n2015-09-28 18:24:27.695533500   at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)\r\n2015-09-28 18:24:27.695533500   at org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder.perform(SingleConditionalBuilder.java:108)\r\n2015-09-28 18:24:27.695534500   at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)\r\n2015-09-28 18:24:27.695535500   at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:776)\r\n2015-09-28 18:24:27.695539500   at hudson.model.Build$BuildExecution.build(Build.java:203)\r\n2015-09-28 18:24:27.695539500   at hudson.model.Build$BuildExecution.doRun(Build.java:160)\r\n2015-09-28 18:24:27.695540500   at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536)\r\n2015-09-28 18:24:27.695541500   at hudson.model.Run.execute(Run.java:1738)\r\n2015-09-28 18:24:27.695541500   at hudson.matrix.MatrixRun.run(MatrixRun.java:146)\r\n2015-09-28 18:24:27.695544500   at hudson.model.ResourceController.execute(ResourceController.java:98)\r\n2015-09-28 18:24:27.695545500   at hudson.model.Executor.run(Executor.java:381)\r\n```\r\n\r\nDisabling ANSI color fixed the issue. Let me know if I can give you any other info to investigate. "},"comment":{"url":"https://api.github.com/repos/dblock/jenkins-ansicolor-plugin/issues/comments/147879525","html_url":"https://github.com/dblock/jenkins-ansicolor-plugin/issues/57#issuecomment-147879525","issue_url":"https://api.github.com/repos/dblock/jenkins-ansicolor-plugin/issues/57","id":147879525,"user":{"login":"omehegan","id":1775894,"avatar_url":"https://avatars.githubusercontent.com/u/1775894?v=3","gravatar_id":"","url":"https://api.github.com/users/omehegan","html_url":"https://github.com/omehegan","followers_url":"https://api.github.com/users/omehegan/followers","following_url":"https://api.github.com/users/omehegan/following{/other_user}","gists_url":"https://api.github.com/users/omehegan/gists{/gist_id}","starred_url":"https://api.github.com/users/omehegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omehegan/subscriptions","organizations_url":"https://api.github.com/users/omehegan/orgs","repos_url":"https://api.github.com/users/omehegan/repos","events_url":"https://api.github.com/users/omehegan/events{/privacy}","received_events_url":"https://api.github.com/users/omehegan/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T23:12:11Z","updated_at":"2015-10-13T23:12:11Z","body":"I am baffled. So far I can't reproduce this on my test server. The exception seems straightforward: it got a string where it was expecting an integer. I can't figure out why though."}}