| Summary: | NPE in PermissionService during session open | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Koen Staal <koen.staal> | ||||
| Component: | Core | Assignee: | Pierre-Charles David <pierre-charles.david> | ||||
| Status: | CLOSED FIXED | QA Contact: | Laurent Fasani <laurent.fasani> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | laurent.fasani, laurent.redor, pierre-charles.david | ||||
| Version: | 4.1.1 | Keywords: | triaged | ||||
| Target Milestone: | 5.0.0M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| See Also: |
https://git.eclipse.org/r/93679 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=11a08da87535d6321668a6e1365025288cb592e4 |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Koen Staal
It's difficult to analyse just with the stack trace. Do you have steps to reproduce? Did you use the extension point "org.eclipse.sirius.ecore.extender.PermissionProvider"? On line PermissionService.java:88 (just before the NPE), do you have the id of the incriminated permissionProviderDescriptor? The problem was probably triggered by a misconfigured PermissionProvider, but Sirius should be more resilient to these. We should: * trace the original error which prevented us to instantiate the PermissionProvider; * check the result of permissionProviderDescriptor.getPermissionProvider() in org.eclipse.sirius.ecore.extender.business.internal.permission.PermissionService.createPermissionAuthority(ResourceSet). Created attachment 267398 [details]
Sample projects to try to reproduce the issue
Steps to reproduce:
1. Import the attached project. It contains a buggy permissionProvider extension.
2. Launch a runtime.
3. Create/open a Sirius session => NPE.
Caused by: java.lang.NullPointerException
at org.eclipse.sirius.ecore.extender.business.internal.permission.PermissionService.createPermissionAuthority(PermissionService.java:89)
at org.eclipse.sirius.ecore.extender.business.internal.permission.PermissionAuthorityRegistryImpl.getPermissionAuthority(PermissionAuthorityRegistryImpl.java:72)
at org.eclipse.sirius.ui.tools.internal.views.modelexplorer.PermissionAuthoritySessionManagerListener.notifyRemoveSession(PermissionAuthoritySessionManagerListener.java:55)
at org.eclipse.sirius.business.internal.session.SessionManagerImpl.remove(SessionManagerImpl.java:167)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.close(DAnalysisSessionImpl.java:1296)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.open(DAnalysisSessionImpl.java:1201)
at org.eclipse.sirius.business.internal.session.SessionManagerImpl.openSession(SessionManagerImpl.java:390)
at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.performOpenSession(OpenRepresentationsFileJob.java:157)
at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.runInWorkspace(OpenRepresentationsFileJob.java:126)
... 2 more
New Gerrit change created: https://git.eclipse.org/r/93679 Gerrit change https://git.eclipse.org/r/93679 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=11a08da87535d6321668a6e1365025288cb592e4 Fixed by 11a08da87535d6321668a6e1365025288cb592e4. Validated with ODCE10.0_20170518 Available in Sirius 5.0.0, see https://wiki.eclipse.org/Sirius/5.0.0 for details. |