NPE during serializing [message #890410] |
Fri, 22 June 2012 08:52 |
Tobias Böhm Messages: 21 Registered: January 2012 |
Junior Member |
|
|
Good day,
I have a plugin that containes 3 Xtext grammars and lets the user enter text in an EmbeddedEditor. The problem that occures on some machines now, is that for two of the three grammars, serialization of the entered text will result in a NullPointerException.
The stacktrace is the following:
!ENTRY org.eclipselabs.recommenders.codesearch.rcp 4 0 2012-06-22 09:44:31.831
!MESSAGE Error while searching. Query was: * * (java.lang.String, java.util.List)
!STACK 0
java.lang.NullPointerException
at org.eclipse.xtext.ui.editor.formatting.PreferenceStoreWhitespaceInformationProvider.getLineSeparatorPreference(PreferenceStoreWhitespaceInformationProvider.java:56)
at org.eclipse.xtext.ui.editor.formatting.PreferenceStoreWhitespaceInformationProvider.getLineSeparatorInformation(PreferenceStoreWhitespaceInformationProvider.java:46)
at org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter.getLineSeparatorInfo(AbstractDeclarativeFormatter.java:114)
at org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter.createFormattingConfig(AbstractDeclarativeFormatter.java:81)
at org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter.getConfig(AbstractDeclarativeFormatter.java:92)
at org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter.createFormatterStream(AbstractDeclarativeFormatter.java:75)
at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:103)
at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:122)
at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:51)
at org.eclipse.recommenders.codesearch.rcp.searcher.AbstractQLSearcher.serializeLuceneQuery(AbstractQLSearcher.java:40)
at org.eclipse.recommenders.codesearch.rcp.searcher.MethodPatternQLSearcher.search(MethodPatternQLSearcher.java:50)
at org.eclipse.recommenders.internal.codesearch.rcp.views.MethodPatternQLEditorWrapper.search(MethodPatternQLEditorWrapper.java:95)
at org.eclipse.recommenders.internal.codesearch.rcp.views.SearchQueryView$8.runInWorkspace(SearchQueryView.java:390)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The weird thing is that it doesn't happen on every machine so I guess, but please correct me if I'm wrong, the problem is dependant on the installed Xtext version but it's the exact same update site that my plug-in is installed from that is what confuses me.
I found this bug: bugs.eclipse.org/bugs/show_bug.cgi?id=380406 and it contains the same stacktrace and says that the problem might be grammars that have multiple entry points. The first, always working grammar, is an expression syntax which I guess has multiple entry points but again, this is the one working 100% of the time. The other two, non working, grammars have multiple entry points too. If that would solve the problem, is there a way I can define a rule as the sole entry point for a grammar?
Are there any other things I could check?
Thanks in advance,
Tobias
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02095 seconds