Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318535 - NPE in PropertyTester
Summary: NPE in PropertyTester
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.9.0-M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-30 21:12 EDT by Benjamin Muskalla CLA
Modified: 2010-08-30 09:01 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2010-06-30 21:12:33 EDT
* create a project
* share via git + create a new repository
* delete project in workspace and check "delete on disk"
* right click repository in Git repositories view
* NPE happens

!ENTRY org.eclipse.ui.workbench 4 0 2010-07-01 03:09:54.583
!MESSAGE An unexpected exception was thrown.
!STACK 0
java.lang.NullPointerException
	at org.eclipse.egit.ui.internal.repository.tree.PropertyTester.test(PropertyTester.java:95)
	at org.eclipse.core.internal.expressions.Property.test(Property.java:58)
	at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
	at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
	at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:150)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
	at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
	at org.eclipse.ui.internal.services.EvaluationResultCache.evaluate(EvaluationResultCache.java:74)
	at org.eclipse.ui.internal.services.ExpressionAuthority.evaluate(ExpressionAuthority.java:165)
	at org.eclipse.ui.internal.services.EvaluationAuthority.refsWithSameExpression(EvaluationAuthority.java:155)
	at org.eclipse.ui.internal.services.EvaluationAuthority.sourceChanged(EvaluationAuthority.java:129)
	at org.eclipse.ui.internal.services.ExpressionAuthority.sourceChanged(ExpressionAuthority.java:311)
	at org.eclipse.ui.internal.services.ExpressionAuthority.sourceChanged(ExpressionAuthority.java:302)
	at org.eclipse.ui.AbstractSourceProvider.fireSourceChanged(AbstractSourceProvider.java:80)
	at org.eclipse.ui.internal.services.WorkbenchSourceProvider.selectionChanged(WorkbenchSourceProvider.java:177)
	at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
	at org.eclipse.ui.internal.AbstractSelectionService.setActivePart(AbstractSelectionService.java:282)
	at org.eclipse.ui.internal.WWinPartService.updateActivePart(WWinPartService.java:134)
	at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartService.java:125)
	at org.eclipse.ui.internal.WWinPartService$WWinListener.partDeactivated(WWinPartService.java:50)
	at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:115)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.runtime.Platform.run(Platform.java:888)
	at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:55)
	at org.eclipse.ui.internal.PartListenerList2.firePartDeactivated(PartListenerList2.java:113)
	at org.eclipse.ui.internal.PartService.firePartDeactivated(PartService.java:242)
	at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:300)
	at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:57)
	at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:136)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3537)
	at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:3077)
	at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:279)
	at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:237)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1263)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1531)
	at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:2643)
	at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:2579)
	at org.eclipse.swt.widgets.Composite.gtk_button_press_event(Composite.java:681)
	at org.eclipse.swt.widgets.Tree.gtk_button_press_event(Tree.java:1865)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1731)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4794)
	at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:3485)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4372)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8163)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1239)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2224)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3169)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	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:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	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)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

Not sure if this belongs to egit or jgit as the API doc getFullBranch() does not state that it can return null.
Comment 1 Jens Baumgart CLA 2010-08-11 13:08:28 EDT
Problem also occurs when a repo is deleted outside Eclipse.
You get tons of errors shown in the UI.
Comment 2 Jens Baumgart CLA 2010-08-11 13:17:32 EDT
(In reply to comment #1)
> Problem also occurs when a repo is deleted outside Eclipse.
> You get tons of errors shown in the UI.

The original issue was no longer reproducable with current EGit.
The additional issue (external deletion) is fixed with
http://egit.eclipse.org/r/#change,1287
Comment 3 Mathias Kinzler CLA 2010-08-11 13:20:20 EDT
Merged as 5ed46eeed3b15ce8eca4b00651a7411b372639ec