Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367071

Summary: [editor] ArrayIndexOutOfBounds on delete line in Xtext grammar
Product: [Modeling] TMF Reporter: Sven Efftinge <sven.efftinge>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, karsten.thoms, remy.suen, sebastian.zarnekow
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Sven Efftinge CLA 2011-12-19 08:21:42 EST
Got this during line deletion in a grammar. Couldn't reproduce it.

java.lang.ArrayIndexOutOfBoundsException
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:516)
	at java.lang.StringBuffer.append(StringBuffer.java:306)
	at org.eclipse.jface.text.GapTextStore.get(GapTextStore.java:164)
	at org.eclipse.jface.text.CopyOnWriteTextStore.get(CopyOnWriteTextStore.java:139)
	at org.eclipse.jface.text.AbstractDocument.get(AbstractDocument.java:1029)
	at org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource.copyState(DocumentBasedDirtyResource.java:94)
	at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.modelChanged(DirtyStateEditorSupport.java:396)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.notifyModelListeners(XtextDocument.java:118)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.afterModify(XtextDocument.java:172)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.afterModify(XtextDocument.java:1)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.modify(AbstractReadWriteAcces.java:50)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:181)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:90)
	at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:33)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:239)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Sebastian Zarnekow CLA 2011-12-19 08:33:06 EST
Moving to JFace text since we just call Document.get() without any additional args.
Comment 2 Sebastian Zarnekow CLA 2011-12-19 11:45:00 EST
Dani,

could you please elaborate why you think this is an Xtext problem? Is IDocument.get() supposed to throw an AIOOBE in any case?
Comment 3 Remy Suen CLA 2011-12-19 11:46:51 EST
(In reply to comment #2)
> Dani,
> 
> could you please elaborate why you think this is an Xtext problem? Is
> IDocument.get() supposed to throw an AIOOBE in any case?

Dani's not on this bug.
Comment 4 Dani Megert CLA 2011-12-19 11:53:33 EST
(In reply to comment #2)
> Dani,
> 
> could you please elaborate why you think this is an Xtext problem? Is
> IDocument.get() supposed to throw an AIOOBE in any case?

We've not seen this before in any other editors and there are no steps to reproduce and investigate this. Feel free to move back if you can reproduce in the Text Editor or if you have more details.
Comment 5 Karsten Thoms CLA 2016-08-15 09:28:52 EDT
Open for 5 years now without reproduceability. I think we can close it for now and reopen when it happens again.