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

Bug 350477

Summary: NPE when creating new project for HTML AUT
Product: [Technology] Jubula Reporter: Daniel Ford <webdaford>
Component: UIAssignee: Markus Tiede <markus.tiede>
Status: CLOSED WORKSFORME QA Contact: Oliver Goetz <Oliver.Goetz>
Severity: blocker    
Priority: P2 CC: Achim.Loerke, alexandra.schladebeck
Version: unspecified   
Target Milestone: Indigo SR1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Daniel Ford CLA 2011-06-27 14:06:40 EDT
Version 1.0.0 of Jubula on Windows 7 (64 bit) with a 64 bit JRE.
1) Test-> New...
2) Enter project name "foo"
3) Select "html" for "Toolkit for Test"
4) Next
5) Enter "bar" for "AUT name"
6) Select "html" for "Toolkit"
7) Next
8) Enter "id1" for the "AUT ID"
9) Enter "http://localhost:8080" for the "AUT URL"
10) Select "Firefox" for the "Browser"
11) Next
12) Finish

A dialog will then appear for the project creation which will then be replaced by an Error dialog with the following stack trace in its "Details".  Scroll down and you'll see the NPE.


3004: Unexpected error occurred.
  org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
  	at org.eclipse.swt.SWT.error(SWT.java:4282)
  	at org.eclipse.swt.SWT.error(SWT.java:4197)
  	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
  	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
  	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
  	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
  	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
  	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
  	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
  	at org.eclipse.ui.internal.progress.ProgressManager$5.run(ProgressManager.java:960)
  	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
  	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
  	at org.eclipse.jubula.client.ui.handlers.project.NewProjectHandler$1.run(NewProjectHandler.java:94)
  	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:2696)
  	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
  	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
  	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
  	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
  	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
  	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:344)
  	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:25)
  	at java.lang.reflect.Method.invoke(Method.java:597)
  	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
  	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
  	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
  	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
  Caused by: java.lang.NullPointerException
  	at org.eclipse.jubula.client.core.persistence.EditSupport.reloadEditSession(EditSupport.java:514)
  	at org.eclipse.jubula.client.ui.editors.AbstractJBEditor.reOpenEditor(AbstractJBEditor.java:413)
  	at org.eclipse.jubula.client.ui.editors.TestCaseEditor.reOpenEditor(TestCaseEditor.java:447)
  	at org.eclipse.jubula.client.ui.editors.JBEditorHelper$1.run(JBEditorHelper.java:307)
  	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  	... 36 more
Comment 1 Achim Loerke CLA 2011-06-28 02:32:17 EDT
Markus, please check.
Comment 2 Markus Tiede CLA 2011-07-01 07:27:52 EDT
I am currently unable to reproduce this issue with the given instructions - however I am able to see what might have happened:
 - the project creation was performed while another project was loaded in the ITE - there has been an open TCE
 - for this open TCE (which should not be able to remain open during the project creation phase) a reload of it's edit session was performed and as (org.eclipse.jubula.client.core.persistence.EditSupport.reloadEditSession(EditSupport.java:514)) getProject() might be null during project creation the NPE could happen.
 
I don't think that this NPE is related to the creation of a project which uses 'HTML' as its toolkit.

Could you please add some more information which could answer the following questions:
 - In which state is / was the ITE when performing the creation of the new project?
 - Did this error happen once or is it easily reproducible?
 - Are there any other side-effects you might have noticed after the NPE happened? Normally a clean (re-)start of Jubula should help to resolve this issue.
Comment 3 Daniel Ford CLA 2011-07-20 14:41:22 EDT
I wish I could provide more information.  I don't know what a "TCE" or an "ITE" is so I can't describe things in those terms.   Basically, it was trivial to reproduce on my system using the instructions provided.  Perhaps there is some interaction with something else that triggers the bug.  If there haven't been any changes to the code to address the NPE, then I seriously doubt that this is resolved.
Comment 4 Markus Tiede CLA 2011-09-15 07:15:28 EDT
Sorry for the many TLAs :)
 - ITE means in our terms "Integrated Testing Environment", which basically refers to the UI-client in which you specify your tests.
 - TCE / TSE --> Test Case/Suite Editor
 - TCB / TSB --> Test Case/Suite Browser

Is this issue still reproducible in your environment with the steps that you provided?
Comment 5 Alexandra Schladebeck CLA 2012-04-20 02:05:17 EDT
As no other information has been added, I'm closing this ticket.