NullPointerException by DecoratableEditorPartListener within develop-Branch

46 views
Skip to first unread message

Emre Taspolatoglu

unread,
Jul 24, 2013, 9:43:24 AM7/24/13
to emf-pr...@googlegroups.com
Hello there, I am coming across to a NullPointerException, which I can't explain. We have started to begin to work with the develop-Branch from the source. It happens, when I try to open a stereotype-able EMF model instance in my workbench, within a runtime instance, in which EMF profiles are being installed from the workspace. You will find the stack trace of the error below. It would be great to get some feedback from you. Thanks!

!ENTRY org.eclipse.ui.workbench 4 2 2013-07-24 15:36:19.775
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
    at org.modelversioning.emfprofile.application.registry.ui.observer.DecoratableEditorPartListener.partActivated(DecoratableEditorPartListener.java:129)
    at org.eclipse.ui.internal.WorkbenchPage$11.run(WorkbenchPage.java:4454)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:4452)
    at org.eclipse.ui.internal.WorkbenchPage.access$16(WorkbenchPage.java:4440)
    at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:173)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:193)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:191)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:596)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:549)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:538)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3052)
    at org.eclipse.ui.internal.WorkbenchPage.access$22(WorkbenchPage.java:2969)
    at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:2951)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2947)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2911)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2902)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:655)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:614)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:360)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:167)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
    at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:50)
    at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221)
    at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185)
    at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
    at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
    at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
    at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462)
    at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
    at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
    at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4136)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3982)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3621)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Emre Taspolatoglu

unread,
Jul 24, 2013, 10:12:06 AM7/24/13
to emf-pr...@googlegroups.com
Oh, I forgot to add, that it also happens when I open a profile diagram.

Becir Basic

unread,
Jul 25, 2013, 11:49:52 AM7/25/13
to emf-pr...@googlegroups.com
Hi Emre,

I have to say I have never encountered such an exception, and from looking at the place in the code I can not understand why a NullPointerException is thrown.
Nevertheless, it looks like that there is no previous viewer-state saved for an instance of editor part in the map, so I added a guard to avoid possible null for viewer-state (although should never be the case, ... :) ).

I pushed the change to develop branch. Hope this resolves the issue. If not, again, I was not able to reproduce the problem. Please provide a detailed description how to reproduce the problem.

Regards,
Becir


On Wednesday, July 24, 2013 3:43:24 PM UTC+2, Emre Taspolatoglu wrote:

Emre Taspolatoglu

unread,
Jul 30, 2013, 6:07:47 PM7/30/13
to emf-pr...@googlegroups.com
Hello Becir,

indeed your workaround has solved the mentioned problem for me. But as expected with the develop-branch there are other issues I am trying to solve while integrating/expanding EMF Profiles. Unfortunately, two specific one are as follows, which are not valid for the stable release:

1) I can not apply stereotypes from stereotype applications on model instances. The command "Apply Stereotype" is there, but when I choose it on a valid model instance, the info dialog "Can not apply any stereotype to EObject: ...". As I sad it isn't an issue with the stable release. The difference between them is also that in stable release, I get some how two commands with "Apply Stereotype", one of them choosable, other not. Funny. But by develop branch, there is only on choosable, an it delivers the above info.

2) I cannot load profile application into EMF Profile Application View from a *pa.xmi. When I try it, the error dialog "Error Loading Profile Application" comes out with a NullPointerException. Unfortunately, there are no corresponding error log or console outcome in the development instance of Eclipse. I guess there might be somthing wrong with the LoadProfileApplicationWizard. But for further infos I might need to debug it myself in the next time. This is reproducable, and like I said isn't an issue with the stable release. I will try to meet my project partner and ask him, whether he has got the same issues, since we both decided to use develop-branch.

I will try to keep you up to date, if I come across new things. Furthermore I would appreciate every help.

Thanks a lot for your interest in helping and please, keep up the good work! :)

Emre

Philip Langer

unread,
Aug 5, 2013, 6:21:23 AM8/5/13
to emf-pr...@googlegroups.com, Becir Basic
Hi Emre, hi Becir,

do we have any news on these issues?

Actually, we shouldn't have code that breaks such core functionality in the develop branch actually :) So we should fix this early.

Anyway, Emre could you please open two issues in the EclipseLabs project including the steps to reproduce this error and the stacktrace if available? Then, Becir and I will have a look at those and see how we can fix this as soon as possible.

Thanks and best wishes,

Philip
Reply all
Reply to author
Forward
0 new messages