[furcas-discussion] [IMP] Incremental Lexer Crashes

Stephan Erb stephan at dev.static-void.de
Fri Feb 11 14:37:08 CET 2011


For the record: It's fixed in https://github.com/FURCAS-dev/FURCAS/commit/397d33c6ccc9b020041ed68fab741380cdd61a78

On Sat, 2011-02-05 at 15:58 +0100, Stephan Erb wrote:
> Hey Thomas,
> 
> the IMP branch contains the first partially working IMP editor (see
> [1]). Unfortunately the incremental lexer is crashing regularly and I am
> unable to find the cause.
> 
> The lexer dies with: 
> 
> java.lang.ArrayIndexOutOfBoundsException
> 	at java.lang.System.arraycopy(Native Method)
> 	at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:446)
> 	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUnique(NotifyingListImpl.java:393)
> 	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:377)
> 	at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:345)
> 	at com.sap.ide.cts.parser.incremental.IncrementalLexer.addTokenIfNecessaryAndUpdateOffetsAndLengths(IncrementalLexer.java:675)
> 	at com.sap.ide.cts.parser.incremental.IncrementalLexer.lexPhase(IncrementalLexer.java:528)
> 	at com.sap.ide.cts.parser.incremental.IncrementalLexer.lex(IncrementalLexer.java:160)
> 	at com.sap.ide.cts.parser.incremental.antlr.ANTLRIncrementalLexerAdapter.lex(ANTLRIncrementalLexerAdapter.java:301)
> 	at com.sap.furcas.ide.editor.imp.services.FurcasParseController.parse(FurcasParseController.java:138)
> 	at com.sap.furcas.ide.editor.commands.ParseCommand.execute(ParseCommand.java:30)
> 
> At lines 518 and 519 within the IncrementalLexer we seem to have
> inconsistently versioned TextBlocks: We have a token and its parent
> block within the previous version. Now we map both to the current
> version. However, during this process, the parent child relation seems
> to get lost. The block does no longer contain the token. 
> 
> Given your experience with all this TextBlocks versioning, any idea
> where I should start digging? 
> 
> Thanks!
> Stephan
> 
> PS: If you want to try it yourself you have to install IMP from
> http://download.eclipse.org/technology/imp/updates/
> 
> 
> [1]
> https://github.com/FURCAS-dev/FURCAS/blob/imp/DSLEngineering/com.sap.furcas.ide.editor/src/com/sap/furcas/ide/editor/imp/
> 
> _______________________________________________
> Furcas-discussion mailing list
> Furcas-discussion at lists.furcas.org
> http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion




More information about the Furcas-discussion mailing list