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 #17

Open
schaarda opened this issue Nov 16, 2021 · 8 comments
Open

StackOverflowError #17

schaarda opened this issue Nov 16, 2021 · 8 comments

Comments

@schaarda
Copy link
Collaborator

I was hoping this fork would allow me to work with Kotlin in Eclipse, but whenever I open a .kts-File (Kotlin Script Editor) Eclipse hangs for a while and then gives me this error:

java.lang.StackOverflowError at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:380) at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:489) at org.jetbrains.kotlin.storage.StorageKt.getValue(storage.kt:42) at org.jetbrains.kotlin.descriptors.impl.LazyPackageViewDescriptorImpl.getFragments(LazyPackageViewDescriptorImpl.kt) at org.jetbrains.kotlin.core.resolve.BuiltInsReferenceResolver.initialize(BuiltInsReferenceResolver.java:119) at org.jetbrains.kotlin.core.resolve.BuiltInsReferenceResolver.<init>(BuiltInsReferenceResolver.java:78) at org.jetbrains.kotlin.core.model.KotlinCommonEnvironment.<init>(KotlinCommonEnvironment.kt:152) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment.<init>(KotlinEnvironment.kt:118) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment.<init>(KotlinEnvironment.kt:114) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment$Companion$getEnvironment$1.invoke(KotlinEnvironment.kt:174) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment$Companion$getEnvironment$1.invoke(KotlinEnvironment.kt:163) at org.jetbrains.kotlin.core.model.CachedEnvironment.getOrCreateEnvironment(CachedEnvironment.kt:37) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment$Companion.getEnvironment(KotlinEnvironment.kt:173) at org.jetbrains.kotlin.core.model.KotlinEnvironmentKt.getEnvironment(KotlinEnvironment.kt:90) at org.jetbrains.kotlin.core.builder.KotlinPsiManager.parseText(KotlinPsiManager.kt:366) at org.jetbrains.kotlin.core.builder.KotlinPsiManager.parseFile(KotlinPsiManager.kt:360) at org.jetbrains.kotlin.core.builder.ScriptsFilesStorage.getPsiFile(KotlinPsiManager.kt:68) at org.jetbrains.kotlin.core.builder.KotlinPsiManager.getParsedFile(KotlinPsiManager.kt:268) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment.<init>(KotlinEnvironment.kt:121) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment.<init>(KotlinEnvironment.kt:114) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment$Companion$getEnvironment$1.invoke(KotlinEnvironment.kt:174) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment$Companion$getEnvironment$1.invoke(KotlinEnvironment.kt:163) at org.jetbrains.kotlin.core.model.CachedEnvironment.getOrCreateEnvironment(CachedEnvironment.kt:37) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment$Companion.getEnvironment(KotlinEnvironment.kt:173) at org.jetbrains.kotlin.core.model.KotlinEnvironmentKt.getEnvironment(KotlinEnvironment.kt:90) at org.jetbrains.kotlin.core.builder.KotlinPsiManager.parseText(KotlinPsiManager.kt:366) at org.jetbrains.kotlin.core.builder.KotlinPsiManager.parseFile(KotlinPsiManager.kt:360) at org.jetbrains.kotlin.core.builder.ScriptsFilesStorage.getPsiFile(KotlinPsiManager.kt:68) at org.jetbrains.kotlin.core.builder.KotlinPsiManager.getParsedFile(KotlinPsiManager.kt:268) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment.<init>(KotlinEnvironment.kt:121) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment.<init>(KotlinEnvironment.kt:114) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment$Companion$getEnvironment$1.invoke(KotlinEnvironment.kt:174) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment$Companion$getEnvironment$1.invoke(KotlinEnvironment.kt:163) at org.jetbrains.kotlin.core.model.CachedEnvironment.getOrCreateEnvironment(CachedEnvironment.kt:37) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment$Companion.getEnvironment(KotlinEnvironment.kt:173) at org.jetbrains.kotlin.core.model.KotlinEnvironmentKt.getEnvironment(KotlinEnvironment.kt:90) at org.jetbrains.kotlin.core.builder.KotlinPsiManager.parseText(KotlinPsiManager.kt:366) at org.jetbrains.kotlin.core.builder.KotlinPsiManager.parseFile(KotlinPsiManager.kt:360) at org.jetbrains.kotlin.core.builder.ScriptsFilesStorage.getPsiFile(KotlinPsiManager.kt:68) at org.jetbrains.kotlin.core.builder.KotlinPsiManager.getParsedFile(KotlinPsiManager.kt:268) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment.<init>(KotlinEnvironment.kt:121) at org.jetbrains.kotlin.core.model.KotlinScriptEnvironment.<init>(KotlinEnvironment.kt:114)
[...]

.kt-Files are working, but for editing Gradle-Buildfiles I need the Script Editor. I tested with Eclipse 2021-06 and 2021-09 (both fresh installs) and both had the same error.

@bvfalcon
Copy link
Owner

Try please update-site for eclipse 2021-09 once again. I get changes of @niof and it works good for me.

@schaarda
Copy link
Collaborator Author

Hello Vladimir,

thanks for the update. The StackOverflowError ist gone now!

Unfortunately there seem to be even more problems along the road. I already answered to @niof here: Kotlin#141 (comment)

@JulianHahn96
Copy link
Collaborator

JulianHahn96 commented Nov 21, 2021

@schaarda: Thanks for the feedback. I fixed that issue in all branches of my repository.
@bvfalcon: Maybe you can merge those again so she has the update site?`

Also there are new branches for kotlin 1.6.0: kotlin/1.6.0/idea/2021.2/eclipse/4.21

However you will get many errors when opening a build.gradle.kts file as there is no integration with gradle. So it wont know about gradle specific things like the project variable being available and so on. And i dont think that thats easy to implement in the near future.

@gayanper
Copy link
Collaborator

Time to time i work on kotlin and i use this version of the plugin. I see there are not activity from Jetbrain side on improving this plugin recently. So should we put effort on a single fork all of us and maintain this plugin as much as we can ? May be we can see if we can find a FOSS subscription from jfrog for hosting the update sites. WDYT ?

@JulianHahn96
Copy link
Collaborator

sounds good to me. I would be up for it.

@bvfalcon
Copy link
Owner

Excellent idea :) For start, I can automatize plugin build. all subprojects are built with "mvn clean package", except one. kotlin-bundled-compiler is built with "gradlew clean getBundled".
Then, in nearest days I make common unified build method and settings for Github Packages. After that update-site for plugin can be build fully automatized by everyone.
And I hope, JetBrains will merge our changes into original Jetbrains/kotlin-eclipse repository. I am agree with @schaarda , they have conflict of interests (IntelliJ Idea is direct competitor of Eclipse), but the mind must win :)

@JulianHahn96
Copy link
Collaborator

so we keep this fork as the main one or do we make a completely new one? Maybe we should set up some other form of chat for that topic tho. It does not really belong here in an issue

@schaarda
Copy link
Collaborator Author

Looks like IntelliJ has not completely abandoned the plugin (yet). They just updated the Eclipse Marketplace today with a new version 1.5.31 - coincidence?
The StackOverflowError is gone there, too.
But the next error down the line still exists:
Even if I create a new Kotlin Project (with the automatically added dependencies) whenever I create or edit a Kotlin Script I get the following error:
Cannot access script base class 'org.jetbrains.kotlin.core.script.template.ProjectScriptTemplate'

It's the same with the version from the marketplace and with your branch. And it's old, too: https://youtrack.jetbrains.com/issue/KE-360

Guess I'll annoy them a little bit more...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants