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

Warnings plugin tries to load wrong compiler-warnings.xml file

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • warnings-plugin
    • None

      The plugin stopped loading source codes properly. I see the files in the builds/<date-time>/workspace-files folder, but some of them 0 bytes long. But the interesting thing is, that an exception is raised whenever i try to click on any warning in the list, saying for example:

      WARNING: Failed to load D:\Jenkins\jobs\<myjobname>\builds\2012-07-24_02-49-57\compiler-7-warnings.xml
      java.io.FileNotFoundException: D:\Jenkins\jobs\<myjobname>\builds\2012-07-24_02-49-57\compiler-7-warnings.xml (The system cannot find the file specified)

      Of course there is no "compiler-7-warnings.xml" file in that folder only "compiler-warnings.xml", "compiler-1-warnings.xml" and "compiler-2-warnings.xml". And this happens for every builds in jobs in my system since one or two weeks. Before today (before I updated to 4.13) at least the listing of the warnings worked, I could see how many warnings the plugin found, and i could switched between folders, files, detailed, etc. Only the source display was broken. From today the build page and the dashboard applet displays the number of warnings, but when I clicked on the link, the list of warnings is empty (attached screenshot)

      There is another bug, I don't know whether they are related:

      I sarted with one customized C++ parser, I did not like the default MSBuild parser, i wanted to exclude the link warnings, etc, and the plugin listed the warnings just fine. Then I added two more custom parsers, one for C# and another one for DoxyGen (please see the attached WarningsPublisher.xml file) and things started to be strange...

      On the build report pages it shows that there are zero warnings for C# and Doxygen, though i can see in the log, that there are. The configuration of the parsers with the regular expression should be ok, at least according to the the test on the configuration page. Then if you see Dashoboard.png, the first job of C# and Doxgen table has the same number of warnings that the fist one of C++ table has, and if you click on the numbers of any table, you always find yourself in the C++ warnings page.

      Also it is strange that there are always as many fixed warnings as new ones. And the Compiler warnings trend graph shows only the number of this one job instead of a real total.

          [JENKINS-14570] Warnings plugin tries to load wrong compiler-warnings.xml file

          torbent added a comment -

          That's a lot like JENKINS-14773 ...

          torbent added a comment - That's a lot like JENKINS-14773 ...

          Viktor Bekesi added a comment - - edited

          Some days (weeks) later it seems that the biggest part of the problems sorted out. The compiler-<X>-warnings.xml files misuse could have been because I renamed the custom parsers earlier, but since I switched to the stock MSBuild and Doxygen parsers provided by the plugin, this seems to be OK now, the source file lister works again, also FileNotFoundExceptions disappeared from the log.

          So the only problem remains, that the Summary tables in the dashboard view lists and links the wrong parser. Like most of the numbers in the Doxygen table are similar to the ones in MSBuild table, and also when I click on them (in the Doxygen table) a get to the MSBuild warnings page.

          Viktor Bekesi added a comment - - edited Some days (weeks) later it seems that the biggest part of the problems sorted out. The compiler-<X>-warnings.xml files misuse could have been because I renamed the custom parsers earlier, but since I switched to the stock MSBuild and Doxygen parsers provided by the plugin, this seems to be OK now, the source file lister works again, also FileNotFoundExceptions disappeared from the log. So the only problem remains, that the Summary tables in the dashboard view lists and links the wrong parser. Like most of the numbers in the Doxygen table are similar to the ones in MSBuild table, and also when I click on them (in the Doxygen table) a get to the MSBuild warnings page.

          Ulli Hafner added a comment -

          The ordering of the warnings parsers is currently not maintained correctly. I'm not sure on how to fix that in a backward compatible way though...

          Ulli Hafner added a comment - The ordering of the warnings parsers is currently not maintained correctly. I'm not sure on how to fix that in a backward compatible way though...

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          pom.xml
          src/main/java/hudson/plugins/analysis/test/BuildResultTest.java
          http://jenkins-ci.org/commit/analysis-test-plugin/401cc9ff6473b8bfcb5269a3252716476e05d70a
          Log:
          JENKINS-14570 Don't try to delete XML files anymore.
          These should not be created at all using the new API calls.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml src/main/java/hudson/plugins/analysis/test/BuildResultTest.java http://jenkins-ci.org/commit/analysis-test-plugin/401cc9ff6473b8bfcb5269a3252716476e05d70a Log: JENKINS-14570 Don't try to delete XML files anymore. These should not be created at all using the new API calls.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          pom.xml
          src/main/java/hudson/plugins/warnings/WarningsResult.java
          src/test/java/hudson/plugins/warnings/WarningsResultTest.java
          http://jenkins-ci.org/commit/warnings-plugin/d1cbae361fd9e54f92e8e2b303d4d582805e7bff
          Log:
          [FIXED JENKINS-14570] Make filename for warnings fixed for each parser.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml src/main/java/hudson/plugins/warnings/WarningsResult.java src/test/java/hudson/plugins/warnings/WarningsResultTest.java http://jenkins-ci.org/commit/warnings-plugin/d1cbae361fd9e54f92e8e2b303d4d582805e7bff Log: [FIXED JENKINS-14570] Make filename for warnings fixed for each parser.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/warnings/WarningsResult.java
          http://jenkins-ci.org/commit/warnings-plugin/9a8aa7637e3c4fcc2b29235dc850c0bf6d2a57ad
          Log:
          JENKINS-14570 Fixed NPE for old builds.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/warnings/WarningsResult.java http://jenkins-ci.org/commit/warnings-plugin/9a8aa7637e3c4fcc2b29235dc850c0bf6d2a57ad Log: JENKINS-14570 Fixed NPE for old builds.

            drulli Ulli Hafner
            tachikoma Viktor Bekesi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: