StackOverflowError: null in Android Studio on Project Structure

Viewed 693

Ever since I updated to Android Studio 2.3, there is an IDE error in some cases: for example when I click File->Project Structure, try to open any layout XML, or even click any point in the code of any build.gradle file (these at least open without exceptions). The error says StackOverflowError: null, and the stack trace is the same in all cases:

null
java.lang.StackOverflowError
    at java.util.regex.Pattern.sequence(Pattern.java:2079)
    at java.util.regex.Pattern.expr(Pattern.java:1996)
    at java.util.regex.Pattern.compile(Pattern.java:1696)
    at java.util.regex.Pattern.<init>(Pattern.java:1351)
    at java.util.regex.Pattern.compile(Pattern.java:1028)
    at java.lang.String.replaceAll(String.java:2223)
    at com.android.tools.idea.gradle.dsl.parser.settings.ProjectPropertiesDslElement.getStandardProjectKey(ProjectPropertiesDslElement.java:52)
    at com.android.tools.idea.gradle.dsl.parser.elements.GradleDslExpression.resolveProjectReference(GradleDslExpression.java:191)
    at com.android.tools.idea.gradle.dsl.parser.elements.GradleDslExpression.resolveReference(GradleDslExpression.java:92)
    at com.android.tools.idea.gradle.dsl.parser.elements.GradleDslReference.getValue(GradleDslReference.java:66)
    at com.android.tools.idea.gradle.dsl.parser.elements.GradleDslExpression.resolveReference(GradleDslExpression.java:152)
    at com.android.tools.idea.gradle.dsl.parser.elements.GradleDslReference.getValue(GradleDslReference.java:66)
    at com.android.tools.idea.gradle.dsl.parser.elements.GradleDslExpression.resolveReference(GradleDslExpression.java:152)

... and the last 2 lines repeat forever.

What can I do to find the source of this problem?

It looks like there's a circular reference somewhere in my build configs, or the internals of Studio? But I can't find any by hand. It would be helpful if I at least knew what's the pattern or the reference mentioned in the stack trace.

Things I already tried:

  • invalidate cache & restart
  • delete .idea/ and other temporary folders in project directory
  • check out the project to a new location
  • in settings->build->gradle->experimental enable the "new Project Structure dialog" -- then the dialog works, but the same error still occurs upon closing it, and other cases still don't work

I'm using Android Studio 2.3.3 with all the plugins and android libs updated, gradle 3.3 and gradle plugin 2.3.1; all that on an up-to-date gentoo linux.

1 Answers
Related