Bug 512271

Summary: SourceTypeBinding.java:2202 -- NullPointerException during weaving
Product: [Tools] AspectJ Reporter: Andreas Eternach <andreas.eternach>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: aclement, andreas.hoehmann
Version: 1.8.10   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
line 2202 none

Description Andreas Eternach CLA 2017-02-16 04:37:00 EST
Version: 1.8.10.201612122115

I get an error dialog with title "AspecJ Internal Compiler Error"

It contains following exception:

java.lang.NullPointerException
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.evaluateNullAnnotations(SourceTypeBinding.java:2202)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:710)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getAnnotationTagBits(SourceTypeBinding.java:1082)
at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAda ... oBuildJob.run(AutoBuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Compile error: NullPointerException thrown: null
Comment 1 Andreas Höhmann CLA 2017-10-30 12:48:42 EDT
I can confirm the same effect. Is there any progress here? Maybe there is a way to see the name of the "invalid" java file??
Comment 2 Andreas Höhmann CLA 2017-10-30 14:32:11 EDT
Created attachment 271248 [details]
line 2202

Could it be that an invalid package.info is the source of the error?
Comment 3 Andrew Clement CLA 2017-10-30 14:47:28 EDT
Very tough to progress this kind of thing when you can't recreate it. If someone has a small sample (or even a pointer to a large github sample) that exhibits the problem, they can be much easier to sort out. 

Try the AspectJ 1.9.0.RC1 build - does that have the same problem or offer different diagnostics?  Tried 1.8.12 release?
Comment 4 Andreas Höhmann CLA 2019-03-09 04:01:40 EST
With the my current version

org.aspectj: 1.9.2.201902200030
org.eclipse.ajdt: 2.2.4.201902200030

the exception-line moved a little bit :)


java.lang.NullPointerException
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.evaluateNullAnnotations(SourceTypeBinding.java:2287)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:730)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getAnnotationTagBits(SourceTypeBinding.java:1101)
at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAda ... oBuildJob.run(AutoBuildJob.java:244)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Compile error: NullPointerException thrown: null
Comment 5 Andreas Höhmann CLA 2019-03-09 04:04:19 EST
@Andrew ... as in the other issue (https://bugs.eclipse.org/bugs/show_bug.cgi?id=532480 -  org.aspectj.weaver.BCException) which I reported ... I believe it has something todo with eclipse-jdt-null-analysis.