vsch / idea-multimarkdown

Markdown language support for IntelliJ IDEA.
https://plugins.jetbrains.com/plugin/7896-markdown-navigator
Apache License 2.0
815 stars 127 forks source link

Conflict between Markdown Navigator and PDFViewer hangs IDE #686

Closed sla-te closed 4 years ago

sla-te commented 5 years ago

After installing intellij doesn't start start anymore. It will just hang forever in the loading screen I had to manually remove the plugin from %home%/Intellijversion/config/plugins to fix it.

I uploaded the whole log-folder for you.

vsch commented 5 years ago

@chwba, thank you for the logs.

The problem is caused by having two plugins that register Markdown as a language.

Caused by: com.intellij.diagnostic.ImplementationConflictException: Language with ID 'Markdown' is already registered: class org.intellij.plugins.markdown.lang.MarkdownLanguage
    at com.intellij.lang.Language.<init>(Language.java:80)
    at com.intellij.lang.Language.<init>(Language.java:56)
    at com.intellij.lang.Language.<init>(Language.java:52)
    at com.vladsch.idea.multimarkdown.MarkdownLanguage.<init>(MarkdownLanguage.java:28)
    at com.vladsch.idea.multimarkdown.MarkdownLanguage.<clinit>(MarkdownLanguage.java:23)
    ... 42 more

I can see that the bundled Markdown Support is loaded. Usually the IDE detects when Markdown Support and Markdown Navigator are both installed and enabled.

As a workaround disable Markdown Support after installing Markdown Navigator and before restarting the IDE.

From idea.log.1:

2019-01-20 22:51:33,383 [ 4352] INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: Android Support (10.3.1.2), Bytecode Viewer (0.1), CSS Support (183.5153.38), CoffeeScript (183.5153.38), Copyright (8.1), Coverage (183.5153.38), DSM Analysis (1.0.0), Database Tools and SQL (183.5153.38), Docker integration (183.5153.38), Eclipse Integration (3.0), EditorConfig (183.5153.38), Emma (183.5153.38), Git Integration (8.1), GitHub (183.5153.38), Gradle (183.5153.38), Groovy (9.0), HTML Tools (2.0), HTTP Client (183.5153.38), Hibernate Support (1.0), I18n for Java (183.5153.38), IDE Settings Sync (183.5153.38), IDEA CORE (183.5153.38), IntelliJ Configuration Script (183.5153.38), IntelliLang (8.0), J2ME (1.0), JUnit (1.0), Java Bytecode Decompiler (183.5153.38), Java EE: Batch Applications (1.0), Java EE: Bean Validation Support (1.1), Java EE: Contexts and Dependency Injection (1.1), Java EE: EJB, JPA, Servlets (1.0), Java EE: JMS, JSON Processing, Concurrency, Transaction (1.0), Java EE: Java Server Faces (2.2.X.), Java EE: RESTful Web Services (JAX-RS) (1.0), Java EE: Web Services (JAX-WS) (1.9), Java EE: WebSockets (1.0), Java Server Pages (JSP) Integration (1.0), Java Stream Debugger (183.5153.38), JavaFX (1.0), JavaScript Debugger (1.0), JavaScript Intention Power Pack (0.9.4), JavaScript Support (1.0), Less support (183.5153.38), Markdown support (183.5153.38), Maven Integration (183.5153.38), Maven Integration Extension (183.5153.38), Performance Testing (183.5153.38), Persistence Frameworks Support (1.0), Plugin DevKit (1.0), Properties Support (183.5153.38), Reactor framework support (1.0), Refactor-X (2.01), Remote Hosts Access (0.1), SSH Remote Run (0.1), Settings Repository (183.5153.38), Smali Support (1.0), Spring AOP/@AspectJ (1.0), Spring Batch (1.0), Spring Boot (1.0), Spring Data (1.0), Spring Integration Patterns (1.0), Spring MVC (1.0), Spring OSGi (1.0), Spring Security (1.0), Spring Support (1.0), Spring Web Flow (1.0), Spring Web Services (1.0), Spring WebSocket (1.0), Tapestry support (1.0), Task Management (1.0), Terminal (0.1), TestNG-J (8.0), Thymeleaf (1.0), Time Tracking (1.0), UI Designer (183.5153.38), UML Support (1.0), W3C Validators (2.0), WSL Support Framework (183.5153.38), XPathView + XSLT Support (4), XSLT-Debugger (1.4), YAML (183.5153.38), ZKM-Unscramble (1.0), tslint (183.5153.38)

2019-01-20 22:51:33,383 [ 4352] INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: .env files support (0.7), .ignore (3.0.0.182), A move tab left and right using the keyboard plugin - by momomo.com (6.20), A prevent pinned tabs from closing plugin - by momomo.com (8.20), ANSI Highlighter (1.2.4), Active Intellij Tab Highlighter (1.4.0), Archive browser (0.11), AsciiDoc (0.23.2), Atom File Icons IDEA (9.0.1), BashSupport (1.7.4), CMD Support (1.0.5), CPU Usage Indicator (1.8), CheckStyle-IDEA (5.24.2), Codota (2.6.1), Dracula Theme (3.0), EnvFile (3.1.0), Extra Icons (0.22), FindBugs-IDEA (1.0.1), Floobits (1.6.7), Frame Switcher (3.16.0-162), GitLab Projects (2.0.0), Gradle Cleaner (1.0), Gradle Dependencies Formatter (0.5.3), Gradle Dependencies Helper (1.13), Gradle Dependency Helper (1.1), Gradle Killer (1.2), Gradle/Maven Navigation (1.0.43), HOCON (2018.3), IDEA Mind Map (1.4.4), IDETalk (183.3795.13), IconViewer (1.13), Icons for Java annotations (1.1.2), Ideolog (183.0.7.0), Infinitest (5.2.0), Jindent - Source Code Formatter (5.0.3), Json Parser (1.3), Key Promoter X (5.12), Keymap exporter (2.0), LiveEdit (183.4886.3), Lombok Plugin (0.23-2018.3), Markdown Navigator (2.7.0), Material Theme UI (3.4.1.1), Maven Test Support Plugin (0.0.21), OK, Gradle! (0.1.0), PDFViewer (26th Feb 2013), PHP (183.5153.36), PMDPlugin (1.8.8), PlantUML integration (2.12.1), Prettier (183.4886.3), Quick Notes (3.2), Rainbow Brackets (5.14), SmarterEditor (0.12.0), Spring Assistant (0.12.0), TestMe (2.0.0), ToolWindow Colorful Icons (1.0)

sla-te commented 5 years ago

I tried that now. Fresh install of the plugin and then manually disable markdown support. Same result. logs2.zip

vsch commented 5 years ago

@chwba, the duplicate language error is not in the second log files and I can see trace of the Markdown Plugin initializing.

However, in the last 4 thread dump files I checked and the AWT thread is always hung on initialization of org.jpdeal.pdf plugin. The line in the stack trace below is in all thread dump files I checked: org.jpedal.pdf.plugins.idea.fileTypes.impl.PDFFileTypeManagerImpl.initComponent(PDFFileTypeManagerImpl.java:218)

As a test disable the PDF related plugin.

Can you please give me the plugin name so I can see what conflicts exist between the plugin and Markdown Navigator.

"AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 waiting on condition
     java.lang.Thread.State: WAITING
 on java.util.concurrent.FutureTask@6c14bdc0
    at sun.misc.Unsafe.park(Native Method)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
    at java.util.concurrent.FutureTask.get(FutureTask.java:191)
    at com.intellij.util.indexing.FileBasedIndexImpl.waitUntilIndicesAreInitialized(FileBasedIndexImpl.java:328)
    at com.intellij.util.indexing.FileBasedIndexImpl.doClearIndices(FileBasedIndexImpl.java:265)
    at com.intellij.util.indexing.FileBasedIndexImpl$2.rebuildAllIndices(FileBasedIndexImpl.java:233)
    at com.intellij.util.indexing.FileBasedIndexImpl$2.fileTypesChanged(FileBasedIndexImpl.java:216)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
    at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:397)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:358)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:347)
    at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:324)
    at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:29)
    at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:196)
    at com.sun.proxy.$Proxy65.fileTypesChanged(Unknown Source)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.fireFileTypesChanged(FileTypeManagerImpl.java:1014)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.lambda$registerFileType$5(FileTypeManagerImpl.java:908)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl$$Lambda$403/467479944.run(Unknown Source)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1057)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.registerFileType(FileTypeManagerImpl.java:905)
    at com.intellij.openapi.fileTypes.FileTypeManager.registerFileType(FileTypeManager.java:82)
    at org.jpedal.pdf.plugins.idea.fileTypes.impl.PDFFileTypeManagerImpl.initComponent(PDFFileTypeManagerImpl.java:218)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:486)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:104)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$9(ApplicationImpl.java:447)
    at com.intellij.openapi.application.impl.ApplicationImpl$$Lambda$100/802807192.run(Unknown Source)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager$$Lambda$101/683826392.run(Unknown Source)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:471)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:88)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:405)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:391)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:208)
    at com.intellij.idea.IdeaApplication.lambda$initApplication$0(IdeaApplication.java:74)
    at com.intellij.idea.IdeaApplication$$Lambda$74/1330132269.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:342)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
vsch commented 5 years ago

@chwba, I can confirm that the IDE hangs if Markdown Navigator and PDFViewer plugin is installed.

However, I cannot figure out what is causing this because the IDE hangs before Markdown Navigator plugin component or plugin code is called.

The only Markdown Navigator code which is called is the creation of Markdown language and Markdown file type. The rest of the plugin code is not called at all at the time of the hang.

vsch commented 5 years ago

@chwba, the only workaround is to disable the PDFViewer plugin.

sla-te commented 5 years ago

Nice, that worked, thank you!

silkentrance commented 5 years ago

This should have been resolved with newer versions of the IDE. At least I got a message from the IDE that let me decide on whether to enable the standard Markdown support or you plugin. And it seems that they have implemented some sanity checks as well.