-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
StackOverflowError using Javac with DbSetup DataSet #1118
Comments
Externalizing the stack would be the proper solution. |
I have the same problem with classes generated from latest openapi generator OpenAPITools/openapi-generator#12595 |
Hello. I don’t know if it is the good place or not. Do you have any idea how to resolve it ? Or Is there some work in Lombok to resolve this issue ? |
How is going this issue ? Do you have any progress ? |
Have you tried increasing stack size ( |
I did several tests by increasing -Xss until -Xss12m. No changes. |
That's why I recommended replicating issue with maven where you can control java opts and lombok version. |
|
I have the same issue. Did you ever find a solution? Works fine building on OSX but fails on linux in github. Update: This seemed to get it working- |
The main reason for this issue is the file being too large, which causes a stack out of memory error during parsing. Until the bug is fixed, the core solutions are: 1、 split the excessively large file parsed using lombok. |
Is there by chance a way to exclude target/generated-sources from being scanned by lombok? I use the maven-compiler-plugin with annotationProcessorPaths to run lombok. In my scenerio, the stack overflow error is when lombok parses the large files generated by openapi-generator-maven-plugin. These don't use lombok so i'd like to exclude them to prevent having to set the MVN xss size everywhere. Thanks. |
@mikebm I have same problem and finally fixed the generator: |
@janisz I am already on 6.0.0 of the generator, so the fix didn't appear to solve it. |
It's in 6.0.1 https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.0.1 but it was only for okhttp if you sue different backend then it might not work. |
Yeah. Tried 6.6.0 and it didn't work for me. Thanks though. I think my question still stands. I don't need lombok processing my target folder, so if i can figure out how to do that, it would resolve my issue. |
Agree, this will save some time as there is probably no point in scanning generated code. |
Hello,
The error does not specify which file it is failing at. |
You can use #3213 to narrow down the error. |
For me, by using x64 version of the JDK resolve the StackOverflowError error. I'm using JDK 11. |
We could verfiy this too today. Breaking the long chained call down fixed the problem. But it took some time. |
Seeing the same issue. We're working with netflix DGS Framework and query building requires a very large number of chained operations.
|
I use DbSetup to define dataset for tests.
When trying to compile the project test classes (mvn clean test-compile), it crash with a StackOverflowError.
Increasing the JVM stack size using
-Xss4m
fix the issue, but it seems like a workaround to me and maybe Lombok could be enhanced to avoid this ?Here's an example of DbSetup classes that cause crash. As you can see, there's long fluent calls to define data, it's probably the huge call hierarchy that makes JavacAST eating up the stack ...
PS: I use Java 8 on Ubuntu, same issue on Windows.
The text was updated successfully, but these errors were encountered: