You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "homberghp (via GitHub)" <gi...@apache.org> on 2025/06/23 14:14:53 UTC

[I] NPE triggered by Compilation job [netbeans]

homberghp opened a new issue, #8616:
URL: https://github.com/apache/netbeans/issues/8616

   ### Apache NetBeans version
   
   Apache NetBeans 26
   
   ### What happened
   
   Playing with a reporters example I happened to trigger an NPE. 
   I will add the source code as zip file and see if I can reproduce the sequence of events.
   
   For now, here is the stack trace:
   
   ```shell
   Annotation: An error occurred during parsing of '/home/hom/NetBeansProjects/orderexport/src/main/java/com/mycompany/orderexport/MMOrderExport.java'. Please report a bug against java/source and attach dump file '/home/hom/.netbeans/26/var/log/MMOrderExport.dump'.
   Annotation: An error occurred during parsing of '/home/hom/NetBeansProjects/orderexport/src/main/java/com/mycompany/orderexport/MMOrderExport.java'. Please report a bug against java/source and attach dump file '/home/hom/.netbeans/26/var/log/MMOrderExport.dump'.
   Annotation: An error occurred during parsing of '/home/hom/NetBeansProjects/orderexport/src/main/java/com/mycompany/orderexport/MMOrderExport.java'. Please report a bug against java/source and attach dump file '/home/hom/.netbeans/26/var/log/MMOrderExport.dump'.
   An error occurred during parsing of '/home/hom/NetBeansProjects/orderexport/src/main/java/com/mycompany/orderexport/MMOrderExport.java'. Please report a bug against java/source and attach dump file '/home/hom/.netbeans/26/var/log/MMOrderExport.dump'.
   An error occurred during parsing of '/home/hom/NetBeansProjects/orderexport/src/main/java/com/mycompany/orderexport/MMOrderExport.java'. Please report a bug against java/source and attach dump file '/home/hom/.netbeans/26/var/log/MMOrderExport.dump'.
   Caused: java.lang.NullPointerException: Cannot read field "info" because "lintEnv" is null
   	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5389)
   	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5365)
   	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5365)
   	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5365)
   	at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5344)
   	at org.netbeans.lib.nbjavac.services.NBAttr.attribClass(NBAttr.java:74)
   	at com.sun.tools.javac.comp.Attr.attrib(Attr.java:5281)
   	at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1356)
   	at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1329)
   	at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:404)
   	at com.sun.tools.javac.api.JavacTaskImpl.lambda$analyze$1(JavacTaskImpl.java:379)
   	at com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
   	at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:379)
   Caused: java.lang.IllegalStateException
   	at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:383)
   	at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:765)
   	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:536)
   	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:140)
   	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
   	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:241)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
   	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:288)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
   [catch] at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
   	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:1403)
   	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:2018)
   
   ```
   
   ### Language / Project Type / NetBeans Component
   
   java, module java.base 
   
   ### How to reproduce
   
   I am working on that. 
   But from my head: implement a private field with getters and setter in the top most class in the example zit file.
   
   [orderexport.zip](https://github.com/user-attachments/files/20866905/orderexport.zip)
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   ubuntu 24.04 
   
   ### JDK
   
   21
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   I am not sure if I can create a fail-safe scenario.
   
   
   ### Are you willing to submit a pull request?
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NPE triggered by Compilation job [netbeans]

Posted by "homberghp (via GitHub)" <gi...@apache.org>.
homberghp commented on issue #8616:
URL: https://github.com/apache/netbeans/issues/8616#issuecomment-2996709091

   Forgot to add the dump file.
   [MMOrderExport.dump.txt](https://github.com/user-attachments/files/20867071/MMOrderExport.dump.txt)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists