Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] FixGMFGen and nullpointerexception
[Eugenia] FixGMFGen and nullpointerexception [message #677814] Thu, 09 June 2011 11:49 Go to next message
Ivar Refsdal is currently offline Ivar Refsdal
Messages: 24
Registered: May 2011
Junior Member
Hi all,

I have the following code in FixGMFGen.eol:

var features = GmfGen!FeatureLabelModelFacet.all.select( feat |
feat.metaFeatures.isDefined());
var featureLabel = features.selectOne( x | x.metaFeatures.exists( mf |
mf.ecoreFeature.name == "qcf"));
featureLabel.println();

And it prints the following:
org.eclipse.gmf.codegen.gmfgen.impl.FeatureLabelModelFacetImpl@410e942e
(viewPattern: name={0} qcf={1}, editorPattern: name={0} qcf={1},
editPattern: name={0} qcf={1}, viewMethod: MESSAGE_FORMAT, editMethod:
MESSAGE_FORMAT)
So hopefully the query is correct...?

but somewhere else it crashes, see stacktrace below.
(Removing the code removes the crash..)
Any clues for this?

All the best,
Ivar Refsdal

java.lang.NullPointerException
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:114)
at
org.eclipse.gmf.internal.bridge.transform.ValidationHelper.validate(ValidationHelper.java:288)
at
org.eclipse.gmf.internal.bridge.transform.ValidationHelper.validate(ValidationHelper.java:320)
at
org.eclipse.gmf.internal.codegen.popup.actions.ExecuteTemplatesOperation.validateGenModel(ExecuteTemplatesOperation.java:263)
at
org.eclipse.gmf.internal.codegen.popup.actions.ExecuteTemplatesOperation.run(ExecuteTemplatesOperation.java:106)
at
org.eclipse.gmf.internal.codegen.popup.actions.ExecuteTemplatesAction.run(ExecuteTemplatesAction.java:47)
at
org.eclipse.epsilon.eugenia.GenerateDiagramCodeDelegate.runImpl(GenerateDiagramCodeDelegate.java:26)
at
org.eclipse.epsilon.eugenia.GenerateAllDelegate$2.run(GenerateAllDelegate.java:131)
at
org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164)
at
org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Re: [Eugenia] FixGMFGen and nullpointerexception [message #677815 is a reply to message #677814] Thu, 09 June 2011 11:58 Go to previous messageGo to next message
Ivar Refsdal is currently offline Ivar Refsdal
Messages: 24
Registered: May 2011
Junior Member
PS...

This is also reproduceable on the model from
http://www.eclipse.org/gmt/epsilon/doc/eugenia/

and using the following code:

var features = GmfGen!FeatureLabelModelFacet.all.select( feat |
feat.metaFeatures.isDefined());
var featureLabel = features.selectOne( x | x.metaFeatures.exists( mf |
mf.ecoreFeature.name == "name"));
featureLabel.println();

Best,
Ivar

Ivar Refsdal wrote, on 06/09/2011 01:49 PM:
> Hi all,
>
> I have the following code in FixGMFGen.eol:
>
> var features = GmfGen!FeatureLabelModelFacet.all.select( feat |
> feat.metaFeatures.isDefined());
> var featureLabel = features.selectOne( x | x.metaFeatures.exists( mf |
> mf.ecoreFeature.name == "qcf"));
> featureLabel.println();
>
> And it prints the following:
> org.eclipse.gmf.codegen.gmfgen.impl.FeatureLabelModelFacetImpl@410e942e
> (viewPattern: name={0} qcf={1}, editorPattern: name={0} qcf={1},
> editPattern: name={0} qcf={1}, viewMethod: MESSAGE_FORMAT, editMethod:
> MESSAGE_FORMAT)
> So hopefully the query is correct...?
>
> but somewhere else it crashes, see stacktrace below.
> (Removing the code removes the crash..)
> Any clues for this?
>
> All the best,
> Ivar Refsdal
>
> java.lang.NullPointerException
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:114)
> at
> org.eclipse.gmf.internal.bridge.transform.ValidationHelper.validate(ValidationHelper.java:288)
>
> at
> org.eclipse.gmf.internal.bridge.transform.ValidationHelper.validate(ValidationHelper.java:320)
>
> at
> org.eclipse.gmf.internal.codegen.popup.actions.ExecuteTemplatesOperation.validateGenModel(ExecuteTemplatesOperation.java:263)
>
> at
> org.eclipse.gmf.internal.codegen.popup.actions.ExecuteTemplatesOperation.run(ExecuteTemplatesOperation.java:106)
>
> at
> org.eclipse.gmf.internal.codegen.popup.actions.ExecuteTemplatesAction.run(ExecuteTemplatesAction.java:47)
>
> at
> org.eclipse.epsilon.eugenia.GenerateDiagramCodeDelegate.runImpl(GenerateDiagramCodeDelegate.java:26)
>
> at
> org.eclipse.epsilon.eugenia.GenerateAllDelegate$2.run(GenerateAllDelegate.java:131)
>
> at
> org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164)
>
> at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
>
> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
>
> 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:369)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Re: [Eugenia] FixGMFGen and nullpointerexception [message #682493 is a reply to message #677815] Sat, 11 June 2011 08:44 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 876
Registered: July 2009
Senior Member
Hi Ivar,

The query is correct indeed. I've tried to reproduce this problem but haven't been able to. Could you perhaps provide more details about this (i.e. in which step does it crash? does it always crash etc.) so that I can investigate?

Cheers,
Dimitris
Re: [Eugenia] FixGMFGen and nullpointerexception [message #682496 is a reply to message #682493] Sat, 11 June 2011 08:59 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 876
Registered: July 2009
Senior Member
Hi Ivar,

I've now managed to reproduce this. Could you please file a bug report so that we can keep track of any progress on this? https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT&component=Epsilon

Cheers,
Dimitris
Re: [Eugenia] FixGMFGen and nullpointerexception [message #683359 is a reply to message #682496] Mon, 13 June 2011 14:54 Go to previous message
Ivar Refsdal is currently offline Ivar Refsdal
Messages: 24
Registered: May 2011
Junior Member
Hi Dimitris,

thanks for your kind response!
I've submitted a bug report here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349199

All the best,
Ivar

Dimitris Kolovos wrote, on 06/11/2011 10:59 AM:
> Hi Ivar,
>
> I've now managed to reproduce this. Could you please file a bug report
> so that we can keep track of any progress on this?
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT&component=Epsilon
>
> Cheers,
> Dimitris
Previous Topic:How to integrate EGL with diagram
Next Topic:Process in-memory EMF model
Goto Forum:
  


Current Time: Wed Oct 01 00:13:40 GMT 2014

Powered by FUDForum. Page generated in 0.11336 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software