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

StackOverflowError caused by non-compiling superclass recursion in source code #29

Closed
Firestar99 opened this issue Apr 28, 2021 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@Firestar99
Copy link

Firestar99 commented Apr 28, 2021

StackOverflowError occurs when typing source code and a "superclass recursion" is typed, see example below.

class Buffer extends Buffer {

}

Of course very rare to actually happen, but you may want to create an (optionally inner) class Buffer and have it extend my.project.Buffer by first typing Buffer and then autocompleting the fully qualified name, in that short moment before autocompleting the IDE complains about the Plugin crashing. It's just reporting that the plugin crashed and you experience a short lag spike but otherwise does not disrupt your work much if at all.

Thought I'd still report it even if the impact is very little :) Like your plugin!

java.lang.StackOverflowError
	at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:618)
	at com.intellij.psi.impl.source.PsiFileImpl.getGreenStubTree(PsiFileImpl.java:952)
	at com.intellij.psi.impl.source.SpineRef.getGreenStub(SpineRef.java:39)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getGreenStub(StubBasedPsiElementBase.java:352)
	at com.intellij.psi.impl.source.PsiClassImpl.isAnnotationType(PsiClassImpl.java:426)
	at com.intellij.psi.impl.PsiClassImplUtil.getExtendsListTypes(PsiClassImplUtil.java:937)
	at com.intellij.psi.impl.source.PsiClassImpl.getExtendsListTypes(PsiClassImpl.java:185)
	at com.intellij.psi.impl.PsiClassImplUtil.getSuperClass(PsiClassImplUtil.java:711)
	at com.intellij.psi.impl.source.PsiClassImpl.getSuperClass(PsiClassImpl.java:200)
	at org.jetbrains.uast.UClass$DefaultImpls.getSuperClass(UClass.kt:36)
	at org.jetbrains.uast.java.AbstractJavaUClass.getSuperClass(JavaUClass.kt:9)
	at org.jetbrains.uast.java.JavaUClass.getSuperClass(JavaUClass.kt:51)
	at org.jetbrains.uast.java.JavaUClass.getSuperClass(JavaUClass.kt:46)
	at com.github.stokito.IdeaJol.PsiClassAdapter.createClassDataFromPsiClass(PsiClassAdapter.java:19)
	at com.github.stokito.IdeaJol.PsiClassAdapter.createClassDataFromPsiClass(PsiClassAdapter.java:20)
	at com.github.stokito.IdeaJol.PsiClassAdapter.createClassDataFromPsiClass(PsiClassAdapter.java:20)
	at com.github.stokito.IdeaJol.PsiClassAdapter.createClassDataFromPsiClass(PsiClassAdapter.java:20)
	[...]
@stokito stokito added bug Something isn't working good first issue Good for newcomers labels May 8, 2021
@stokito stokito added this to the v1.5 milestone May 8, 2021
@stokito stokito closed this as completed in 99a874f Jun 6, 2021
@stokito
Copy link
Owner

stokito commented Jun 6, 2021

I fixed, please retest. The "Cyclic inheritance involving" is an error but during editing this may occur.
Thank you for the detailed bug report

@Firestar99
Copy link
Author

Bug is confirmed fixed, but found another related one: #32
With this one feel free to ignore, see description. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants