Constraint causes - org.eclipse.core.runtime.AssertionFailedException: null argument: [message #964867] |
Tue, 30 October 2012 21:15  |
Eclipse User |
|
|
|
Hi,
I have been working on an RCP product that has multiple GMF plug-ins. I
started this in version 3.x and have migrated to Juno. Everything has
been fine until I added a Java based constraint to the gmfmap and
regenerated the plug-in.
Having regenerated this I now get an assertion error (See below)
whenever I add anything to the model, I suspect it is coming from the
added constraint code. The problem is stepping through the bulk of the
code has not indicated where the assertion is coming from. Has anyone
seen this or knows where this kind of error comes from?
Thanks, Nigel.
----------------------------------
!ENTRY org.eclipse.core.commands 4 2 2012-10-30 18:40:27.592
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.commands".
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at
org.eclipse.core.commands.operations.AbstractOperation.hasContext(AbstractOperation.java:153)
at
org.eclipse.ui.operations.OperationHistoryActionHandler$HistoryListener.historyNotification(OperationHistoryActionHandler.java:141)
at
org.eclipse.core.commands.operations.DefaultOperationHistory$2.run(DefaultOperationHistory.java:941)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.notifyListeners(DefaultOperationHistory.java:930)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.notifyAdd(DefaultOperationHistory.java:992)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.add(DefaultOperationHistory.java:192)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:530)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:206)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:169)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
at
org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
at
org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool.performCreation(CreationTool.java:133)
at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:189)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
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:3980)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
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 com.routestovalue.rcp.intro.Application.start(Application.java:29)
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)
!ENTRY org.eclipse.core.commands 4 2 2012-10-30 18:40:27.594
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.commands".
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at
org.eclipse.core.commands.operations.AbstractOperation.hasContext(AbstractOperation.java:153)
at
org.eclipse.ui.operations.OperationHistoryActionHandler$HistoryListener.historyNotification(OperationHistoryActionHandler.java:141)
at
org.eclipse.core.commands.operations.DefaultOperationHistory$2.run(DefaultOperationHistory.java:941)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.notifyListeners(DefaultOperationHistory.java:930)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.notifyAdd(DefaultOperationHistory.java:992)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.add(DefaultOperationHistory.java:192)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:530)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:206)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:169)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
at
org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
at
org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool.performCreation(CreationTool.java:133)
at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:189)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
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:3980)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
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 com.routestovalue.rcp.intro.Application.start(Application.java:29)
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)
|
|
|
|
Re: Constraint causes - org.eclipse.core.runtime.AssertionFailedException: null argument: [message #965967 is a reply to message #965549] |
Wed, 31 October 2012 16:45   |
Eclipse User |
|
|
|
Hi Ralph,
thanks for getting back to me. I specified a link constraint using Java
following the tutorial here:
http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial5
in the section 'Diagram error management'. I have noted that exception
is thrown before the constraint code is called and seems to happen when
any diagrams related to the model are altered. I am beginning to suspect
the act of regenerating the diagram code has introduced the defect and
it may not be related to the added constraint.
Best regards,
Nigel
On 31/10/2012 10:18, Ralph Gerbig wrote:
> Hi,
>
> do you get the error when specifying an OCL constraint? What kind of
> constraint did you add? Link constraint? Expression Label? How does the
> constraint look like?
>
> Ralph
|
|
|
|
Re: Constraint causes - org.eclipse.core.runtime.AssertionFailedException: null argument: [message #976318 is a reply to message #972185] |
Thu, 08 November 2012 13:38   |
Eclipse User |
|
|
|
Hi Ralph,
tracing the code it seems that there is a CompositeCommand being issued
from somewhere with a null IUndoContext. I have no idea at this stage
were it is coming from :-(
As my code is under source control and has a lot of modifications rather
than deleting everything I created a test project to recreate the issue
and tried that. This does not suffer the same issue so it seems the
problem is from the regeneration itself.
I'll hunt through the code and see where CompositeCommands are issued from.
Best regards,
Nigel
On 05/11/2012 12:28, Ralph Gerbig wrote:
> Hi,
>
> if you think regenerating the code introduced did you try to DELTE your
> genmodel and source code and generate them from scratch?
>
> Cheers,
>
> Ralph
|
|
|
|
|
Re: Constraint causes - org.eclipse.core.runtime.AssertionFailedException: null argument: [message #977487 is a reply to message #976760] |
Fri, 09 November 2012 10:17  |
Eclipse User |
|
|
|
Hi,
the templates can change between GMF version. However they do not seem to change a lot. On the other side if the templates you are customizng changes it will not make a lot of difference if you change the template or your handwritten @generate not code. What I use a lot is the targetDef.proceed() statement to only execute custom templates for things I want to customize. This saves you copying code which means that less can get broken when the original templates change. I have never forked the GMF code base through extension and I am not aware of any version dependencies.
Ralph
|
|
|
Powered by
FUDForum. Page generated in 0.03766 seconds