Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363432

Summary: NPE in Performance Tests run on N20111105-2000
Product: [Eclipse Project] PDE Reporter: Ankur Sharma <ankur_sharma>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, satyam.kandula
Version: 3.8   
Target Milestone: 3.8 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to ix NPE none

Description Ankur Sharma CLA 2011-11-10 03:40:44 EST
http://fullmoon.ottawa.ibm.com/downloads/drops/N20111105-2000/performance/html/org.eclipse.pde.ui.tests_win32perf2.html#org.eclipse.pde.ui.tests.performance

testSearchModelRegistry	Error	N/A
java.lang.NullPointerException
at org.eclipse.pde.core.target.LoadTargetDefinitionJob.runInWorkspace(LoadTargetDefinitionJob.java:155)
at org.eclipse.pde.ui.tests.performance.parts.TargetPlatformPerfTest.testSearchModelRegistry(TargetPlatformPerfTest.java:146)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:501)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:259)
at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:352)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
at org.eclipse.core.launcher.Main.main(Main.java:34)
47.219
testChangeTargetPlatform	Error	N/A
java.lang.NullPointerException
at org.eclipse.pde.core.target.LoadTargetDefinitionJob.runInWorkspace(LoadTargetDefinitionJob.java:155)
at org.eclipse.pde.ui.tests.performance.parts.TargetPlatformPerfTest.testChangeTargetPlatform(TargetPlatformPerfTest.java:185)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:501)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:259)
at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:352)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 Ankur Sharma CLA 2011-11-10 03:41:46 EST
I have the fix. Will be attaching the patch shortly
Comment 2 Ankur Sharma CLA 2011-11-10 03:53:46 EST
Created attachment 206762 [details]
Patch to ix NPE
Comment 3 Curtis Windatt CLA 2011-11-10 11:56:04 EST
The suggested fix is not correct.  runInWorkspace() specifies that null can be passed in for the progress monitor.  Correct fix is to create a nullprogressmonitor if null is passed as an argument.  This was fixed when I added the performance tests but got overwritten when the target API changes were merged.

I also made a change to the persistence helper to not store the document builder in a static field.  The document builder stores way too much information and needs to be GC'd.  I am still having memory issues running the tests and will investigate further.
Comment 4 Curtis Windatt CLA 2011-11-10 16:41:44 EST
Ran the tests with code prior to the target API changes and still have the same memory issues.  I will continue to investigate, but this NPE bug can be closed.
Comment 5 Curtis Windatt CLA 2011-12-07 12:15:17 EST
Verified the performance tests are running correctly