[
https://issues.apache.org/jira/browse/MCOMPILER-394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17543015#comment-17543015
]
Thorbjørn Ravn Andersen edited comment on MCOMPILER-394 at 5/27/22 5:08 PM:
----------------------------------------------------------------------------
[~loeti] I have now created a small project with your class at
[https://github.com/ravn/MCOMPILER-394,] which fails to compile for me both
from within IntelliJ and from the MacOS command line.
The error message for me is as follows. Is it the same you see?
{{[INFO] Compiling 2 source files to
/Users/ravn/git/MCOMPILER-394/target/classes}}
{{An exception has occurred in the compiler (17.0.1). Please file a bug against
the Java compiler via the Java bug reporting page
([http://bugreport.java.com|http://bugreport.java.com/]) after checking the Bug
Database ([http://bugs.java.com|http://bugs.java.com/]) for duplicates. Include
your program, the following diagnostic, and the parameters passed to the Java
compiler in your report. Thank you.}}
{{java.lang.StackOverflowError}}
{{ at
jdk.compiler/com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:3970)}}
{{ at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2156)}}
{{ at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:674)}}
{{ at jdk.compiler/com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:727)}}
{{ at
jdk.compiler/com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:3970)}}
{{ at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2156)}}
was (Author: ravn):
[~loeti] I have now created a small project with your class at
[https://github.com/ravn/MCOMPILER-394,] which fails to compile for me both
from within IntelliJ and from the MacOS command line.
The error message for me is as follows. Is it the same you see?
```
[INFO] Compiling 2 source files to /Users/ravn/git/MCOMPILER-394/target/classes
An exception has occurred in the compiler (17.0.1). Please file a bug against
the Java compiler via the Java bug reporting page (http://bugreport.java.com)
after checking the Bug Database (http://bugs.java.com) for duplicates. Include
your program, the following diagnostic, and the parameters passed to the Java
compiler in your report. Thank you.
java.lang.StackOverflowError
at jdk.compiler/com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:3970)
at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2156)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:674)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:727)
at jdk.compiler/com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:3970)
at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2156)
```
> Stackoverflow while compiling Java Sources, but works after renaming project
> directory
> --------------------------------------------------------------------------------------
>
> Key: MCOMPILER-394
> URL: https://issues.apache.org/jira/browse/MCOMPILER-394
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Affects Versions: 3.1
> Environment: The problem occurs with Windows 10, Windows 7 and also
> with Ubuntu.
> Reporter: Markus Bader
> Priority: Major
> Attachments: MCompiler394.java, build.log
>
>
> Me and one of my colleagues have following problem (others do not): We want
> to build a maven project, but "mvn clean install" ends up in a stackoverflow
> error. But after renaming the project directory, it works. Also after
> renaming the name of the parent directory and leaving the name of the project
> directory by its original value, compilation is possible.
> I also tried changing the artifactId so that it doesn't match the folder
> name. Result: stackoverflow.
> To make it more strange: I tried to reduce the used Java classes for possibly
> identifying a class to be responsible for this phenomenon. Therefor I deleted
> a class named "MathParser" and after that compilation was possible. So I
> analysed the content of the class and found out, that the stackoverflow error
> occurs even if the class ist nearly empty. With following content I can
> reproduce the error:
>
> {code:java}
> package some.anonymised.package;
> public class MathParser {
> private void doSomething(String func) throws Exception {
> throw new Exception ("function '" + func + "' is not defined");
> }
> } {code}
> With an empty method body, the build works fine.
> I attached the log created with debug option activated (with reduced number
> of classes and reduced content of MathParser). For anonymisation purposes I
> replaced the name of some directories, packages etc. by "xxxxx".
--
This message was sent by Atlassian Jira
(v8.20.7#820007)