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

Stackoverflow in CoreASTProvider #1977

Open
robstryker opened this issue Jan 24, 2025 · 1 comment
Open

Stackoverflow in CoreASTProvider #1977

robstryker opened this issue Jan 24, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@robstryker
Copy link
Contributor

This is likely because I had a breakpoint set somewhere. Even still, it would seem like there should be some checks on this recursive loop somewhere, and a better or more checked exception should somehow be thrown here.

!ENTRY org.eclipse.core.jobs 4 2 2024-02-21 11:54:17.989
!MESSAGE An internal error occurred during: "Requesting Java AST from selection".
!STACK 0
java.lang.StackOverflowError
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:132)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:189)

@jukzi
Copy link
Contributor

jukzi commented Jan 27, 2025

That recursive call looks like the method arguments are not changed at all so the recursion works as a (waiting) loop and could be refactored to such.

@jukzi jukzi added the bug Something isn't working label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants