Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » issue at opening files or at startup of eclipse(CompoundXtextEditorCallback Was configured with another client or not configured at all.)
issue at opening files or at startup of eclipse [message #879561] Thu, 31 May 2012 12:42 Go to next message
Phil R is currently offline Phil R
Messages: 99
Registered: September 2011
Member
Hi,

I sometimes receive the following error for one file(.mydsl). The other files still work normally. How can I solve this error?

-Phil

!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-05-31 14:40:26.926
!MESSAGE 
!STACK 0
java.lang.NullPointerException
	at org.eclipse.xtext.EcoreUtil2.getContainerOfType(EcoreUtil2.java:100)
	at org.eclipse.xtext.GrammarUtil.containingAssignment(GrammarUtil.java:95)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.findNodeFor(DefaultLocationInFileProvider.java:321)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.doGetTextRegion(DefaultLocationInFileProvider.java:77)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.getTextRegion(DefaultLocationInFileProvider.java:56)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.getFullTextRegion(DefaultLocationInFileProvider.java:52)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.computeObjectFolding(DefaultFoldingRegionProvider.java:101)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.computeObjectFolding(DefaultFoldingRegionProvider.java:86)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.doGetFoldingRegions(DefaultFoldingRegionProvider.java:68)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider$1.exec(DefaultFoldingRegionProvider.java:60)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider$1.exec(DefaultFoldingRegionProvider.java:1)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.getFoldingRegions(DefaultFoldingRegionProvider.java:56)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.calculateProjectionAnnotationModel(DefaultFoldingStructureProvider.java:114)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.initialize(DefaultFoldingStructureProvider.java:58)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.handleProjectionEnabled(DefaultFoldingStructureProvider.java:99)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider$ProjectionChangeListener.projectionEnabled(DefaultFoldingStructureProvider.java:186)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:487)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:535)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1414)
	at org.eclipse.xtext.ui.editor.XtextEditor.installFoldingSupport(XtextEditor.java:476)
	at org.eclipse.xtext.ui.editor.XtextEditor.createPartControl(XtextEditor.java:457)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:129)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:95)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:300)
	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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:837)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:111)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:318)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:240)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:888)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:622)
...
0    [main] ERROR org.eclipse.xtext.ui.editor.CompoundXtextEditorCallback  - Was configured with another client or not configured at all.
java.lang.IllegalStateException: Was configured with another client or not configured at all.
	at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.removeDirtyStateSupport(DirtyStateEditorSupport.java:339)
	at org.eclipse.xtext.ui.editor.AbstractDirtyStateAwareEditorCallback.beforeDispose(AbstractDirtyStateAwareEditorCallback.java:38)
	at org.eclipse.xtext.ui.editor.CompoundXtextEditorCallback.beforeDispose(CompoundXtextEditorCallback.java:69)
	at org.eclipse.xtext.ui.editor.XtextEditor.dispose(XtextEditor.java:506)
	at be.kuleuven.linked.ExtLinkedXtextEditor.dispose(ExtLinkedXtextEditor.java:83)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:135)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:95)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:300)
	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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:837)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:111)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:318)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:240)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:888)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:622)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:724)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:695)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:689)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)...

Re: issue at opening files or at startup of eclipse [message #879566 is a reply to message #879561] Thu, 31 May 2012 12:53 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian Zarnekow
Messages: 2831
Registered: July 2009
Senior Member
Could you please provide the grammar and the file's content?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 31.05.12 14:42, schrieb Phil R:
> Hi,
>
> I sometimes receive the following error for one file(.mydsl). The other
> files still work normally. How can I solve this error?
>
> -Phil
>
> !ENTRY org.eclipse.e4.ui.workbench 4 0 2012-05-31 14:40:26.926
> !MESSAGE !STACK 0
> java.lang.NullPointerException
> at org.eclipse.xtext.EcoreUtil2.getContainerOfType(EcoreUtil2.java:100)
> at org.eclipse.xtext.GrammarUtil.containingAssignment(GrammarUtil.java:95)
> at
> org.eclipse.xtext.resource.DefaultLocationInFileProvider.findNodeFor(DefaultLocationInFileProvider.java:321)
>
> at
> org.eclipse.xtext.resource.DefaultLocationInFileProvider.doGetTextRegion(DefaultLocationInFileProvider.java:77)
>
> at
> org.eclipse.xtext.resource.DefaultLocationInFileProvider.getTextRegion(DefaultLocationInFileProvider.java:56)
>
> at
> org.eclipse.xtext.resource.DefaultLocationInFileProvider.getFullTextRegion(DefaultLocationInFileProvider.java:52)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.computeObjectFolding(DefaultFoldingRegionProvider.java:101)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.computeObjectFolding(DefaultFoldingRegionProvider.java:86)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.doGetFoldingRegions(DefaultFoldingRegionProvider.java:68)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider$1.exec(DefaultFoldingRegionProvider.java:60)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider$1.exec(DefaultFoldingRegionProvider.java:1)
>
> at
> org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
>
> at
> org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.getFoldingRegions(DefaultFoldingRegionProvider.java:56)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.calculateProjectionAnnotationModel(DefaultFoldingStructureProvider.java:114)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.initialize(DefaultFoldingStructureProvider.java:58)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.handleProjectionEnabled(DefaultFoldingStructureProvider.java:99)
>
> at
> org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider$ProjectionChangeListener.projectionEnabled(DefaultFoldingStructureProvider.java:186)
>
> at
> org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:487)
>
> at
> org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:535)
>
> at
> org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1414)
>
> at
> org.eclipse.xtext.ui.editor.XtextEditor.installFoldingSupport(XtextEditor.java:476)
>
> at
> org.eclipse.xtext.ui.editor.XtextEditor.createPartControl(XtextEditor.java:457)
>
> at
> org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:129)
>
> at
> org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:95)
>
> at
> org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:300)
>
> 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:837)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:111)
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:318)
>
> at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:240)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
>
> at
> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
>
> at
> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
>
> at
> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:888)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:622)
>
> ...
> 0 [main] ERROR org.eclipse.xtext.ui.editor.CompoundXtextEditorCallback -
> Was configured with another client or not configured at all.
> java.lang.IllegalStateException: Was configured with another client or
> not configured at all.
> at
> org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.removeDirtyStateSupport(DirtyStateEditorSupport.java:339)
>
> at
> org.eclipse.xtext.ui.editor.AbstractDirtyStateAwareEditorCallback.beforeDispose(AbstractDirtyStateAwareEditorCallback.java:38)
>
> at
> org.eclipse.xtext.ui.editor.CompoundXtextEditorCallback.beforeDispose(CompoundXtextEditorCallback.java:69)
>
> at org.eclipse.xtext.ui.editor.XtextEditor.dispose(XtextEditor.java:506)
> at
> be.kuleuven.linked.ExtLinkedXtextEditor.dispose(ExtLinkedXtextEditor.java:83)
>
> at
> org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:135)
>
> at
> org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:95)
>
> at
> org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:300)
>
> 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:837)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:111)
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:318)
>
> at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:240)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
>
> at
> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
>
> at
> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
>
> at
> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:888)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:622)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:724)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:695)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:689)
>
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)...
>
>
Re: issue at opening files or at startup of eclipse [message #879579 is a reply to message #879566] Thu, 31 May 2012 13:17 Go to previous messageGo to next message
Phil R is currently offline Phil R
Messages: 99
Registered: September 2011
Member
Hi,

The error comes and go so I'm not sure if it is solved now

[Updated on: Sat, 02 June 2012 07:36]

Report message to a moderator

Re: issue at opening files or at startup of eclipse [message #879582 is a reply to message #879579] Thu, 31 May 2012 13:20 Go to previous messageGo to next message
Phil R is currently offline Phil R
Messages: 99
Registered: September 2011
Member
EDIT: just got the error again. that didn't solve the problem unfortunately...

[Updated on: Sat, 02 June 2012 07:23]

Report message to a moderator

Re: issue at opening files or at startup of eclipse [message #879588 is a reply to message #879582] Thu, 31 May 2012 13:37 Go to previous messageGo to next message
Phil R is currently offline Phil R
Messages: 99
Registered: September 2011
Member
Hi,
it looks like a problem in Xtext.

sometimes this error happens instead (when I do not reopen the file but just at typing):
!ENTRY org.apache.log4j 4 0 2012-05-31 15:52:03.006
!MESSAGE org.eclipse.xtext.ui.editor.validation.MarkerIssueProcessor  - Could not create marker.

!STACK 0
java.lang.reflect.InvocationTargetException
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121)
	at org.eclipse.xtext.ui.editor.validation.MarkerIssueProcessor.processIssues(MarkerIssueProcessor.java:58)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob.run(ValidationJob.java:67)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.core.internal.resources.ResourceException: Marker id 415 not found.
	at org.eclipse.core.internal.resources.Marker.checkInfo(Marker.java:57)
	at org.eclipse.core.internal.resources.Marker.setAttribute(Marker.java:237)
	at org.eclipse.xtext.ui.editor.validation.MarkerCreator.setMarkerAttributes(MarkerCreator.java:49)
	at org.eclipse.xtext.ui.editor.validation.MarkerCreator.createMarker(MarkerCreator.java:31)
	at org.eclipse.xtext.ui.editor.validation.AddMarkersOperation.execute(AddMarkersOperation.java:106)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	... 3 more
Root exception:
org.eclipse.core.internal.resources.ResourceException: Marker id 415 not found.
	at org.eclipse.core.internal.resources.Marker.checkInfo(Marker.java:57)
	at org.eclipse.core.internal.resources.Marker.setAttribute(Marker.java:237)
	at org.eclipse.xtext.ui.editor.validation.MarkerCreator.setMarkerAttributes(MarkerCreator.java:49)
	at org.eclipse.xtext.ui.editor.validation.MarkerCreator.createMarker(MarkerCreator.java:31)
	at org.eclipse.xtext.ui.editor.validation.AddMarkersOperation.execute(AddMarkersOperation.java:106)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.xtext.ui.editor.validation.MarkerIssueProcessor.processIssues(MarkerIssueProcessor.java:58)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob.run(ValidationJob.java:67)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Regards,
Phil

[Updated on: Sat, 02 June 2012 08:12]

Report message to a moderator

Re: issue at opening files or at startup of eclipse [message #880537 is a reply to message #879588] Sat, 02 June 2012 08:10 Go to previous messageGo to next message
Phil R is currently offline Phil R
Messages: 99
Registered: September 2011
Member
I noticed that the outline refresher first throws a nullpointer exception like in this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=381159#add_comment
It is the same bug because it also only happen if the file contains syntax errors...

The error I stated in post 1 occurs if I then reopen the file with the syntax errors

I think it has nothing to do with my grammar, could someone verify if he has the same issue?

[Updated on: Sat, 02 June 2012 08:10]

Report message to a moderator

Re: issue at opening files or at startup of eclipse [message #893117 is a reply to message #880537] Mon, 02 July 2012 17:03 Go to previous messageGo to next message
Thomas Ponweiser is currently offline Thomas Ponweiser
Messages: 9
Registered: January 2012
Junior Member
I am currently observing the same problem. The stacktrace is exactly the same as above.

I have attached my grammar file. The error can for example be reproduced with a syntactically invalid input file containing the single line:

x=y)=


  • Attachment: AODsl.xtext
    (Size: 2.41KB, Downloaded 54 times)
Re: issue at opening files or at startup of eclipse [message #896869 is a reply to message #893117] Fri, 20 July 2012 08:10 Go to previous messageGo to next message
Sergio Otero is currently offline Sergio Otero
Messages: 21
Registered: June 2012
Junior Member
I have the same problem when opening files with grammar errors and the editor doesn't show up

Have you solved the problem?

java.lang.NullPointerException
	at org.eclipse.xtext.EcoreUtil2.getContainerOfType(EcoreUtil2.java:100)
	at org.eclipse.xtext.GrammarUtil.containingAssignment(GrammarUtil.java:95)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.findNodeFor(DefaultLocationInFileProvider.java:321)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.doGetTextRegion(DefaultLocationInFileProvider.java:77)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.getTextRegion(DefaultLocationInFileProvider.java:56)
	at org.eclipse.xtext.resource.DefaultLocationInFileProvider.getFullTextRegion(DefaultLocationInFileProvider.java:52)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.computeObjectFolding(DefaultFoldingRegionProvider.java:101)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.computeObjectFolding(DefaultFoldingRegionProvider.java:86)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.doGetFoldingRegions(DefaultFoldingRegionProvider.java:68)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider$1.exec(DefaultFoldingRegionProvider.java:60)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider$1.exec(DefaultFoldingRegionProvider.java:1)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider.getFoldingRegions(DefaultFoldingRegionProvider.java:56)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.calculateProjectionAnnotationModel(DefaultFoldingStructureProvider.java:114)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.initialize(DefaultFoldingStructureProvider.java:58)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider.handleProjectionEnabled(DefaultFoldingStructureProvider.java:99)
	at org.eclipse.xtext.ui.editor.folding.DefaultFoldingStructureProvider$ProjectionChangeListener.projectionEnabled(DefaultFoldingStructureProvider.java:186)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:489)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:537)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1441)
	at org.eclipse.xtext.ui.editor.XtextEditor.installFoldingSupport(XtextEditor.java:476)
	at org.eclipse.xtext.ui.editor.XtextEditor.createPartControl(XtextEditor.java:457)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:493)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:479)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
	at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:808)
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707)
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2942)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
	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.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
	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.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.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Re: issue at opening files or at startup of eclipse [message #896871 is a reply to message #896869] Fri, 20 July 2012 08:32 Go to previous messageGo to next message
Thomas Ponweiser is currently offline Thomas Ponweiser
Messages: 9
Registered: January 2012
Junior Member
No, the problem still is there. Maybe we should report a bug?
Re: issue at opening files or at startup of eclipse [message #896937 is a reply to message #896871] Fri, 20 July 2012 13:33 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian Zarnekow
Messages: 2831
Registered: July 2009
Senior Member
Am 20.07.12 10:32, schrieb Thomas Ponweiser:
> No, the problem still is there. Maybe we should report a bug?

Yes, please file a bug with a reproducable test case attached and
describe the necessary steps to get the exception.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: issue at opening files or at startup of eclipse [message #897007 is a reply to message #896937] Fri, 20 July 2012 18:37 Go to previous messageGo to next message
Sergio Otero is currently offline Sergio Otero
Messages: 21
Registered: June 2012
Junior Member
Hi

I've filed a bug trying to post the most reduced version of a grammar with the error: https://bugs.eclipse.org/bugs/show_bug.cgi?id=385636

Thanks

Sergio
Re: issue at opening files or at startup of eclipse [message #900997 is a reply to message #897007] Thu, 09 August 2012 11:20 Go to previous message
Thomas Ponweiser is currently offline Thomas Ponweiser
Messages: 9
Registered: January 2012
Junior Member
I just recieved an email notification - this bug has been fixed. Thank you!

Quote:
AntLR changes the statemachine significant when small parts of the grammar are modified. We had a AntLRWorks debugging session and looked at the different szenarios. It turned out that in some cases nodes where reduced caused by the syntaxErrors and in some cases not. We decided to introduce a NPE guard in the DefaultLocationInFileProvider. So the editor will not crash for invalid models anymore. The attached grammar is used in a testcase to make sure that we will not have this problem again.

pushed to v2.3.1


Previous Topic:How to create a new DSL that can reference objects defined in a different dsl
Next Topic:[MWE] Code Cleanup after Generation
Goto Forum:
  


Current Time: Thu Sep 18 07:47:26 GMT 2014

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

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