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

VineflowerInvoker.decompile holds ReadWrite lock for 65 seconds and freezes UI thread #21

Closed
ViugiNick opened this issue May 29, 2024 · 3 comments · Fixed by #24
Closed

Comments

@ViugiNick
Copy link

com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1100) [56000ms]
com.intellij.openapi.application.rw.CancellableReadActionKt$$Lambda$1605/0x000000080113a940.run(Unknown Source) [56000ms]
com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$1$lambda$0(cancellableReadAction.kt:49) [56000ms]
com.intellij.openapi.progress.CancellationKt.executeWithJobAndCompleteIt(cancellation.kt:126) [56000ms]
com.intellij.openapi.progress.CancellationKt.withCurrentJob(cancellation.kt:17) [56000ms]
com.intellij.openapi.progress.Cancellation.withCurrentJob(Cancellation.java:60) [56000ms]
com.intellij.openapi.progress.CancellationKt$$Lambda$1594/0x0000000801131cb8.compute(Unknown Source) [56000ms]
com.intellij.openapi.progress.CancellationKt.withCurrentJob$lambda$0(cancellation.kt:17) [56000ms]
com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:91) [56000ms]
com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:92) [56000ms]
com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:15) [56000ms]
com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:108) [56000ms]
com.intellij.openapi.fileEditor.impl.UiBuilder$processFiles$2$document$1.invoke(EditorsSplitters.kt:969) [56000ms]
com.intellij.openapi.fileEditor.impl.UiBuilder$processFiles$2$document$1.invoke(EditorsSplitters.kt:970) [56000ms]
com.intellij.openapi.fileEditor.impl.FileDocumentManagerBase.getDocument(FileDocumentManagerBase.java:53) [56000ms]
com.intellij.openapi.fileEditor.impl.FileDocumentManagerBase.loadText(FileDocumentManagerBase.java:95) [56000ms]
com.intellij.openapi.fileEditor.impl.LoadTextUtil.loadText(LoadTextUtil.java:478) [56000ms]
com.intellij.psi.impl.compiled.ClassFileDecompiler.decompile(ClassFileDecompiler.java:29) [56000ms]
org.vineflower.ijplugin.VineflowerDecompilerLight.getText(VineflowerDecompilerLight.kt:6) [56000ms]
org.vineflower.ijplugin.VineflowerDecompilerLight.getText(VineflowerDecompilerLight.kt:12) [56000ms]
org.vineflower.ijplugin.VineflowerDecompilerBase$Companion.getText(VineflowerDecompilerBase.kt:39) [56000ms]
org.vineflower.ijplugin.VineflowerInvoker.decompile(VineflowerInvoker.kt:168) [56000ms]
org.vineflower.ijplugin.VineflowerInvoker.decompile$doDecompile(VineflowerInvoker.kt:125) [56000ms]
java.base@17.0.7/java.lang.reflect.Method.invoke(Unknown Source) [56000ms]
java.base@17.0.7/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [56000ms]
java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [56000ms]
java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [56000ms]
org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler.decompileContext(BaseDecompiler.java:44) [56000ms]
org.jetbrains.java.decompiler.main.Fernflower.decompileContext(Fernflower.java:149) [56000ms]
org.jetbrains.java.decompiler.struct.StructContext.saveContext(StructContext.java:178) [56000ms]
org.jetbrains.java.decompiler.struct.ContextUnit.save(ContextUnit.java:173) [56000ms]
org.jetbrains.java.decompiler.struct.ContextUnit.waitForAll(ContextUnit.java:226) [56000ms]
java.base@17.0.7/java.util.concurrent.FutureTask.get(Unknown Source) [56000ms]
java.base@17.0.7/java.util.concurrent.FutureTask.awaitDone(Unknown Source) [56000ms]
java.base@17.0.7/java.util.concurrent.locks.LockSupport.park(Unknown Source) [56000ms]
java.base@17.0.7/jdk.internal.misc.Unsafe.park(Native Method) [56000ms]
@solonovamax
Copy link

@solonovamax:
Enabling the plugin in versions 2024.2 or 2024.1.6 causes IntelliJ to not open what so ever. Unsure if this is an issue with some configuration on my end, however I know for sure this is caused by the vineflower plugin.
This causes IntelliJ to remain stuck on the splash screen indefinitely.

I believe it has something to do with the "automatically downloads the latest vineflower updates on IDE startup" feature.

[...]

@solonovamax:
This only started occurring really recently and had never happened before this

@Earthcomputer:
Yeah I think recent intellij updates have made the problem worse. I've unfortunately had to disable the plugin myself. Will be fixed soon.

@ViugiNick
Copy link
Author

I'd like to reopen this one, the version after the fix also causes the UI freeze:

EDT thread:
org.vineflower.ijplugin.VineflowerDecompilerKotlin$StubBuilder.buildFileStub(VineflowerDecompilerKotlin.kt:49) [56800ms]
org.vineflower.ijplugin.VineflowerDecompilerBase$Companion.getText(VineflowerDecompilerBase.kt:39) [56800ms]
org.vineflower.ijplugin.VineflowerInvoker.decompile(VineflowerInvoker.kt:168) [56800ms]
java.base@21.0.3/java.util.concurrent.LinkedBlockingQueue.take(Unknown Source) [56800ms]
java.base@21.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) [56800ms]
java.base@21.0.3/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source) [56800ms]
java.base@21.0.3/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source) [56800ms]
java.base@21.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(Unknown Source) [56800ms]
java.base@21.0.3/java.util.concurrent.locks.LockSupport.park(Unknown Source) [56800ms]
java.base@21.0.3/jdk.internal.misc.Unsafe.park(Native Method) [56800ms]

Full thread dump:
5d5cf837de2f1cf1.txt

@Earthcomputer
Copy link
Collaborator

Yeah, I'm really not sure why. But it's being tracked in #20 now.

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

Successfully merging a pull request may close this issue.

3 participants