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

Null pointer exception when publishing Doxygen HTML results if HTML_OUTPUT is not set in Doxyfile

XMLWordPrintable

    • Icon: Patch Patch
    • Resolution: Fixed
    • Icon: Major Major
    • doxygen-plugin
    • None

      In doxygen-plugin-0.6 the error looks like this:

      Publishing Doxygen HTML results.
      FATAL: error
      java.lang.NullPointerException
      	at hudson.plugins.doxygen.DoxygenDirectoryParser.retrieveDoxygenDirectoryFromDoxyfile(DoxygenDirectoryParser.java:291)
      	at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:56)
      	at hudson.plugins.doxygen.DoxygenDirectoryParser.invoke(DoxygenDirectoryParser.java:24)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1940)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:114)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:619)
      

      HTML_OUTPUT is optional parameter for Doxygen. If it is omitted default location "OUTPUT_DIRECTORY/html" is used for html output. getDoxygenGeneratedDir method in DoxygenDirectoryParser.java can almost handle this but it ends up in returning null anyway, which will then cause NPE in DoxygenDirectoryParser.java:313

      The attached patch probably does what the original author intended.

            Unassigned Unassigned
            okoivist Ossi Koivistoinen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: