Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processor yield NPE under some circonstancies #320

Open
ngmip opened this issue Dec 31, 2020 · 4 comments
Open

Processor yield NPE under some circonstancies #320

ngmip opened this issue Dec 31, 2020 · 4 comments
Labels

Comments

@ngmip
Copy link

ngmip commented Dec 31, 2020

Questions

When using IntelliJ > 2020.2.4 the build fails with NPE in the CodeGenProcessor.
This sound very much like an intelliJ issue however their investigation seem to aim for a lack of robustness in some processor implementations.
Here is the ticket I filled in at IntelliJ' support : https://youtrack.jetbrains.com/issue/IDEA-258659
This other ticket may be of interest too: https://youtrack.jetbrains.com/issue/IDEA-257871

Version 3.5.3

Context

Problem ocurred while uprading from IntelliJ 2020.2.4 to 2020.3

Do you have a reproducer?

The following sample project builds againts intelliJ 2020.2.4 and not against 2020.3

Steps to reproduce

  1. clone repo
  2. build -> rebuild project

Extra

  • windows 10 pro
  • oracle jdk8u201
  • For those who are looking for a workround, in the link I provided above, they explained how to configure the -Djps.track.ap.dependencies=false flag, this worked for me.
@ngmip ngmip added the bug label Dec 31, 2020
@filiphr
Copy link

filiphr commented Dec 31, 2020

I don't know the internals of the Vert.x code generator. However, I can give my insight as a maintainer of another Annotation Processor that had same problems with IDEA 2020.3. I think that the most relevant issue is IDEA-250718. It talks about MapStruct, but the concepts are the same.

@vietj vietj added this to the 3.9.6 milestone Jan 4, 2021
@vietj vietj removed this from the 3.9.6 milestone Feb 23, 2021
@vietj
Copy link
Member

vietj commented Feb 23, 2021

Can you paste the NPE you observed in this issue ?

@ngmip
Copy link
Author

ngmip commented Feb 24, 2021

I could not find a way to get the stacktrace.
IntelliJ just yield the message :

C:_JAVA\IDEA-258659\src\main\java\com\tmgateway\message\api\proxy\IncomingMessageService.java:16:8
java: Could not generate element for com.tmgateway.message.api.proxy.IncomingMessageService: null

I tried to increase the log level of intelliJ and checked the build.log file but the exception is not visible there :-/

@cvgaviao
Copy link
Contributor

I think I found many (or all) NPE points in the GenCode. I added two commits in #325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants