title: org.eclipse.swt.SWTException: Failed to execute runnable with SWT java
body: <p>I have a weird question when I write a eclipse plug-in.The process is that when I click a button on a dashboard like GMF it open a wizard dialog containing a WizardNewFileCreationPage. It works well when I use  eclipse 3.7.1 ,but when I use eclipse Indigo Service Release 1 the error happens.Here is the error message.</p>
  
  <pre><code>!ENTRY org.eclipse.ui 4 0 2012-03-28 20:52:22.646
  !MESSAGE Unhandled event loop exception
  !STACK 0
  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.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(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  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.ui.dialogs.WizardNewFileCreationPage.initialPopulateContainerNameField(WizardNewFileCreationPage.java:688)
  at org.eclipse.ui.dialogs.WizardNewFileCreationPage.createControl(WizardNewFileCreationPage.java:247)
  at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:174)
  at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
  at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:608)
  at org.eclipse.jface.window.Window.create(Window.java:431)
  at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
  at edu.fdu.spl.views.SPLPanel$4$1.run(SPLPanel.java:191)
  at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  ... 23 more
  </code></pre>
  
  <p>And here is the code in mouselistener</p>
  
  <pre><code>Display.getDefault().asyncExec(new Runnable() {
      public void run() {
          GoalModelCreatewizard wizard = new GoalModelCreatewizard();
          Shell sh = Display.getCurrent().getActiveShell();
          // sh.open();
          // Shell sh= new Shell(display);
          WizardDialog dialog = new WizardDialog(sh, wizard);
          dialog.setTitle("ContainerSelectionDialog 11111111");
          System.out.println("asdaa2");
          if (dialog == null) {
              System.out.println("asadsa");
          }
          dialog.create();
          if (dialog.open() == WizardDialog.OK) {
              System.out.println("asasd");
          }
      }
  });
  </code></pre>
  
  <p>How to solve this bug ?</p>