Community
Participate
Working Groups
NullPointerException when opening the Test Log editor without BIRT/DTP/GMF. When opening a test result (*.execution) in the Test Log editor in TPTP 4.7.1 (http://www.eclipse.org/tptp/home/downloads/?ver=4.7.1) WITHOUT BIRT/DTP/GMF, the following exception is thrown: java.lang.NullPointerException at org.eclipse.hyades.test.ui.forms.base.VerdictSummaryChart.<init>(VerdictSummaryChart.java:121) at org.eclipse.hyades.test.ui.forms.editor.page.LogOverviewPage.createOverviewPart(LogOverviewPage.java:168) at org.eclipse.hyades.test.ui.forms.editor.page.LogOverviewPage.createFormContent(LogOverviewPage.java:113) at org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:152) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:150) at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:471) at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067) at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:603) at org.eclipse.hyades.test.ui.forms.editor.TestLogViewer.addPages(TestLogViewer.java:59) at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610) at org.eclipse.tptp.platform.common.ui.internal.util.UIUtil.openEditor(UIUtil.java:324) at org.eclipse.hyades.test.ui.internal.navigator.action.OpenEditorAction.run(OpenEditorAction.java:64) at org.eclipse.hyades.test.ui.internal.navigator.action.TestNavigatorActionGroup.runDefaultAction(TestNavigatorActionGroup.java:605) at org.eclipse.hyades.ui.internal.navigator.Navigator.open(Navigator.java:730) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 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:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) Work-around: Install BIRT/DTP/GMF (http://www.eclipse.org/tptp/home/downloads/?ver=4.7.1#tptp-plugins).
Requires a new test case.
Regression from TPTP
The problem is that isBIRTAvailable is being set to true in org.eclipse.hyades.test.ui.forms.editor.page.LogOverviewPage.createFormContent(IManagedForm) causing org.eclipse.hyades.test.ui.forms.base.VerdictSummaryChart.VerdictSummaryChart(Composite, int) to be called from org.eclipse.hyades.test.ui.forms.editor.page.LogOverviewPage.createOverviewPart(IManagedForm, Composite) when the VerdictSummaryChart should not be created.
It appears that installing the TPTP 4.7.1 Test Framework and Tools using the Eclipse 3.6.1 Update Manager does install BIRT/DTP/GMF (Joel, can you confirm if this correct?) but the bundle could not be started (possibly missing dependencies, etc.). Either way, we need to handle this condition in the code as well as confirm why the install using the Update Manager is pulling in BIRT/DTP/GMF.
Solution (org.eclipse.hyades.test.ui.forms.editor.page.LogOverviewPage.createFormContent(IManagedForm)): if(birtChartBundle != null){ //Attempt to start the bundle: birtChartBundle.start(); //Check if the bundling is started and activated (e.g. running): isBIRTAvailable = (birtChartBundle.getState() == Bundle.ACTIVE); }
(In reply to comment #5) > Solution > (org.eclipse.hyades.test.ui.forms.editor.page.LogOverviewPage.createFormContent(IManagedForm)): > > if(birtChartBundle != null){ > > //Attempt to start the bundle: > birtChartBundle.start(); > > //Check if the bundling is started and activated (e.g. running): > isBIRTAvailable = (birtChartBundle.getState() == Bundle.ACTIVE); > } Jerome, please test this fix with org.eclipse.birt.chart.engine starting and/or started to ensure the isBIRTAvailable is still set to true.
updating worked time test done : . config 1 : eclipse + tptp + birt . config 2 : eclipse + tptp + NO birt (install with zip files) . config 3 : eclipse + tptp + NO birt (install with eclipse install menu) config 1 & 2 works fine (in 2, we detect that birt is not there, so we avoid to use it) in config 3, birt is there but is not functional : it seems that some part are missing we are able to start birt plugin an at this moment, all runs fine, so we memorize that we will use it but when we try to use it, test log produce exception because birt itself see that it miss something to do his job assigning bug to Joel as on code side, we are unable to detect when birt is partially installed
Created attachment 186320 [details] Patch to update manifest require bundles I added breakpoints to VerdictSummary and Generator. TPTP located the BIRT bundle but was missing some BIRT dependencies. Based on http://dev.eclipse.org/newslists/news.eclipse.birt/msg11418.html, I added a dependency on org.eclipse.birt.chart.device.swt. A Null Pointer Exception still occurred: java.lang.NullPointerException at org.eclipse.birt.chart.factory.Generator.render(Generator.java:1233) at org.eclipse.hyades.test.ui.forms.base.VerdictSummaryChart.paintControl(VerdictSummaryChart.java:291) Based on http://www.eclipse.org/forums/index.php?t=msg&th=66620&S=54f26b4831b79bf8adbb38938a81caf7, I added a dependency on org.eclipse.birt.chart.engine.extension.
Tested using a local p2 repository installation. Paul, Can you please review? Thanks!
Thanks Joel. Patched reviewed with comments: -Please test the fix with manual installation (download/unzip) by refactoring the org.eclipse.hyades.test.ui manifest before the installation with and without BIRT/DTP/GMF. -Please test the P2 installation scenario with BIRT/DTP/GMF.
Tested with an exported plug-in containing the changes in the patch for the following scenarios: - Eclipse SDK with EMF, XSD and TPTP SDK installed in the dropins folder. No errors in the error log. Graph and verdict list not shown. - Eclipse SDK with EMF, XSD, BIRT, DTP, GEF and TPTP SDK installed in the dropins folder. No errors in the error log. Graph and verdict list displayed. - Eclipse SDK with EMF, XSD, BIRT, DTP and GEF installed in the dropins folder. TPTP Runtime (Platform, Test, and Trace projects) installed using a local p2 update site with contact all update sites unchecked. No errors in the error log. Graph and verdict list displayed. Tested using TPTP-4.7.2-201101101900 and its dependencies.
Excellent results. Thanks Joel!
Jerome, Can you please provide Test project approval for check-in to HEAD? Thanks!
patch approved very good job Joel delivering it under CVS
Joel, when will the Eclipse update site be updated to verify this fix?
Verified using TPTP-4.7.2-201101211900 using the all-in-one Zip. Requires verification of the update scenario.
The Helios RC1 staging repository is available for testing.
(In reply to comment #17) > The Helios RC1 staging repository is available for testing. Helios RC1 staging repository: http://download.eclipse.org/releases/maintenance/ (see http://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg05272.html - thanks to Joel). Verified using the Helios RC1 staging repository. Closing.