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

HudsonTestCase sometimes fails with NPE in tearDown() while trying to free htmlunit resources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Trivial Trivial
    • core
    • None

      See

      http://coffeebreaks.virtual.vps-host.net:8082/job/jenkins-mvn3-lacostej-master/org.jenkins-ci.main$jenkins-test-harness/13/testReport/junit/hudson.util/FormFieldValidatorTest/testNegative/

      Happened in different run of the build.

      java.lang.NullPointerException
      	at com.gargoylesoftware.htmlunit.html.HtmlPage.loadFrames(HtmlPage.java:1786)
      	at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:169)
      	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:456)
      	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:332)
      	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:389)
      	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:374)
      	at org.jvnet.hudson.test.HudsonTestCase$WebClient.getPage(HudsonTestCase.java:1519)
      	at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:297)
      	at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:226)
      	at com.sun.maven.junit.LocalTestCaseRunner.runTests(LocalTestCaseRunner.java:113)
      	at com.sun.maven.junit.LocalTestCaseRunner.runTestCase(LocalTestCaseRunner.java:56)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:104)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:250)
      	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:662)
      

      I don't see this stacktrace anywhere on the net. Will add some code to see what's going on and not fail the build in that case.

            lacostej lacostej
            lacostej lacostej
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: