Azn9 / JetBrains-Discord-Integration

Discord rich presence integration for all JetBrains IDEs
Apache License 2.0
142 stars 9 forks source link

Exception on project startup #23

Closed richmondb closed 1 year ago

richmondb commented 1 year ago

On version 2.0.2, running Phpstorm 2023.2.2 on linux. I've checked the discord and it still working as expected just wanna put it here upon opening a project an exception occurs as describe here:

java.lang.Throwable: Must be precomputed at com.intellij.openapi.diagnostic.Logger.error(Logger.java:370) at com.intellij.ui.scale.JBUIScale.computeSystemScaleFactor(JBUIScale.kt:188) at com.intellij.ui.scale.JBUIScale$systemScaleFactor$1.invoke(JBUIScale.kt:67) at com.intellij.ui.scale.JBUIScale$systemScaleFactor$1.invoke(JBUIScale.kt:66) at com.intellij.util.concurrency.SynchronizedClearableLazy._get_value_$lambda$1$lambda$0(SynchronizedClearableLazy.kt:41) at java.base/java.util.concurrent.atomic.AtomicReference.updateAndGet(AtomicReference.java:210) at com.intellij.util.concurrency.SynchronizedClearableLazy.getValue(SynchronizedClearableLazy.kt:40) at com.intellij.ui.scale.JBUIScale$userScaleFactor$1.invoke(JBUIScale.kt:42) at com.intellij.ui.scale.JBUIScale$userScaleFactor$1.invoke(JBUIScale.kt:41) at com.intellij.util.concurrency.SynchronizedClearableLazy._get_value_$lambda$1$lambda$0(SynchronizedClearableLazy.kt:41) at java.base/java.util.concurrent.atomic.AtomicReference.updateAndGet(AtomicReference.java:210) at com.intellij.util.concurrency.SynchronizedClearableLazy.getValue(SynchronizedClearableLazy.kt:40) at com.intellij.ui.scale.JBUIScale.scale(JBUIScale.kt:337) at com.intellij.ui.scale.UserScaleContext.<init>(UserScaleContext.java:23) at com.intellij.ui.scale.ScaleContext.<init>(ScaleContext.kt:86) at com.intellij.ui.scale.ScaleContext$Companion.create(ScaleContext.kt:80) at com.intellij.ui.icons.CachedImageIcon.<init>(CachedImageIcon.kt:75) at com.intellij.ui.icons.CachedImageIcon.<init>(CachedImageIcon.kt:101) at com.intellij.ui.icons.CoreIconManager.loadRasterizedIcon(CoreIconManager.kt:107) at com.intellij.icons.AllIcons.load(AllIcons.java:17) at com.intellij.icons.AllIcons.<clinit>(AllIcons.java:698) at com.intellij.icons.AllIcons$General.<clinit>(AllIcons.java:427) at com.almightyalpaca.jetbrains.plugins.discord.plugin.settings.options.types.TemplateOption.<init>(TemplateOption.kt:43) at com.almightyalpaca.jetbrains.plugins.discord.plugin.settings.options.types.TemplateOptionKt.template(TemplateOption.kt:39) at com.almightyalpaca.jetbrains.plugins.discord.plugin.settings.impl.ApplicationSettingsImpl.<init>(ApplicationSettingsImpl.kt:59) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:63) at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:1011) at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:47) at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:43) at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:158) at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:137) at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:94) at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:676) at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:630) at com.almightyalpaca.jetbrains.plugins.discord.plugin.settings.ApplicationSettingsKt.getSettings(ApplicationSettings.kt:84) at com.almightyalpaca.jetbrains.plugins.discord.plugin.time.TimeService.load(TimeService.kt:212) at com.almightyalpaca.jetbrains.plugins.discord.plugin.time.TimePreloadingActivity.preload(TimePreloadingActivity.kt:25) at com.intellij.openapi.application.PreloadingActivity$execute$2.invoke(PreloadingActivity.kt:15) at com.intellij.openapi.application.PreloadingActivity$execute$2.invoke(PreloadingActivity.kt:14) at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:248) at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:199) at com.intellij.openapi.application.PreloadingActivity.execute$suspendImpl(PreloadingActivity.kt:14) at com.intellij.openapi.application.PreloadingActivity.execute(PreloadingActivity.kt) at com.intellij.ide.bootstrap.AppServicePreloadingKt.executePreloadActivity(appServicePreloading.kt:167) at com.intellij.ide.bootstrap.AppServicePreloadingKt.access$executePreloadActivity(appServicePreloading.kt:1) at com.intellij.ide.bootstrap.AppServicePreloadingKt$postAppRegistered$4$1$1.invokeSuspend(appServicePreloading.kt:155) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Azn9 commented 1 year ago

This appears to be an issue with 2023.2.X versions of some Jetbrains IDEs. I will look into adding a check to avoid the red error but I can't do better :/