#34 Null Pointer exception switching to tree view.

0.9
closed
David
5
2014-02-16
2010-07-05
Jim Hyslop
No

Version: PasswordSafeSWT 0.8-beta4 (452)

I have a database which was created in the Windows version of PasswordSafe, and converted a while back in SWT version 0.6. Many of the entries have a blank "Group" field.

When I switch from list view to tree view, the application indicates multiple Null Pointer exceptions. The console shows:

04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] Exception occurred
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] java.lang.NullPointerException
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.pwsafe.passwordsafeswt.model.PasswordTreeLabelProvider.getColumnText(PasswordTreeLabelProvider.java:144)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.TableColumnViewerLabelProvider.update(TableColumnViewerLabelProvider.java:70)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:145)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:932)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:102)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.util.SafeRunnable$1.run(SafeRunnable.java:128)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1012)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:481)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.util.SafeRunnable$1.run(SafeRunnable.java:128)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2111)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2686)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1863)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:716)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1838)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1794)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1780)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1457)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1392)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:402)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1353)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1455)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1414)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.pwsafe.passwordsafeswt.PasswordSafeJFace.updateViewers(PasswordSafeJFace.java:1041)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.pwsafe.passwordsafeswt.PasswordSafeJFace.updateRecord(PasswordSafeJFace.java:678)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.pwsafe.passwordsafeswt.action.EditRecordAction.run(EditRecordAction.java:55)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1598)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1622)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1607)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1396)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3484)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3068)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.eclipse.jface.window.Window.open(Window.java:801)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at org.pwsafe.passwordsafeswt.PasswordSafeMacOSX.main(PasswordSafeMacOSX.java:189)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at java.lang.reflect.Method.invoke(Method.java:592)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at apple.launcher.LaunchRunner.run(LaunchRunner.java:115)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
04/07/10 10:28:53 PM [0x0-0x62062].PasswordSafeSWT[677] at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)

Discussion

  • Jens Jorgensen

    Jens Jorgensen - 2010-09-27

    I have(had) this same problem. I managed to get the project to build on my mac, and I've got a patch that fixes this bug. My patch is against current svn. Along the way, I managed to get the thing to build against the 3.6 SWT mac/cocoa, which was nice since the source seems to be built against carbon. If this code would be of interest I could put that bit into shape as well.

     
  • Jens Jorgensen

    Jens Jorgensen - 2010-09-27

    Ok, I couldn't attach a file to this tracker item, so I had to create a new one. Sorry. Anyhow if you want the patch just go look for the item I created.

     
  • David

    David - 2010-10-26

    Hi Jens,

    strange you couldn't assign the patch here. I'll test the Patch from #3076329.

    Cheers,
    David

     
  • David

    David - 2010-12-21

    Patch is incorporated with V0.8 beta 5

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks