XtextReconcilerJob popup error (start > length) [message #1790057] |
Mon, 04 June 2018 06:03  |
Eclipse User |
|
|
|
Hello,
With Xtext 2.10, I sometimes get a popup error: XtextReconcilerJob start > length when I type something invalid with my language.
I tried to update to Xtext 2.14, but I still get the popup.
The problem is the error seems not related with my source code. The stack trace only mention xtext, so It is difficult for me to fix the problem.
Here is the stack trace associated:
!ENTRY org.eclipse.core.jobs 4 2 2018-06-04 11:42:52.343
!MESSAGE An internal error occurred during: "XtextReconcilerJob".
!STACK 0
java.lang.StringIndexOutOfBoundsException: start > length()
at java.lang.AbstractStringBuilder.replace(AbstractStringBuilder.java:853)
at java.lang.StringBuilder.replace(StringBuilder.java:262)
at org.eclipse.xtext.ui.editor.reconciler.ReconcilerReplaceRegion$Builder.add(ReconcilerReplaceRegion.java:89)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.getMergedReplaceRegion(XtextReconciler.java:405)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.doRun(XtextReconciler.java:434)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.access$3(XtextReconciler.java:430)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:364)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:1)
at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:37)
at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:91)
at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:433)
at org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:166)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:361)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
How to fix this problem ? Any help would be appreciated.
Best regards,
|
|
|
|
|
|
|
|
|
|
|
Re: XtextReconcilerJob popup error (start > length) [message #1790089 is a reply to message #1790088] |
Mon, 04 June 2018 11:45  |
Eclipse User |
|
|
|
Hi
I debugged it once in situ. It was 'impossible' demonstrating that a concurrency had occurred. I think it somehow needs to be instrumented by Xtext. I don't recall an Xtext exception ever being thrown because I didn't use a IUnitOfWork correctly, rather Sebastian or Jan or ... kindly pointed out the error of my ways in a bug report / forum message.
While I wouldn't particularly advocate the nannying of EMF Transaction within Papyrus that insists on an appropriate Modify Transaction before allowing mutable EMF operations, it might help if Xtext was able to assert that certain critical operations are within a correct IUnitOfWork. Perhaps a debug variant of Xtext could leverage EMF Transaction. to demonstrate that the primary Xtext functionality is as intended, and optionally allow developers to check their extensions.
Without instrumentation, this kind of concurrency bug will only be found by luck or insightful review.
Regards
Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.52779 seconds