Uploaded image for project: 'Directory Studio'
  1. Directory Studio
  2. DIRSTUDIO-966

NullPointerException after expanding LDAP tree and "Error notifying a preference change listener" in "attr/val quick filter"

    XMLWordPrintableJSON

Details

    Description

      Hello,

      there is some problem with attribute/value quick filter.

      Start Apache DirStudio, open connection to LDAP server.

      Find a tree with some objects and some subtrees.

      Expand one subtree and keep other subtree collapsed.

      Open one object, enter some text to attribute/value quick filter - this will filter only those lines containing entered text in attribute/value field. [OK]

      Now, open other object on the same level and change the text in attribute/value filter. This will refilter the displayed lines. [OK]

      Now open some object from already expanded subtree and change the text in attribute/value filter. This will refilter the displayed lines. [OK]

      Now open some collapsed subtree. Select some object and try to change attribute/value filter text - this generates error

      "Error notifying a preference change listener. Check the log for details. java.lang.NullPointerException"

      If you have open some object and you expand some subtree, it will generate following message to the log:

      ==================================================
      !ENTRY org.eclipse.ui 4 0 2013-12-06 17:21:59.721
      !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:4361)
      at org.eclipse.swt.SWT.error(SWT.java:4276)
      at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
      at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3529)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3182)
      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.apache.directory.studio.Application.start(Application.java:51)
      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:353)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
      Caused by: java.lang.NullPointerException
      at org.apache.directory.studio.ldapbrowser.ui.editors.entry.EntryEditorOutlinePage.refresh(EntryEditorOutlinePage.java:232)
      at org.apache.directory.studio.ldapbrowser.ui.editors.entry.EntryEditorUniversalListener.entryUpdated(EntryEditorUniversalListener.java:193)
      at org.apache.directory.studio.ldapbrowser.core.events.EventRegistry$4$1.run(EventRegistry.java:237)
      at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
      at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
      ... 23 more
      ==================================================

      Since then, you cannot use attribute/value quick filter in the object view - if you use it, the Apache DirStudio generates window with error "Error notifying a preference change listener. Check the log for details. java.lang.NullPointerException" and there is following message in the log:

      ==================================================
      !ENTRY org.eclipse.ui.workbench 4 2 2013-12-06 17:23:02.509
      !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
      !STACK 0
      java.lang.NullPointerException
      at org.apache.directory.studio.ldapbrowser.ui.editors.entry.EntryEditorOutlinePage.hasAnOutline(EntryEditorOutlinePage.java:530)
      at org.apache.directory.studio.ldapbrowser.ui.editors.entry.EntryEditorOutlinePage.refresh(EntryEditorOutlinePage.java:220)
      at org.apache.directory.studio.ldapbrowser.ui.editors.entry.EntryEditorOutlinePage$1.propertyChange(EntryEditorOutlinePage.java:74)
      at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:375)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:372)
      at org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidgetFilter.setQuickFilterValue(EntryEditorWidgetFilter.java:208)
      at org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidgetQuickFilterWidget$2.modifyText(EntryEditorWidgetQuickFilterWidget.java:140)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3554)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3179)
      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.apache.directory.studio.Application.start(Application.java:51)
      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:353)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
      ==================================================

      If you close object view before you expand some subtree, you can still use attribute/value quick filter. First time you expand some subtree while there is open some object, it breaks the quick filter funtionality.

      Regards,

      Robert Wolf.

      Attachments

        1. screenshot-apache-dirst-quick-filter-error.png
          79 kB
          Robert Wolf
        2. screenshot-apache-dirst-quick-filter.png
          69 kB
          Robert Wolf
        3. expand-and-quick-filter-NPE.log
          61 kB
          Robert Wolf

        Activity

          People

            seelmann Stefan Seelmann
            r.wolf.conf Robert Wolf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: