asciidoctor / asciidoctor-intellij-plugin

AsciiDoc plugin for products on the IntelliJ platform (IDEA, RubyMine, etc)
https://intellij-asciidoc-plugin.ahus1.de/
Apache License 2.0
349 stars 146 forks source link

Empty preview pane #499

Closed NorthLake closed 4 years ago

NorthLake commented 4 years ago

I just installed the plugin, but the preview doesn't render. It's just an empty area, no matter what view mode I select. I've tried closing and launching IntelliJ again, but that doesn't help either. The other features (i.e. top bar and context menu in editor) do work.

AsciiDoc Plugin Version: 0.30.73

IDE Name and Version: IntelliJ IDEA 2020.1.1 (Ultimate Edition) Build #IU-201.7223.91, built on April 30, 2020 Licensed to myself Subscription is active until September 5, 2020 For educational use only. Runtime version: 11.0.6+8-b765.40 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0 GC: ParNew, ConcurrentMarkSweep Memory: 1972M Cores: 12 Non-Bundled Plugins: org.jetbrains.kotlin, org.asciidoctor.intellij.asciidoc

ahus1 commented 4 years ago

Hi @NorthLake, I'm sorry to hear that.

Can you please provide the contents in the editor (maybe a screenshot, maybe a small snippet?)

If the contents you're looking at are open source, please point me to the source repository.

Does it happend even with small AsciiDoc files?

NorthLake commented 4 years ago

