Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5705

Java editor uses obsolete lexer token sequence

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 12.3
    • None
    • java - Editor
    • None

    Description

      This has happened a few times whilst editing some Java 8 code, but I've not managed to pin down exactly which step/syntax it is that's causing it:

      java.util.ConcurrentModificationException: Caller uses obsolete token sequence which is no longer valid. Underlying token hierarchy has been modified by insertion or removal or a custom language embedding was created.TS.modCount=600, tokenList.modCount()=613, rootModCount=613
      Please report a bug against a module that calls lexer's code e.g. java, php etc. but not the lexer module itself.
      	at org.netbeans.api.lexer.TokenSequence.checkValid(TokenSequence.java:784)
      	at org.netbeans.api.lexer.TokenSequence.moveIndex(TokenSequence.java:568)
      	at org.netbeans.modules.java.editor.base.semantic.TokenList.resetToIndex(TokenList.java:372)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitExpressionStatement(SemanticHighlighterBase.java:762)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitExpressionStatement(SemanticHighlighterBase.java:280)
      	at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1555)
      	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1022)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:280)
      	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
      	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
      	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
      	at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:250)
      	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1074)
      	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1022)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitMethod(SemanticHighlighterBase.java:836)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitMethod(SemanticHighlighterBase.java:280)
      	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:940)
      	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1022)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:280)
      	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
      	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
      	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitClass(SemanticHighlighterBase.java:944)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitClass(SemanticHighlighterBase.java:280)
      	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:846)
      	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1022)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:280)
      	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
      	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitCompilationUnit(SemanticHighlighterBase.java:561)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitCompilationUnit(SemanticHighlighterBase.java:280)
      	at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:605)
      	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1022)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase.process(SemanticHighlighterBase.java:156)
      	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:56)
      	at org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase.run(SemanticHighlighterBase.java:112)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
      [catch] at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
      	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
      	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            gregorywilliams_pgs Gregory Williams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: