Asciidoc preview completely hangs IDEA
See original GitHub issueAfter working with a few files in IDEA, for a couple of minutes, the IDE completely hangs and must be kill -9ed and restarted.
Ubuntu 20.04 IDEA Ultimate 2020.1.2, 2020.1.3 with JBR AsciiDoc Plugin Version: 0.30.78
Stack trace when is below and shows the AWT thread waiting for a coroutine forever which hangs the IDE completely:
Thread Dump
``` 2020-07-09 19:19:01 Full thread dump OpenJDK 64-Bit Server VM (11.0.7+10-b765.64 mixed mode):“AWT-EventQueue-0” #34 prio=6 os_prio=0 cpu=60551,45ms elapsed=3580,82s tid=0x00007f66304f27d0 nid=0x12b787 waiting on condition [0x00007f66133ab000] java.lang.Thread.State: TIMED_WAITING (parking) at jdk.internal.misc.Unsafe.park(java.base@11.0.7/Native Method) - parking to wait for <0x000010013a6531b8> (a kotlinx.coroutines.BlockingCoroutine) at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.7/LockSupport.java:234) at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:82) at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54) at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36) at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) at com.intellij.configurationStore.StoreUtil$Companion.saveDocumentsAndProjectsAndApp(storeUtil.kt:75) at com.intellij.configurationStore.StoreUtil.saveDocumentsAndProjectsAndApp(storeUtil.kt) at com.intellij.openapi.application.impl.ApplicationImpl.saveAll(ApplicationImpl.java:1374) at org.asciidoc.intellij.editor.AsciiDocPreviewEditor.lambda$selectNotify$2(AsciiDocPreviewEditor.java:377) at org.asciidoc.intellij.editor.AsciiDocPreviewEditor$$Lambda$2307/0x00007f64eedfe440.run(Unknown Source) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:976) at org.asciidoc.intellij.editor.AsciiDocPreviewEditor.lambda$selectNotify$3(AsciiDocPreviewEditor.java:371) at org.asciidoc.intellij.editor.AsciiDocPreviewEditor$$Lambda$1922/0x00007f6543cf3c40.run(Unknown Source) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:310) at com.intellij.openapi.application.impl.ApplicationImpl$$Lambda$295/0x00007f65d690d8b0.run(Unknown Source) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:80) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:128) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46) at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:184) at java.awt.event.InvocationEvent.dispatch(java.desktop@11.0.7/InvocationEvent.java:313) at java.awt.EventQueue.dispatchEventImpl(java.desktop@11.0.7/EventQueue.java:776) at java.awt.EventQueue$4.run(java.desktop@11.0.7/EventQueue.java:727) at java.awt.EventQueue$4.run(java.desktop@11.0.7/EventQueue.java:721) at java.security.AccessController.doPrivileged(java.base@11.0.7/Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@11.0.7/ProtectionDomain.java:85) at java.awt.EventQueue.dispatchEvent(java.desktop@11.0.7/EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:974) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:847) at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449) at com.intellij.ide.IdeEventQueue$$Lambda$485/0x00007f65c3149c58.compute(Unknown Source) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:741) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448) at com.intellij.ide.IdeEventQueue$$Lambda$484/0x00007f65c314b1b8.run(Unknown Source) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496) at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@11.0.7/EventDispatchThread.java:203) at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@11.0.7/EventDispatchThread.java:124) at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@11.0.7/EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(java.desktop@11.0.7/EventDispatchThread.java:109) at java.awt.EventDispatchThread.pumpEvents(java.desktop@11.0.7/EventDispatchThread.java:101) at java.awt.EventDispatchThread.run(java.desktop@11.0.7/EventDispatchThread.java:90)
</summary>
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)

Top Related StackOverflow Question
I tried to circumvent the the method that is blocking. Saving editor contents is now only triggered when contents have been changed.
I’ve prepared a pre-release 0.30.84. Please give it a try.
The pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.
@ahus1 - this issue appeared with the previous update of the plugin with a freeze of Intellij (as described above, I have to kill -9 it to restore it). The last update seems fix it as I can’t reproduce it so far.