The document is a school exercise in Dutch. (I changed the extension to txt, because adoc isn't allowed) I tried removing a large part of the document, but that didn't help.

ahus1 commented 4 years ago

The I open the file, I see the title ("FEP WEB01 - HTML, CSS & JS"), and the rest of the preview is blank.

The problem seems to be in line 9 ("endif::[]-"). After the closing bracket there is a dash (-). This way AsciiDoc fails to recognize the endif correctly, and ignores the complete rest of the document.

Remove the "-" and the text will appear.

Please let me know if that helped.

NorthLake commented 4 years ago

I just got this document from my teacher assuming it was correct, because I don't know the syntax myself. The problem is still there, though. I don't see anything in the preview pane(not even the title), even after removing the -.

ahus1 commented 4 years ago

That is strange. I use the same IDE version and plugin, and my preview works. Something must be different, but I didn't yet figure out what it is.

Please provide:

Thanks in advance!

ahus1 commented 4 years ago

One more thing to check, please have a look in your project: an ".asciidoctorconfig" or ".asciidoctorconfig.adoc" file can provide additional settings.

Does a file like that exist in your project?

NorthLake commented 4 years ago

I just reopened IntelliJ to shorten the logs for you, and suddenly it's fixed. I did not change anything in either the document or the settings other then switching from Darcula to IntelliJ Light (before reopening).

asciidoc settings

I edited this screenshot to show what it looked like: asciidoc bug

There are no asciidoc config files in the project (as you can also see in the screenshot).

ahus1 commented 4 years ago

Good to hear that it works now. I looked at the logs you sent, but didn't find error messages related to the plugin.

The screenshot of the editor is very interesting: the preview looks as if it doesn't exist at all; maybe it got stuck during initialization. I haven't seen that before.

If this happens again, I'd kindly ask you to provide thread dump of the IDE. The IDE can't provide thread dump stand-alone, only in combination with a heap dump (that unfortunately is quite big). Create one using "Help | Diagnostic Tools... | Capture Memory Snapshot". Please provide it to my personal email address.

If you've familiar with Java tooling, you can create the much smaller thread dump without the memory dump using the "jstack.exe" command line tool. "jps.exe -v" will show you the process IDs. You find both in the JDK bundled with your IDE.

Thanks in advance!

anthonyikeda commented 4 years ago

I've had intermittent situations where the preview pane just doesn't work. Restarting seems to fix the problem but after a while it stops working.

Is there a way I can diagnose the plugin? Logs? Debug?

-- UPDATE

Okay I don't know what's going on, but I have one adoc file open and the preview working, but a second one shows the white view:

image

ahus1 commented 4 years ago

@anthonyikeda - thanks for offering your help to investigate it.

Please send the logs of the IDE - you can send them to my email address shown in my GitHub profile. You can access the file via "Help | Show Log in Explorer ..."

When the preview doesn't respond any more, please create a thread dump. Use "Help | Dump Threads" to create it and send the file the IDE created (a small notifications should take you to the folder.

Thanks in advance!

anthonyikeda commented 4 years ago

I sent the log file. If this happens again I'll try the dump threads.

Thanks @ahus1 !

anthonyikeda commented 4 years ago

@NorthLake do you by any chance have the LSP plugin installed?

ahus1 commented 4 years ago

@anthonyikeda - I've analyzed the log and looking at the stack trace of the exception it seems to be an issue of the IDE's JDK and accessibility features of MacOS X. The Mathlab people described some of their insights here: https://au.mathworks.com/matlabcentral/answers/515780-why-do-i-get-java-exceptions-java-lang-nullpointerexception-when-i-use-matlab-with-window-magnet-or#answer_424342

According to the article the accessibility features are used by add-on window managers for MacOS X. Does the scenario described in the article linked above relate to your setup?


An excerpt from the logs for future reference:

Exception: IndexOutOfBoundsException Message: Wrong line: 1. Available lines count: 0 Related classes: com.intellij.openapi.editor.impl.EditorComponentImpl, java.desktop/sun.lwawt.macosx.CAccessibleText

Stacktrace ``` 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - java.lang.IndexOutOfBoundsException: Wrong line: 1. Available lines count: 0 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.openapi.editor.impl.LineSet.checkLineIndex(LineSet.java:212) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.openapi.editor.impl.LineSet.getLineStart(LineSet.java:193) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.openapi.editor.impl.DocumentImpl.getLineStartOffset(DocumentImpl.java:995) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.openapi.editor.impl.EditorComponentImpl$EditorAccessibilityDocument$1.getStartOffset(EditorComponentImpl.java:663) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/sun.lwawt.macosx.CAccessibleText.getRangeForLine(CAccessibleText.java:342) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/sun.lwawt.macosx.CAccessibleText$11.call(CAccessibleText.java:189) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/sun.lwawt.macosx.CAccessibleText$11.call(CAccessibleText.java:187) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/sun.lwawt.macosx.LWCToolkit$CallableWrapper.run(LWCToolkit.java:657) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/sun.awt.AWTThreading$4.dispatch(AWTThreading.java:183) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.base/java.security.AccessController.doPrivileged(Native Method) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.base/java.security.AccessController.doPrivileged(Native Method) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:974) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:847) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:730) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:188) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.base/java.security.AccessController.doPrivileged(Native Method) 2020-06-17 09:00:37,616 [ 885743] INFO - STDERR - at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/sun.lwawt.macosx.LWCToolkit.unsafeNonblockingExecute(LWCToolkit.java:684) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.base/java.lang.reflect.Method.invoke(Method.java:566) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.ide.IdeEventQueue.unsafeNonblockingExecute(IdeEventQueue.java:1635) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at org.asciidoc.intellij.editor.javafx.JavaFxHtmlPanel.runFX(JavaFxHtmlPanel.java:429) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at org.asciidoc.intellij.editor.javafx.JavaFxHtmlPanel.lambda$new$0(JavaFxHtmlPanel.java:228) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:310) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:80) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:128) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:184) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.base/java.security.AccessController.doPrivileged(Native Method) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:974) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:847) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:741) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) 2020-06-17 09:00:37,617 [ 885744] INFO - STDERR - at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) ```

IDE: IntelliJ IDEA 2020.1.2 Build #IU-201.7846.76 JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. OS: Mac OS X

Active 3rd party plugins: Loaded custom plugins: ANSI Highlighter (1.2.4), LSP Support (1.6.1), GenerateSerialVersionUID (3.0.3), JMeter plugin (1.6.1), Lombok (0.30-2020.1), Thrift Support (1.1), Erlang (0.11.1059), Ideolog (201.0.22.0), Quarkus Integration (1.1.1), Protobuf Support (0.13.0), OpenAPI Generator (4.0.0), CSV Plugin (2.12.0), HashiCorp Terraform / HCL Language Support (0.7.9), BashSupport (1.7.18.201), Go (201.7846.76.189), Handlebars/Mustache (201.7223.29), Kubernetes (201.7846.6), Ruby (201.7846.76), Dart (201.7846.93), Kotlin (1.3.72-release-IJ2020.1-5), Scala (2020.1.36), Cloud Code (20.6.1), Live Edit (201.7223.18), PHP (201.7846.90), AsciiDoc (0.30.78), Swagger (1.0.28), Presentation Assistant (1.0.5), Toml (0.2.124.40-201), Rust (0.2.124.3162-201), Nyan Progress Bar (1.14)

anthonyikeda commented 4 years ago

I don't have the MatLab application installed and actually recently had my Mac freshly installed. There are no screen management tools installed either.

IntelliJ is using the standard JDK supplied with the IDE also. Originally I thought the LSP plugin might be the problem since I've had numerous alerts about compatibility.

I'll keep searching.

anthonyikeda commented 4 years ago

I did find a similar issue. I also have the Cloud Code plugin installed. Going to disable cloud code and see if there is any differences.

https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues/2731

anthonyikeda commented 4 years ago

I've disable Cloud Code and Thrift plugins and will monitor the IDE.

ahus1 commented 4 years ago

From the stack trace you sent me I tried to derive a scenario/workaround: The plugin will try identify the situation and log only once "IOOB Exception when trying to start JavaFX runnable, will not retry" and then use a different path to achieve the same result.

Please upgrade to pre-release 0.30.80. When the problem doesn't reoccur, please have a look if this message appears in your log. If there is no problem, and the message in the log, then the workaround works as expected.

The pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.

anthonyikeda commented 4 years ago

I installed the pre-release plugin and saw the plugin crash as I clicked on the last line in the editor.

Just a guess but I think it's tied to a core IntelliJ bug with the last line causing OOBE. I just saw the plugin crash:

2020-06-18 09:37:12,578 [  76408]   WARN - .editor.javafx.JavaFxHtmlPanel - rendering didn't complete in time, might be slow or broken 
2020-06-18 09:37:12,764 [  76594]   WARN - .editor.javafx.JavaFxHtmlPanel - rendering didn't complete in time, might be slow or broken 
2020-06-18 09:37:12,818 [  76648]   WARN - .editor.javafx.JavaFxHtmlPanel - rendering didn't complete in time, might be slow or broken 
2020-06-18 09:37:15,731 [  79561]   WARN - .editor.javafx.JavaFxHtmlPanel - rendering didn't complete in time, might be slow or broken 
2020-06-18 09:37:15,913 [  79743]   WARN - .editor.javafx.JavaFxHtmlPanel - rendering didn't complete in time, might be slow or broken 
2020-06-18 09:37:15,936 [  79766]   WARN - .editor.javafx.JavaFxHtmlPanel - rendering didn't complete in time, might be slow or broken 
2020-06-18 09:37:18,932 [  82762]   INFO -                         STDERR - java.lang.IndexOutOfBoundsException: Wrong line: 35. Available lines count: 35 
2020-06-18 09:37:18,932 [  82762]   INFO -                         STDERR -     at com.intellij.openapi.editor.impl.LineSet.checkLineIndex(LineSet.java:212) 
2020-06-18 09:37:18,932 [  82762]   INFO -                         STDERR -     at com.intellij.openapi.editor.impl.LineSet.getLineStart(LineSet.java:193) 
2020-06-18 09:37:18,932 [  82762]   INFO -                         STDERR -     at com.intellij.openapi.editor.impl.DocumentImpl.getLineStartOffset(DocumentImpl.java:995) 
2020-06-18 09:37:18,932 [  82762]   INFO -                         STDERR -     at com.intellij.openapi.editor.impl.EditorComponentImpl$EditorAccessibilityDocument$1.getStartOffset(EditorComponentImpl.java:663) 
2020-06-18 09:37:18,932 [  82762]   INFO -                         STDERR -     at java.desktop/sun.lwawt.macosx.CAccessibleText.getRangeForLine(CAccessibleText.java:342) 
2020-06-18 09:37:18,932 [  82762]   INFO -                         STDERR -     at java.desktop/sun.lwawt.macosx.CAccessibleText$11.call(CAccessibleText.java:189) 
2020-06-18 09:37:18,932 [  82762]   INFO -                         STDERR -     at java.desktop/sun.lwawt.macosx.CAccessibleText$11.call(CAccessibleText.java:187) 
2020-06-18 09:37:18,932 [  82762]   INFO -                         STDERR -     at java.desktop/sun.lwawt.macosx.LWCToolkit$CallableWrapper.run(LWCToolkit.java:657) 
ahus1 commented 4 years ago

Hm, the plugin doesn't pass a line number here, so it's the interaction of the JDK and IntelliJ core. Could you please paste the full stack trace?

I'd be happy if you could reproduce this problem with the JetBrains' Markdown plugin (they use the same mechanism) and report it as a but at JetBrains' tracker and link it here. Maybe it is an off-by-one error.

If you have the time and feel experimental, there are the new 2020.2-early-access builds of IntelliJ. This includes a new preview based on JCEF (#390). This might not be affected by this bug, but might other glitches as it is an early access version. The latest versions of the 0.31.x releases of the plugin includes support for JCEF.

anthonyikeda commented 4 years ago

I believe it is a core IDEA problem, I've recreated the same error with Markdown also.

When clicking on the last line of application.properties file, I see the OOBE happening also.

Let me zip up the logs (the trace is huge) and send it to you.

Thanks again @ahus1 !

anthonyikeda commented 4 years ago

Log file attached with the pre-release asciidoc plugin.

Note the Markdown editor also is unusable so most likely an IntelliJ bug, not AsciiDoc!

Anthony

On Thu, 18 Jun 2020 at 09:56, Alexander Schwartz notifications@github.com wrote:

Hm, the plugin doesn't pass a line number here, so it's the interaction of the JDK and IntelliJ core. Could you please paste the full stack trace?

I'd be happy if you could reproduce this problem with the JetBrains' Markdown plugin (they use the same mechanism) and report it as a but at JetBrains' tracker and link it here. Maybe it is an off-by-one error.

If you have the time and feel experimental, there are the new 2020.2-early-access builds of IntelliJ https://www.jetbrains.com/idea/nextversion/. This includes a new preview based on JCEF (#390 https://github.com/asciidoctor/asciidoctor-intellij-plugin/issues/390). This might not be affected by this bug, but might other glitches as it is an early access version. The latest versions of the 0.31.x releases of the plugin includes support for JCEF.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/asciidoctor/asciidoctor-intellij-plugin/issues/499#issuecomment-646170498, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ5NYO23JEJM6FPRJSB4TTRXJBLHANCNFSM4NMPSMRQ .

ahus1 commented 4 years ago

@anthonyikeda - GitHub didn't add the file to the issue.

Please open an issue on YouTrack and past a link here so I can subscribe for updates: https://youtrack.jetbrains.com/issues/IDEA

anthonyikeda commented 4 years ago

https://youtrack.jetbrains.com/issue/IDEA-243983

PHPirates commented 4 years ago

I'm having this problem of a white preview pane (also for markdown) in #IU-202.6109.22, but it's fixed for me when I used #IC-202.6250.1. Was probably https://youtrack.jetbrains.com/issue/IDEA-233393

[Edit] I updated to 202.6250.13 and now the problem seems to have come back....

ahus1 commented 4 years ago

@anthonyikeda - I've look at your log file again and found this exception: The Zalando swagger plugin seems to have a problem when the AsciiDoc plugin tries to tigger saving files and configuration. This might have also been an issue for a blank preview (referencing #520)

The latest release of the AsciiDoc plugin (0.30.84 for 2019.3.1+, 0.31.12 for 2020.2+) will now only save the file contents and no longer the configuration, therefore would circumvent the issue.

2020-06-17 09:05:20,268 [  61303]   WARN - Container.ComponentManagerImpl - Bean extension class constructor must not have parameters: org.zalando.intellij.swagger.inspection.reference.YamlReferenceInspection [Plugin: org.zalando.intellij.swagger] 
com.intellij.diagnostic.PluginException: Bean extension class constructor must not have parameters: org.zalando.intellij.swagger.inspection.reference.YamlReferenceInspection [Plugin: org.zalando.intellij.swagger]
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateExtensionWithPicoContainerOnlyIfNeeded(ComponentManagerImpl.kt:693)
    at com.intellij.serviceContainer.BaseKeyedLazyInstance.createInstance(BaseKeyedLazyInstance.java:57)
    at com.intellij.openapi.extensions.CustomLoadingExtensionPointBean.createInstance(CustomLoadingExtensionPointBean.java:31)
    at com.intellij.codeInspection.InspectionEP.instantiateTool(InspectionEP.java:198)
    at com.intellij.codeInspection.ex.InspectionToolWrapper.getTool(InspectionToolWrapper.java:74)
    at com.intellij.codeInspection.ex.ScopeToolState.areSettingsEqual(ScopeToolState.java:124)
    at com.intellij.codeInspection.ex.ScopeToolState.equalTo(ScopeToolState.java:117)
    at com.intellij.codeInspection.ex.ToolsImpl.equals(ToolsImpl.java:461)
    at com.intellij.openapi.util.Comparing.equal(Comparing.java:31)
    at com.intellij.codeInspection.ex.InspectionProfileImpl.toolSettingsAreEqual(InspectionProfileImpl.java:106)
    at com.intellij.codeInspection.ex.InspectionProfileImpl.getChangedToolNames(InspectionProfileImpl.java:866)
    at com.intellij.codeInspection.ex.InspectionProfileImpl.writeExternal(InspectionProfileImpl.java:222)
    at com.intellij.codeInspection.ex.InspectionProfileImpl.writeScheme(InspectionProfileImpl.java:195)
    at com.intellij.configurationStore.LazySchemeProcessor.writeScheme(scheme-impl.kt:66)
    at com.intellij.configurationStore.LazySchemeProcessor.writeScheme(scheme-impl.kt:57)
    at com.intellij.configurationStore.schemeManager.SchemeManagerImpl.saveScheme(SchemeManagerImpl.kt:374)
    at com.intellij.configurationStore.schemeManager.SchemeManagerImpl.save(SchemeManagerImpl.kt:314)
    at com.intellij.configurationStore.schemeManager.SchemeManagerFactoryBase.save(SchemeManagerFactoryImpl.kt:95)
    at com.intellij.configurationStore.ComponentStoreWithExtraComponents$saveSettingsSavingComponentsAndCommitComponents$2$1.invokeSuspend(ComponentStoreWithExtraComponents.kt:62)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:314)
    at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
    at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:109)
    at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:158)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:54)
    at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
    at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
    at com.intellij.configurationStore.ComponentStoreWithExtraComponents$saveSettingsSavingComponentsAndCommitComponents$2.invokeSuspend(ComponentStoreWithExtraComponents.kt:57)
    at com.intellij.configurationStore.ComponentStoreWithExtraComponents$saveSettingsSavingComponentsAndCommitComponents$2.invoke(ComponentStoreWithExtraComponents.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
    at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:177)
    at com.intellij.configurationStore.ComponentStoreWithExtraComponents.saveSettingsSavingComponentsAndCommitComponents$intellij_platform_configurationStore_impl(ComponentStoreWithExtraComponents.kt:55)
    at com.intellij.configurationStore.ProjectStoreImpl$doSave$2$1.invokeSuspend(ProjectStoreImpl.kt:118)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:272)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
    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 com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:976)
    at org.asciidoc.intellij.editor.AsciiDocPreviewEditor.lambda$selectNotify$3(AsciiDocPreviewEditor.java:371)
    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.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.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(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.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:741)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
