| Summary: | NPE when selecting System configuration in properties view | ||
|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Jens Baumgart <jens.baumgart> |
| Component: | UI | Assignee: | Thomas Wolf <twolf> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.sohn, robin, twolf |
| Version: | 0.11 | ||
| Target Milestone: | 4.4 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| See Also: |
https://git.eclipse.org/r/73983 https://git.eclipse.org/c/egit/egit.git/commit/?id=690fc4102c668ebb85b78f1eac2828364f986a1b |
||
| Whiteboard: | |||
|
Description
Jens Baumgart
RepositoryPropertySource Line 101: systemConfig = SystemReader.getInstance().openSystemConfig(null, FS.DETECTED); returns a Config object with file==null, if no system config exists. Is this really intended? Could not reproduce the problem. The following problem was reported via the automated error reporting:
Message: Unhandled event loop exception
java.lang.NullPointerException: null
at org.eclipse.egit.ui.internal.repository.RepositoryPropertySource.getPropertyDescriptors(RepositoryPropertySource.java:391)
at org.eclipse.ui.views.properties.PropertySheetEntry.computeMergedPropertyDescriptors(PropertySheetEntry.java:171)
at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:508)
at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:735)
at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:986)
at org.eclipse.ui.views.properties.PropertySheetPage.refresh(PropertySheetPage.java:500)
at org.eclipse.egit.ui.internal.repository.RepositoryPropertySource$1$1.run(RepositoryPropertySource.java:206)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
Bundles:
| org.eclipse.core.runtime | 3.11.1.v20150903-1804 | 3.12.0.v20160506-0702 |
| org.eclipse.e4.core.contexts | 1.4.0.v20150828-0818 | 1.5.0.v20160504-0909 |
| org.eclipse.e4.ui.workbench | 1.3.0.v20150531-1948 | 1.4.0.v20160503-1849 |
| org.eclipse.e4.ui.workbench.renderers.swt | 0.13.0.v20150901-1347 | 0.14.0.v20160429-1232 |
| org.eclipse.e4.ui.workbench.swt | 0.13.0.v20150504-0621 | 0.14.0.v20160411-2100 |
| org.eclipse.egit.ui | 4.0.0.201506090130-r | 4.4.0.201605041135-m1 |
| org.eclipse.jface | 3.11.0.v20150602-1400 | 3.12.0.v20160411-2246 |
| org.eclipse.swt | 3.104.0.v20150528-0211 | 3.105.0.v20160512-0845 |
| org.eclipse.ui | 3.107.0.v20150507-1945 | 3.108.0.v20160505-1310 |
| org.eclipse.ui.navigator | 3.6.0.v20150422-0725 | 3.6.100.v20160505-1330 |
| org.eclipse.ui.views | 3.8.0.v20150422-0725 | 3.8.100.v20160509-1025 |
Operating Systems:
| MacOSX | 10.11.2 | 10.11.3 |
| Windows | 6.1.0 | 10.0.0 |
The above information is a snapshot of the collected data. Visit https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/problems/557ace03e4b0004b455ce757 for the latest data.
Select a repository in the repositories view, choose <Context Menu>->Show In->Properties. Then choose the system config. Several problems here: 1. If the system config does not exist, we get this NPE for exactly the reason Jens identified 5 years ago. Note that on some Macs with Apple git, there is no system config (compare bug 482076), and judging from the AERI reports, there are also Windows configurations where this can occur. 2. If the system config does exist, only the keys are shown, but not the values. 3. If the system config exists but is read-only, the edit button is enabled all the same but bring up a property page dialog in which one cannot edit. (In reply to Thomas Wolf from comment #4) > 1. If the system config does not exist Minor correction: if the directory where the system config is supposed to be does not exist, we get this NPE. If the directory exists but not the file, it's fine. Unfortunately, there are indeed configurations where that directory is not present. Once the NPE has occurred, the Properties View becomes dysfunctional and must be closed. Re-opening a new Properties View then works again, until one chooses the system config again. New Gerrit change created: https://git.eclipse.org/r/73983 Gerrit change https://git.eclipse.org/r/73983 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=690fc4102c668ebb85b78f1eac2828364f986a1b submitted |