AtomMaterialUI / color-highlighter

JetBrains plugin to preview colors directly from within the code.
MIT License
42 stars 25 forks source link

9.1 update crashing in PyCharm #44

Closed codifryed closed 2 years ago

codifryed commented 2 years ago

Describe the bug First off, thanks for the nice plugin. After the recent 9.1 plugin update, I'm getting a Fatal Error in PyCharm. 9.0 worked without issue.

To Reproduce

  1. Install lastest PyCharm.
  2. Install latest color-highlighter plugin 9.1
  3. Open source file with colors

Expected Behavior

it works.

Environment

PyCharm 2021.2.3 (Community Edition) Build #PC-212.5457.59, built on October 19, 2021 Runtime version: 11.0.12+7-b1504.40 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.13.0-7614-generic GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 16 Non-Bundled Plugins: com.markskelton.one-dark-theme (5.4.0), IdeaVIM (1.8.0), net.vektah.codeglance2 (1.5.5), com.intellij.ideolog (203.0.27.0), com.chylex.intellij.coloredicons (1.3), some.awesome (1.14), com.tabnine.TabNine (0.5.2), com.jetbrains.plugins.ini4idea (212.5457.62), izhangzhihao.rainbow.brackets (6.21), com.mallowigi.colorHighlighter (9.1.0), com.leinardi.pycharm.pylint (0.12.2), com.leinardi.pycharm.mypy (0.11.2), com.koxudaxi.poetry (1.1.5-212) Current Desktop: pop:GNOME

I Also installed it on a fresh Ubuntu 20.04 installation, same issue occurred.

Screenshots

Stack Trace:

java.lang.NoClassDefFoundError: com/intellij/psi/PsiJavaFile
    at com.mallowigi.visitors.JavaVisitor.suitableForFile(JavaVisitor.kt:43)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.filterVisitors(GeneralHighlightingPass.java:125)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.getHighlightVisitors(GeneralHighlightingPass.java:142)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:162)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: com.intellij.psi.PsiJavaFile PluginClassLoader(plugin=PluginDescriptor(name=Color Highlighter, id=com.mallowigi.colorHighlighter, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/Toolbox/apps/PyCharm-C/ch-0/212.5284.44.plugins/Color Highlighter, version=9.1.0, package=null), packagePrefix=null, instanceId=54, state=active)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:235)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 23 more
3PSY0N commented 2 years ago

Same issue here: Plugin Version: 9.1.0

PhpStorm 2021.2.3
Build #PS-212.5457.49, built on October 13, 2021
Runtime version: 11.0.12+7-b1504.40 amd64
java.lang.NoClassDefFoundError: com/intellij/psi/PsiJavaFile
    at com.mallowigi.visitors.JavaVisitor.suitableForFile(JavaVisitor.kt:43)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.filterVisitors(GeneralHighlightingPass.java:125)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.getHighlightVisitors(GeneralHighlightingPass.java:142)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:162)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: com.intellij.psi.PsiJavaFile PluginClassLoader(plugin=PluginDescriptor(name=Color Highlighter, id=com.mallowigi.colorHighlighter, descriptorPath=plugin.xml, path=~\AppData\Local\JetBrains\Toolbox\apps\PhpStorm\ch-0\212.5457.49.plugins\Color Highlighter, version=9.1.0, package=null), packagePrefix=null, instanceId=80, state=active)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:235)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 23 more
KenmuHuang commented 2 years ago

Same issue here: Plugin Version: 9.1.0 AppCode: 2021.2.2

java.lang.NoClassDefFoundError: com/intellij/psi/PsiJavaFile at com.mallowigi.visitors.JavaVisitor.suitableForFile(JavaVisitor.kt:43) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.filterVisitors(GeneralHighlightingPass.java:125) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.getHighlightVisitors(GeneralHighlightingPass.java:142) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:162) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) Caused by: java.lang.ClassNotFoundException: com.intellij.psi.PsiJavaFile PluginClassLoader(plugin=PluginDescriptor(name=Color Highlighter, id=com.mallowigi.colorHighlighter, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/AppCode2021.2/plugins/Color Highlighter, version=9.1.0, package=null), packagePrefix=null, instanceId=65, state=active) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:235) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 23 more

codifryed commented 2 years ago

@mallowigi I had a hunch what the issue might be so I just checked out the repo and see that you've made recent changes, esp. in regards to withLang. I built the plugin locally and tested them on IntelliJ and PyCharm. It works now, thank you. :+1:

mallowigi commented 2 years ago

Yes, the hotfix has been submitted to moderation. In the meantime you can already download the new versions from the plugin marketplace.