anthonyikeda commented 4 years ago

Thanks for that @ahus1 I've since uninstalled the swaggerdoc plugin and also with the latest asciidoctor update the previews seem to have stabilised soemwhat. There still seems to be an underlying IntelliJ bug that I raised with JetBrain (IndexOutOfBoundsException) that is impacting this and I believe they have fixed the issue for an upcoming release.

https://youtrack.jetbrains.com/issue/IDEA-233393

ahus1 commented 4 years ago

Hi @anthonyikeda - this is good news!

The IDEA issue mentions that it was fixed in 202.6109.1, and by now 202.6250.13 is available as an EAP (early access) release.

So if you feel lucky, you can give it a try. Please note that to use the JavaFX preview the "JavaFX runtime for plugins" is needed: https://plugins.jetbrains.com/plugin/14250-javafx-runtime-for-plugins If you don't install it, the plugin will use the (brand new, but still a bit shaky) JCEF preview. See https://intellij-asciidoc-plugin.ahus1.de/docs/users-guide/installation.html for more details.

Given enough disk space, you can install both releases side-by-side (I use the JetBrains toolbox for that - https://www.jetbrains.com/toolbox-app/)

https://confluence.jetbrains.com/display/IDEADEV/IDEA+2020.2+latest+builds

ahus1 commented 4 years ago

@PHPirates - can you provide logs (you can find my email address in my GitHub profile)? Please post the version of your IDE and the version of the plugin you're using.

PHPirates commented 4 years ago

@ahus1 Yeah sorry for the omission, I am still confused whether this would be solved for the next IntelliJ release or not, and why it worked once for me.

I just tried again and it seems the problem is still there for the markdown plugin

Okay so I restarted IntelliJ two times, then IntelliJ crashed (like, the process just stopped) when I tried to get the logs, and now it seems to be working with JCEF preview.

I will keep the plugin enabled and we will see how it goes, I will report back if it breaks again.

Nevertheless, here is some info:

AsciiDoc plugin version 0.31.12

IntelliJ IDEA 2020.2 Beta (Ultimate Edition)
Build #IU-202.6250.13, built on July 8, 2020
IntelliJ IDEA EAP User
Expiration date: August 7, 2020
Runtime version: 11.0.7+10-b944.18 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.7.7-arch1-1
GC: ParNew, ConcurrentMarkSweep
Memory: 4029M
Cores: 8
Registry: ide.plugins.snapshot.on.unload.fail=true, ide.tooltip.initialDelay=1100
Non-Bundled Plugins: Statistic, com.eclectide.intellij.whatthecommit, org.jetbrains.idea.grammar, ms.konovalov.intellij.hidpi-profiles, nl.rubensten.texifyidea, org.asciidoctor.intellij.asciidoc
Current Desktop: XFCE

Logs: idea.log

ahus1 commented 4 years ago

@PHPirates - this reads like if you are all set. Please install "JavaFX runtime for plugins" to re-enable the JavaFX preview: https://plugins.jetbrains.com/plugin/14250-javafx-runtime-for-plugins"

For now JavaFX might be more stable than the JCEF, it might be the reason your IDE crashes.

PHPirates commented 4 years ago

Thanks, it seems indeed that the JCEF preview is still unstable, because when I switched to the JavaFX preview and back to JCEF the preview window went white again (also it opened a tab in my browser on address 0.0.0.1, which I cannot explain at all) and after a while IJ crashed again.

I guess I will be using the JavaFX preview for a while :)

