oracle / javavscode

Java platform support for Visual Studio Code for full featured Java development (edit-compile-debug & test cycle)
Apache License 2.0
205 stars 14 forks source link

NullPointerException: Cannot invoke "com.sun.tools.javac.code.Symbol$MethodSymbol.flags()" because "rc.accessor" is null #52

Closed anthonyvdotbe closed 5 months ago

anthonyvdotbe commented 7 months ago
java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Symbol$MethodSymbol.flags()" because "rc.accessor" is null
    at com.sun.tools.javac.comp.Lower.lambda$generateMandatedAccessors$5(Lower.java:2390)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178)
    at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
    at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
    at com.sun.tools.javac.comp.Lower.generateMandatedAccessors(Lower.java:2397)
    at com.sun.tools.javac.comp.Lower.visitRecordDef(Lower.java:2594)
    at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:2289)
    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:814)
    at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.java:2181)
    at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:2323)
    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:814)
    at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.java:2181)
    at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:2323)
    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:814)
    at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.java:2181)
    at com.sun.tools.javac.comp.Lower.translate(Lower.java:2200)
    at com.sun.tools.javac.comp.Lower.translateTopLevelClass(Lower.java:4293)
    at com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1630)
    at org.netbeans.lib.nbjavac.services.NBJavaCompiler.desugar(NBJavaCompiler.java:89)
    at com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1444)
    at com.sun.tools.javac.api.JavacTaskImpl$2.process(JavacTaskImpl.java:475)
    at com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:519)
    at com.sun.tools.javac.api.JavacTaskImpl.generate(JavacTaskImpl.java:478)
    at org.netbeans.modules.java.source.indexing.VanillaCompileWorker$2.run(VanillaCompileWorker.java:369)
    at org.netbeans.modules.java.source.parsing.FileManagerTransaction.runConcurrent(FileManagerTransaction.java:180)
[catch] at org.netbeans.modules.java.source.indexing.VanillaCompileWorker.compile(VanillaCompileWorker.java:356)
    at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:360)
    at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:138)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:274)
    at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:136)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2749)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.lambda$index$0(RepositoryUpdater.java:2626)
    at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2625)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.lambda$scanFiles$2(RepositoryUpdater.java:3332)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.lambda$runInContext$4(RepositoryUpdater.java:2119)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:288)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2117)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2098)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1400(RepositoryUpdater.java:135)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:3290)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:3832)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3452)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6197)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$3400(RepositoryUpdater.java:5855)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.lambda$call$0(RepositoryUpdater.java:6116)
    at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
    at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6116)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6112)
    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.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6112)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1420)
    at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2035)
    at org.openide.util.RequestProcesjava.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Symbol$MethodSymbol.flags()" because "rc.accessor" is null
    at com.sun.tools.javac.comp.Lower.lambda$generateMandatedAccessors$5(Lower.java:2390)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178)
    at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
    at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
    at com.sun.tools.javac.comp.Lower.generateMandatedAccessors(Lower.java:2397)
    at com.sun.tools.javac.comp.Lower.visitRecordDef(Lower.java:2594)
    at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:2289)
    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:814)
    at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.java:2181)
    at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:2323)
    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:814)
    at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.java:2181)
    at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:2323)
    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:814)
    at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.java:2181)
    at com.sun.tools.javac.comp.Lower.translate(Lower.java:2200)
    at com.sun.tools.javac.comp.Lower.translateTopLevelClass(Lower.java:4293)
    at com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1630)
    at org.netbeans.lib.nbjavac.services.NBJavaCompiler.desugar(NBJavaCompiler.java:89)
    at com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1444)
    at com.sun.tools.javac.api.JavacTaskImpl$2.process(JavacTaskImpl.java:475)
    at com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:519)
    at com.sun.tools.javac.api.JavacTaskImpl.generate(JavacTaskImpl.java:478)
    at org.netbeans.modules.java.source.indexing.VanillaCompileWorker$2.run(VanillaCompileWorker.java:369)
    at org.netbeans.modules.java.source.parsing.FileManagerTransaction.runConcurrent(FileManagerTransaction.java:180)
[catch] at org.netbeans.modules.java.source.indexing.VanillaCompileWorker.compile(VanillaCompileWorker.java:356)
    at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:360)
    at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:138)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:274)
    at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:136)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2749)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.lambda$index$0(RepositoryUpdater.java:2626)
    at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2625)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.lambda$scanFiles$2(RepositoryUpdater.java:3332)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.lambda$runInContext$4(RepositoryUpdater.java:2119)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:288)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2117)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2098)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1400(RepositoryUpdater.java:135)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:3290)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:3832)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3452)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6197)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$3400(RepositoryUpdater.java:5855)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.lambda$call$0(RepositoryUpdater.java:6116)
    at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
    at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6116)
    at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6112)
    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.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6112)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
lahodaj commented 7 months ago

FYI: https://github.com/apache/netbeans/pull/6649

Achal1607 commented 5 months ago

Solved and merged PR