Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 469063 - NullPointerException in GitFlowAdapterFactory.getAdapter (31)
Summary: NullPointerException in GitFlowAdapterFactory.getAdapter (31)
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Gitflow (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-02 00:40 EDT by EPP Error Reports CLA
Modified: 2015-06-07 18:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EPP Error Reports CLA 2015-06-02 00:40:33 EDT
The following incident was reported via the automated error reporting:

This error is seems to occur while the error reporting opens a dialog. It looks like the EGit expressions are executed then in an unexpected state.

    code:                   2
    plugin:                 org.eclipse.e4.ui.workbench.swt_0.13.0.v20150422-0725
    message:                Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt".
    fingerprint:            765fd8df
    exception class:        java.lang.NullPointerException
    exception message:      -
    number of children:     0
    
    java.lang.NullPointerException: null
    at org.eclipse.egit.gitflow.ui.internal.factories.GitFlowAdapterFactory.getAdapter(GitFlowAdapterFactory.java:31)
    at org.eclipse.core.internal.adapter.AdapterFactoryProxy.getAdapter(AdapterFactoryProxy.java:82)
    at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:333)
    at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:314)
    at org.eclipse.core.internal.expressions.AdaptExpression.evaluate(AdaptExpression.java:80)
    at org.eclipse.core.internal.expressions.NotExpression.evaluate(NotExpression.java:36)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:31)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:160)
    at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:98)
    at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:137)
    at org.eclipse.ui.internal.services.EvaluationReference.changed(EvaluationReference.java:131)
    at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:114)
    at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:341)
    at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:356)
    at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:657)
    at org.eclipse.e4.core.internal.contexts.EclipseContext.activateBranch(EclipseContext.java:663)
    at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$1.run(ShellActivationListener.java:95)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.processWindow(ShellActivationListener.java:91)
    at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.handleEvent(ShellActivationListener.java:63)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1105)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4225)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1485)
    at org.eclipse.swt.widgets.Shell.windowDidBecomeKey(Shell.java:2167)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5740)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(OS.java:-2)
    at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:214)
    at org.eclipse.swt.widgets.Widget.becomeKeyWindow(Widget.java:375)
    at org.eclipse.swt.widgets.Shell.becomeKeyWindow(Shell.java:525)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5564)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(OS.java:-2)
    at org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront(NSWindow.java:202)
    at org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.java:1291)
    at org.eclipse.swt.widgets.Shell.setActive(Shell.java:1536)
    at org.eclipse.swt.widgets.Shell.bringToTop(Shell.java:535)
    at org.eclipse.swt.widgets.Shell.open(Shell.java:1348)
    at org.eclipse.epp.internal.logging.aeri.ui.notifications.PopupNotification$1.linkActivated(PopupNotification.java:121)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233)
    at org.eclipse.ui.forms.widgets.ImageHyperlink.handleActivate(ImageHyperlink.java:201)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:327)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:311)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:125)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1293)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
   
  

General Information:

    reported-by:      Matthias Sohn
    anonymous-id:     ff4729bc-2c6d-498f-bc47-2d2f17b70cff
    eclipse-build-id: 4.5.0.I20150430-1445
    eclipse-product:  org.eclipse.epp.package.committers.product
    operating system: MacOSX 10.10.3 (x86_64) - cocoa
    jre-version:      1.8.0_45-b14

The following plug-ins were present on the execution stack (*):
    1. org.eclipse.core.databinding.observable_1.5.0.v20150422-0725
    2. org.eclipse.core.databinding_1.5.0.v20150422-0725
    3. org.eclipse.core.expressions_3.5.0.v20150421-2214
    4. org.eclipse.core.runtime_3.11.0.v20150405-1723
    5. org.eclipse.e4.core.contexts_1.4.0.v20150421-2214
    6. org.eclipse.e4.ui.workbench_1.3.0.v20150429-1329
    7. org.eclipse.e4.ui.workbench.swt_0.13.0.v20150422-0725
    8. org.eclipse.egit.gitflow.ui_4.0.0.201505182327
    9. org.eclipse.egit.gitflow_4.0.0.201505182327
    10. org.eclipse.egit_4.0.0.201505182327
    11. org.eclipse.epp.logging.aeri.ui_1.0.0.v20150506-1304
    12. org.eclipse.equinox.app_1.3.300.v20150423-1356
    13. org.eclipse.equinox.launcher_1.3.100.v20150423-1351
    14. org.eclipse.swt_3.104.0.v20150430-1253
    15. org.eclipse.ui_3.107.0.v20150423-1329
    16. org.eclipse.ui.forms_3.6.200.v20150428-1555
    17. org.eclipse.ui.ide.application_1.1.0.v20150422-0725
    18. org.eclipse.ui.ide_3.11.0.v20150429-0914

Please note that:
* Messages, stacktraces, and nested status objects may be shortened.
* Bug fields like status, resolution, and whiteboard are sent
  back to reporters.
* The list of present bundles and their respective versions was
  calculated by package naming heuristics. This may or may not reflect reality.

Other Resources:
* Report: https://dev.eclipse.org/recommenders/committers/confess/#/problems/556cd118e4b00b0cad3bc1df  
* Manual: https://dev.eclipse.org/recommenders/community/confess/#/guide


Thank you for your assistance.
Your friendly error-reports-inbox.
Comment 1 Andrey Loskutov CLA 2015-06-02 00:49:34 EDT
Looks like this is fixed with fix for bug 468134.
Comment 2 Andrey Loskutov CLA 2015-06-02 00:56:46 EDT
(In reply to Andrey Loskutov from comment #1)
> Looks like this is fixed with fix for bug 468134.

No, the lines are changed (line 47 now) but NPE is still possible: RepositoryMapping.getMapping can return null and should not be directly dereferenced.
Comment 3 Matthias Sohn CLA 2015-06-03 07:59:43 EDT
proposed fix
https://git.eclipse.org/r/#/c/49319/