izhangzhihao / intellij-rainbow-brackets

🌈Rainbow Brackets for IntelliJ based IDEs/Android Studio/HUAWEI DevEco Studio/Fleet
https://plugins.jetbrains.com/plugin/10080-rainbow-brackets
GNU General Public License v3.0
4.35k stars 202 forks source link

Intellij Client (remote dev) crashes and causes UI to stop updating state #2708

Closed brykgroup-andrews closed 1 month ago

brykgroup-andrews commented 3 months ago

Have you checked the issues and discussions to ensure there are no duplicates?

Yes

Your programming languages

JSX

Free or paid?

Paid users

Expected Behavior

When scrolling, UI should rerender/update surfaces correctly.

Current Behavior

A little bit after joining, the plugin throws an error, and then surfaces stop updating. Scrolling the code view only scrolls the line numbers, multiple scrollbars appear at different points, window resizing doesn't correctly show, closed sidebar tabs do not properly disappear, etc - basically, UI stops redrawing correctly, and shows old data.

Stack Trace ``` com.intellij.diagnostic.PluginException: Cannot create extension (class=ਫ਼ᾑ) [Plugin: izhangzhihao.rainbow.brackets] at com.intellij.serviceContainer.ComponentManagerImpl.createError(ComponentManagerImpl.kt:1471) at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.doCreateInstance(XmlExtensionAdapter.kt:71) at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.createInstance(XmlExtensionAdapter.kt:32) at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapter(ExtensionPointImpl.java:468) at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapters(ExtensionPointImpl.java:416) at com.intellij.openapi.extensions.impl.ExtensionPointImpl.getExtensions(ExtensionPointImpl.java:267) at com.intellij.openapi.extensions.ExtensionPointName.getExtensions(ExtensionPointName.kt:85) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.cloneHighlightVisitors(GeneralHighlightingPass.java:119) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.getHighlightVisitors(GeneralHighlightingPass.java:157) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:178) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:80) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:406) at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.runWithSpanIgnoreThrows(trace.kt:76) at com.intellij.platform.diagnostic.telemetry.helpers.TraceUtil.runWithSpanThrows(TraceUtil.java:34) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:401) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:392) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:391) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:367) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:200) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:184) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:365) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:187) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: com.intellij.diagnostic.PluginException: Cannot create class ਫ਼ᾑ (classloader=PluginClassLoader(plugin=PluginDescriptor(name=Rainbow Brackets, id=izhangzhihao.rainbow.brackets, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/JetBrainsClient233.14015.89/intellij-rainbow-brackets, version=2024.2.1, package=null, isBundled=false), packagePrefix=null, state=active)) at com.intellij.serviceContainer.ComponentManagerImpl.doInstantiateClass(ComponentManagerImpl.kt:1401) at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:1377) at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.instantiateClass(XmlExtensionAdapter.kt:80) at com.intellij.openapi.extensions.impl.SimpleConstructorInjectionAdapter.instantiateClass(XmlExtensionAdapter.kt:100) at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.doCreateInstance(XmlExtensionAdapter.kt:51) ... 32 more Caused by: java.lang.NoClassDefFoundError: com/intellij/psi/xml/XmlTokenType at ਫ਼ᾑ.(Unknown Source) at java.base/jdk.internal.misc.Unsafe.allocateInstance(Native Method) at java.base/java.lang.invoke.DirectMethodHandle.allocateInstance(DirectMethodHandle.java:520) at com.intellij.openapi.project.impl.ProjectImpl.findConstructorAndInstantiateClass(ProjectImpl.kt:140) at com.intellij.serviceContainer.ComponentManagerImpl.doInstantiateClass(ComponentManagerImpl.kt:1392) ... 36 more Caused by: java.lang.ClassNotFoundException: com.intellij.psi.xml.XmlTokenType PluginClassLoader(plugin=PluginDescriptor(name=Rainbow Brackets, id=izhangzhihao.rainbow.brackets, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/JetBrainsClient233.14015.89/intellij-rainbow-brackets, version=2024.2.1, package=null, isBundled=false), packagePrefix=null, state=active) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.kt:156) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ... 41 more ```

Code snippet for reproduce

N/A

Your Environment

Worth a note: Person sharing has rainbow brackets free, I have paid. Disabling it on my end seems to work fine, it still colourizes. Seems to be a clash when both sides have RB enabled, I assume?

WebStorm 2023.3.3 Build #JBC-233.14015.89, built on January 23, 2024 Runtime version: 17.0.9+7-b1087.11 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 6.7.4-zen1-1-zen Guest in Code With Me (WS), direct control type: None GC: G1 Young Generation, G1 Old Generation Memory: 1500M Cores: 20 Registry: debugger.new.tool.window.layout=true ide.experimental.ui=true rdclient.backend.actionHandlers=false Non-Bundled Plugins: com.intellij.plugins.github.colorscheme (233.11799.172) com.intellij.plugins.vibrantink.colorscheme (233.11799.194) izhangzhihao.rainbow.brackets (2024.2.1) com.intellij.plugins.warmneon.colorscheme (233.11799.188) com.intellij.plugins.all_hallows_eve.colorscheme (233.11799.165) com.intellij.plugins.rails_casts.colorscheme (233.11799.165) com.intellij.plugins.visualstudiokeymap (233.11799.165) com.intellij.plugins.netbeanskeymap (233.11799.165) com.intellij.plugins.monokai.colorscheme (233.11799.165) com.intellij.plugins.eclipsekeymap (233.11799.165) String Manipulation (9.12.0) com.intellij.plugins.blackboard.colorscheme (233.11799.165) com.intellij.plugins.twilight.colorscheme (233.11799.165) com.intellij.plugins.cobalt.colorscheme (233.11799.165) com.intellij.plugins.vscodekeymap (233.11799.188) Current Desktop: i3

izhangzhihao commented 3 months ago

Hi, you don't need to install Rainbow Brackets in the Code With Me client side, it works once the server side has this plugin.

image
brykgroup-andrews commented 3 months ago

Hey! That's fine and all - but this affects code with me when working with people (automatic plugin install) and completely breaks the UI. There should at least be some way to prevent it completely breaking the IDE's UI

izhangzhihao commented 3 months ago

I'm consider to do this: update the compatible matrix, it will be like this in the next release:

image

Leave a comment if you have other thoughts.

brykgroup-andrews commented 2 months ago

Sounds good to me! My only question is if I connect to someone else's IDE when working in C# (when code with me eventually releases for it, which is slated to be in 2024.1 assuming we don't get further delays) and I have a license while they don't. I can survive without, but something to allow my end to still use it would be handy.

nenevva commented 2 months ago

I'm using JetBrains Gateway. I met the same problem, client-side plugin crashes the UI. Installing the plugin on the server side did not make effect.