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

org.netbeans.modules.parsing.spi.ParseException when invoking code-complete

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Description

      I invoked code-complete in the editor and the following exception was thrown:

      com.sun.tools.javac.comp.Infer$InferenceException
      	at com.sun.tools.javac.comp.Infer.<init>(Infer.java:115)
      	at com.sun.tools.javac.comp.Infer.instance(Infer.java:102)
      	at com.sun.tools.javac.comp.DeferredAttr.<init>(DeferredAttr.java:114)
      	at com.sun.tools.javac.comp.DeferredAttr.instance(DeferredAttr.java:103)
      	at com.sun.tools.javac.comp.Resolve.<init>(Resolve.java:123)
      	at org.netbeans.lib.nbjavac.services.NBResolve.<init>(NBResolve.java:50)
      	at org.netbeans.lib.nbjavac.services.NBResolve$1.make(NBResolve.java:44)
      	at org.netbeans.lib.nbjavac.services.NBResolve$1.make(NBResolve.java:42)
      	at com.sun.tools.javac.util.Context.get(Context.java:150)
      	at com.sun.tools.javac.comp.Resolve.instance(Resolve.java:158)
      	at com.sun.tools.javac.comp.Check.<init>(Check.java:117)
      	at com.sun.tools.javac.comp.Check.instance(Check.java:105)
      	at com.sun.tools.javac.comp.Modules.<init>(Modules.java:185)
      	at com.sun.tools.javac.comp.Modules.instance(Modules.java:175)
      	at com.sun.tools.javac.code.Symtab.<init>(Symtab.java:484)
      	at com.sun.tools.javac.code.Symtab.instance(Symtab.java:88)
      	at com.sun.tools.javac.comp.Attr.<init>(Attr.java:127)
      	at org.netbeans.lib.nbjavac.services.NBAttr.<init>(NBAttr.java:50)
      	at org.netbeans.lib.nbjavac.services.NBAttr$1.make(NBAttr.java:42)
      	at org.netbeans.lib.nbjavac.services.NBAttr$1.make(NBAttr.java:40)
      	at com.sun.tools.javac.util.Context.get(Context.java:150)
      	at com.sun.tools.javac.comp.Attr.instance(Attr.java:116)
      	at com.sun.tools.javac.comp.Annotate.<init>(Annotate.java:102)
      	at com.sun.tools.javac.comp.Annotate.instance(Annotate.java:77)
      	at com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:234)
      	at org.netbeans.lib.nbjavac.services.NBClassReader.<init>(NBClassReader.java:50)
      	at org.netbeans.lib.nbjavac.services.NBClassReader$1.make(NBClassReader.java:41)
      	at org.netbeans.lib.nbjavac.services.NBClassReader$1.make(NBClassReader.java:39)
      	at com.sun.tools.javac.util.Context.get(Context.java:150)
      	at com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:225)
      	at com.sun.tools.javac.code.ClassFinder.<init>(ClassFinder.java:186)
      	at com.sun.tools.javadoc.main.JavadocClassFinder.<init>(JavadocClassFinder.java:71)
      	at com.sun.tools.javadoc.main.JavadocClassFinder.lambda$preRegister$0(JavadocClassFinder.java:60)
      	at com.sun.tools.javac.util.Context.get(Context.java:150)
      	at com.sun.tools.javac.code.ClassFinder.instance(ClassFinder.java:177)
      	at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:393)
      	at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:114)
      	at com.sun.tools.javac.api.JavacTaskImpl.prepareCompiler(JavacTaskImpl.java:207)
      	at com.sun.tools.javac.api.JavacTaskImpl.parse(JavacTaskImpl.java:247)
      	at org.netbeans.modules.java.source.nbjavac.parsing.SequentialParsingImpl.parse(SequentialParsingImpl.java:38)
      	at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:580)
      	at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:361)
      	at org.netbeans.api.java.source.CompilationController.toPhase(CompilationController.java:84)
      	at org.netbeans.modules.java.completion.BaseTask.getCompletionEnvironment(BaseTask.java:215)
      	at org.netbeans.modules.java.completion.JavaCompletionTask.resolve(JavaCompletionTask.java:265)
      	at org.netbeans.modules.java.completion.BaseTask.run(BaseTask.java:93)
      	at org.netbeans.modules.java.completion.JavaCompletionTask.run(JavaCompletionTask.java:58)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
      	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
      	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
      	at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
      	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
      Caused: org.netbeans.modules.parsing.spi.ParseException
      	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:186)
      	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
      [catch] at org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.query(JavaCompletionProvider.java:193)
      	at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:198)
      	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)
      

      I don't have specific a minimum testcase but the error occurs 100% of the time if the editor contains "bad code". I can't share my "bad code" because it is part of a very big application.

        Attachments

        1. Sample-NETBEANS-486.zip
          16 kB
          Dell Green
        2. IllegalArgumentException.txt
          7 kB
          Jiří Kovalský

          Issue Links

            Activity

              People

              • Assignee:
                rtaneja Reema Taneja
                Reporter:
                cowwoc Gili
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: