Bug 512271 - SourceTypeBinding.java:2202 -- NullPointerException during weaving
Summary: SourceTypeBinding.java:2202 -- NullPointerException during weaving
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.8.10   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-16 04:37 EST by Andreas Eternach CLA
Modified: 2019-03-09 04:04 EST (History)
2 users (show)

See Also:


Attachments
line 2202 (19.05 KB, image/png)
2017-10-30 14:32 EDT, Andreas Höhmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.