| Summary: | NPE when loading Resources with errors | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Dennis Huebner <dennis.huebner> |
| Component: | Core | Assignee: | Project inbox <sirius.core-inbox> |
| Status: | CLOSED FIXED | QA Contact: | Florian Barbin <florian.barbin> |
| Severity: | normal | ||
| Priority: | P3 | CC: | florian.barbin, laurent.fasani, laurent.redor, pierre-charles.david |
| Version: | 3.1.0 | Keywords: | triaged |
| Target Milestone: | 4.0.0M6 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| See Also: |
https://git.eclipse.org/r/63872 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c1efa7982a432a2ee2d0047be7b70690c444a9fa https://bugs.eclipse.org/bugs/show_bug.cgi?id=490904 |
||
| Whiteboard: | |||
java.lang.NullPointerException at org.eclipse.sirius.business.api.resource.LoadEMFResource.run(LoadEMFResource.java:71) at org.eclipse.sirius.ui.tools.api.views.modelexplorerview.resourcelistener.DefaultModelingProjectResourceListener.isLoadableModel(DefaultModelingProjectResourceListener.java:183) at org.eclipse.sirius.ui.tools.api.views.modelexplorerview.resourcelistener.ResourceDeltaVisitor.visitFileWithOpenedRepresentationsFile(ResourceDeltaVisitor.java:229) at org.eclipse.sirius.ui.tools.api.views.modelexplorerview.resourcelistener.ResourceDeltaVisitor.visitFile(ResourceDeltaVisitor.java:183) at org.eclipse.sirius.ui.tools.api.views.modelexplorerview.resourcelistener.ResourceDeltaVisitor.visit(ResourceDeltaVisitor.java:88) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:63) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:74) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:74) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:47) at org.eclipse.sirius.ui.tools.api.views.modelexplorerview.resourcelistener.DefaultModelingProjectResourceListener.resourceChanged(DefaultModelingProjectResourceListener.java:81) at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:289) at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:152) at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:373) at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1470) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2250) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:130) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119) Thanks for your detailed bug report. We have reproduced this issue and we consider it as valid. Nevertheless, we have currently not planned to work on it in the following releases. New Gerrit change created: https://git.eclipse.org/r/63872 Gerrit change https://git.eclipse.org/r/63872 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c1efa7982a432a2ee2d0047be7b70690c444a9fa Fixed in 4.0.0 M6 with commit http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c1efa7982a432a2ee2d0047be7b70690c444a9fa Dennis, note that the fix was also backported to the 3.1.x maintenance branch for the (not yet released) 3.1.5 version, as part of bug 490904 (which reported the same issue independently). (In reply to Pierre-Charles David from comment #6) > Dennis, note that the fix was also backported to the 3.1.x maintenance > branch for the (not yet released) 3.1.5 version, as part of bug 490904 > (which reported the same issue independently). Cool, thanks Verified on Sirius 4.0.0.RC1 Available in Sirius 4.0.0. |
I'm using Sirius 3.1.1 In org.eclipse.sirius.business.api.resource.LoadEMFResource.run() Line: 66 res = set.getResource(uri, true); if (!res.getErrors().isEmpty()) { // The file was previously loaded with errors. It might have // changed, unload it before reload. unload(); } res.load(getOptions()); unload() sets 'res' field to NULL (Line 101), in the next line res is accessed, that cause an NPE