At https://www.jetbrains.org/intellij/sdk/docs/reference_guide/jcef.html they claim that they want to switch to JCEF (not sure for what exactly, but I suppose Markdown included) in 2020.2, so I hope it will work better by then.

anthonyikeda commented 4 years ago

Haha I actually just downloaded it and running it locally.

So far so good. There are some redundant plugins that I don't need that are incompatible, but the newer version seems to do a reload if the preview pane is blank (from what I can see). Still seeing the IOOBE's but this is, again, a core intellij issue.

ahus1 commented 4 years ago

As you asked for the reason for JCEF:

JavaFX' WebView has a lot of work arounds, and it is not in line with latest web standards.

JCEF will provide a html preview that is as capable as the latest Chrome browser as it includes an embedded chrome (that's the e and c in the acronym).

Let's keep fingers crossed that it matures. It already got a lot better in recent weeks. You can help by opening issues at the IDEA issue tracker.

anthonyikeda commented 4 years ago

@ahus1 I think this can be closed. I also think I know what the problem was.

Up until yesterday, IntelliJ just would not remain stable for more than 40 seconds though I was also having problems with VSCode complaining about the GraalVM I had installed. I uninstalled GraalVM to remove these annoying "not signed by developer" prompts.

GraalVM apparently also raised some security alerts to my security team.

Since I've removed GraalVM, IntelliJ has been faster and more responsive as well as stable. Also I've not experienced the freezes that happened when trying to use any of the editors (properties editor especially).

Some points:

ahus1 commented 4 years ago

Thank you @anthonyikeda for the update. I close this issue.