Closed fjaccarino closed 4 months ago
Also throw same exception on GoLand.
GoLand 2024.1 Build #GO-241.14494.238, built on March 28, 2024
bh version: Version 2024.1.19
Thanks fo reporting. Unfortunately, I can't reproduce it with GoLand or PyCharm. According to exception it could related to graphic subsytem, which is hardware related thing.
So I will make a "blind fix", possible side effect of that blind fix is missing or wrongly scaled cognitive complexity gutter images.
@fjaccarino @Arianxx Version 2024.1.20 is available for update. Can you update and check if everythig is ok?
@clutcher - not crashing any longer, looks good. Next I'm looking forward to Python support. 😄 https://github.com/clutcher/bh/issues/108#issuecomment-2084415858
@fjaccarino @Arianxx Version 2024.1.20 is available for update. Can you update and check if everythig is ok?
Thanks. The new version indeed fix the core break issue, now the base functions run well. But the left icon of the complexity is lost as you said.
@Arianxx Yeah, thats a Mac/Retina stuff. I already pusblished version 2024.1.21, where it should be fixed.
@clutcher It still shows the empty icon in my Goland bh version: 2024.1.21 Goland: 2024.1.1 MacBook Pro; Chip: Apple M2 Pro; macOS 13.3 (22E252)
@clutcher All the icons in "Custom Icons" also become empty in this version(2024.1.21)
@Arianxx Thanks for reporting, looks like HiDPI issue is fixed only partially in 2024.1.21.
Can you install this version and check if it helps? better_highlights-2024.1.21.1-EAP.zip
@Arianxx Thanks for reporting, looks like HiDPI issue is fixed only partially in 2024.1.21.
Can you install this version and check if it helps? better_highlights-2024.1.21.1-EAP.zip
This version throws the exception again and break all the highlights include Goland owns.
java.lang.NoClassDefFoundError: Could not initialize class com.clutcher.br
at com.clutcher.B.a(SourceFile:121)
at com.clutcher.B.a(SourceFile:100)
at com.clutcher.B.a(SourceFile:81)
at com.clutcher.B.a(SourceFile:1054)
at com.clutcher.C.collect(SourceFile:26)
at com.intellij.codeInsight.hints.CollectorWithSettings.collectHints(InlayHintsUtils.kt:91)
at com.intellij.codeInsight.hints.InlayHintsPass.doCollectInformation$lambda$1(InlayHintsPass.kt:60)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:139)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:152)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:152)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:152)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:152)
at com.intellij.openapi.application.impl.RwLockHolder.tryRunReadAction(RwLockHolder.kt:310)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:958)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:96)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:108)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:89)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
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: java.lang.ExceptionInInitializerError: Exception com.intellij.openapi.progress.ProcessCanceledException [in thread "JobScheduler FJ pool 0/11"]
at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.throwIfCanceled(AbstractProgressIndicatorBase.java:172)
at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.checkCanceled(AbstractProgressIndicatorBase.java:162)
at com.intellij.codeInsight.daemon.impl.DaemonProgressIndicator.checkCanceled(DaemonProgressIndicator.java:107)
at com.intellij.openapi.progress.util.ProgressWrapper.checkCanceled(ProgressWrapper.java:84)
at com.intellij.openapi.progress.impl.CoreProgressManager.doCheckCanceled(CoreProgressManager.java:166)
at com.intellij.openapi.progress.ProgressManager.checkCanceled(ProgressManager.java:333)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$IdeIOCancellationCallback.checkCancelled(ProgressManagerImpl.java:263)
at com.intellij.util.io.IOCancellationCallbackHolder.checkCancelled(IOCancellationCallbackHolder.kt:23)
at com.intellij.util.io.PersistentHashMapValueStorage.checkCancellation(PersistentHashMapValueStorage.java:686)
at com.intellij.util.io.PersistentHashMapValueStorage.readBytes(PersistentHashMapValueStorage.java:565)
at com.intellij.util.io.PersistentMapImpl.doGet(PersistentMapImpl.java:684)
at com.intellij.util.io.PersistentMapImpl.get(PersistentMapImpl.java:621)
at com.intellij.ui.svg.SvgCacheManager.loadFromCache(SvgCacheManager.kt:178)
at com.intellij.ui.svg.SvgKt.loadSvgAndCacheIfApplicable-F6nGey4(svg.kt:502)
at com.intellij.ui.icons.ImageCacheKt.doLoadByDescriptor(imageCache.kt:241)
at com.intellij.ui.icons.ImageCacheKt.loadByDescriptor(imageCache.kt:202)
at com.intellij.ui.icons.ImageCacheKt.loadImage(imageCache.kt:96)
at com.intellij.ui.icons.ImageCacheKt.loadImage$default(imageCache.kt:64)
at com.intellij.util.ImageLoader.loadFromResource(ImageLoader.kt:76)
at com.clutcher.br.<clinit>(SourceFile:14)
at com.clutcher.B.a(SourceFile:121)
at com.clutcher.B.a(SourceFile:100)
at com.clutcher.B.a(SourceFile:81)
at com.clutcher.B.a(SourceFile:1054)
at com.clutcher.C.collect(SourceFile:26)
at com.intellij.codeInsight.hints.CollectorWithSettings.collectHints(InlayHintsUtils.kt:91)
at com.intellij.codeInsight.hints.InlayHintsPass.doCollectInformation$lambda$1(InlayHintsPass.kt:60)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:139)
... 19 more
@Arianxx Annoying, that I can't test it myself(( As I understant there is 2 differences in behavior on Mac. One related to image processing for HiDPI displays, another is sequence of class loading/execution. Looks like with 2024.1.21 I resolved HiDPI stuff, but still there are issues with sequences of class loading/execution.
Can you try one more version, please? I fully rewrote that part with lazy loading and caching, hopefully it would finally fix that set of bugs and improve performance in general.
@Arianxx Annoying, that I can't test it myself(( As I understant there is 2 differences in behavior on Mac. One related to image processing for HiDPI displays, another is sequence of class loading/execution. Looks like with 2024.1.21 I resolved HiDPI stuff, but still there are issues with sequences of class loading/execution.
Can you try one more version, please? I fully rewrote that part with lazy loading and caching, hopefully it would finally fix that set of bugs and improve performance in general.
It seems this version works. Both of the complexity and highlights work normal.
Published release 2024.1.22. Would be available for update in 1-2 days.
PyCharm 2023.2.6 (Professional Edition) Build #PY-232.10300.41, built on February 14, 2024 macOS 14.4.1
com.intellij.diagnostic.PluginException: Cannot create class com.clutcher.R (classloader=PluginClassLoader(plugin=PluginDescriptor(name=Better Highlights, id=com.clutcher.comments_highlighter, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/PyCharm2023.2/plugins/better_highlights, version=2024.1.19, package=null, isBundled=false), packagePrefix=null, state=active)) at com.intellij.serviceContainer.ComponentManagerImpl.doInstantiateClass(ComponentManagerImpl.kt:1003) at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:954) at com.intellij.serviceContainer.ComponentManagerImpl.createLightService(ComponentManagerImpl.kt:933) at com.intellij.serviceContainer.ComponentManagerImpl.getOrCreateLightService(ComponentManagerImpl.kt:736) at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:688) at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:630) at com.clutcher.S.a(SourceFile:21) at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:24) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:208) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:190) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861) at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:478) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:121) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:690) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:593) at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92) Caused by: java.lang.ExceptionInInitializerError at com.clutcher.R.<init>(SourceFile:36) at com.intellij.serviceContainer.ComponentManagerImpl.doInstantiateClass(ComponentManagerImpl.kt:962) ... 44 more Caused by: java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds! at java.desktop/sun.awt.image.IntegerInterleavedRaster.getDataElements(IntegerInterleavedRaster.java:261) at java.desktop/sun.awt.image.OffScreenImageSource.sendPixels(OffScreenImageSource.java:136) at java.desktop/sun.awt.image.OffScreenImageSource.produce(OffScreenImageSource.java:187) at java.desktop/sun.awt.image.OffScreenImageSource.addConsumer(OffScreenImageSource.java:66) at java.desktop/sun.awt.image.OffScreenImageSource.startProduction(OffScreenImageSource.java:80) at java.desktop/java.awt.image.FilteredImageSource.startProduction(FilteredImageSource.java:184) at java.desktop/sun.awt.image.ImageRepresentation.startProduction(ImageRepresentation.java:728) at java.desktop/sun.awt.image.ToolkitImage.addWatcher(ToolkitImage.java:221) at java.desktop/sun.awt.image.ToolkitImage.getProperty(ToolkitImage.java:169) at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:255) at com.clutcher.P.a(SourceFile:33) at com.clutcher.P.<clinit>(SourceFile:25) ... 46 more