minecraft-dev / MinecraftDev

Plugin for IntelliJ IDEA that gives special support for Minecraft modding projects.
https://minecraftdev.org/
GNU Lesser General Public License v3.0
1.52k stars 186 forks source link

Error on startup #2360

Closed DaisyDogs07 closed 2 months ago

DaisyDogs07 commented 3 months ago

Minecraft Development for IntelliJ plugin version

2024.2-1.8.1

IntelliJ version

IntelliJ IDEA 2024.2.0.1 (Community Edition)

Operating System

Windows 11 22H2 22621.4037

Target platform

No response

Description of the bug

Please note that this isn't consistently reproduceable. I've only gotten this error twice in a couple weeks.

The only info I can give is that it happens on startup.

Here's the error:

java.lang.Throwable: com.demonwav.mcdev.platform.adventure.framework.AdventureLibraryKindKt <clinit> requests com.intellij.openapi.roots.libraries.LibraryKindRegistry instance. Class initialization must not depend on services. Consider using instance of the service on-demand instead.
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
    at com.intellij.serviceContainer.ComponentManagerImplKt.checkOutsideClassInitializer(ComponentManagerImpl.kt:1588)
    at com.intellij.serviceContainer.ComponentManagerImplKt.getOrCreateInstanceBlocking(ComponentManagerImpl.kt:1557)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:746)
    at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:690)
    at com.intellij.openapi.roots.libraries.LibraryKindRegistry$Companion.getInstance(LibraryKindRegistry.kt:9)
    at com.demonwav.mcdev.util.UtilsKt.libraryKind(utils.kt:359)
    at com.demonwav.mcdev.platform.adventure.framework.AdventureLibraryKindKt.<clinit>(AdventureLibraryKind.kt:26)
    at com.demonwav.mcdev.platform.adventure.framework.AdventurePresentationProvider.<init>(AdventurePresentationProvider.kt:33)
    at com.intellij.serviceContainer.ComponentManagerImpl.findConstructorAndInstantiateClass(ComponentManagerImpl.kt:900)
    at com.intellij.serviceContainer.ComponentManagerImpl.doInstantiateClass(ComponentManagerImpl.kt:909)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:894)
    at com.intellij.openapi.extensions.impl.SimpleConstructorInjectionAdapter.instantiateClass(XmlExtensionAdapter.kt:103)
    at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.doCreateInstance(XmlExtensionAdapter.kt:52)
    at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.createInstance(XmlExtensionAdapter.kt:33)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapter(ExtensionPointImpl.kt:403)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.createExtensionInstances(ExtensionPointImpl.kt:376)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.getExtensionList(ExtensionPointImpl.kt:222)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.getExtensions(ExtensionPointImpl.kt:237)
    at com.intellij.openapi.extensions.ExtensionPointName.getExtensions(ExtensionPointName.kt:51)
    at com.intellij.openapi.roots.impl.libraries.LibraryDetectionManagerImpl.computeKinds(LibraryDetectionManagerImpl.java:65)
    at com.intellij.openapi.roots.impl.libraries.LibraryDetectionManagerImpl.getOrComputeKinds(LibraryDetectionManagerImpl.java:56)
    at com.intellij.openapi.roots.impl.libraries.LibraryDetectionManagerImpl.processProperties(LibraryDetectionManagerImpl.java:29)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener.processLibraryMinecraftPlatformKinds(MinecraftFacetDetector.kt:251)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener.access$processLibraryMinecraftPlatformKinds(MinecraftFacetDetector.kt:86)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener$autoDetectTypes$1.invoke(MinecraftFacetDetector.kt:191)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener$autoDetectTypes$1.invoke(MinecraftFacetDetector.kt:190)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener.autoDetectTypes$lambda$3(MinecraftFacetDetector.kt:190)
    at com.intellij.openapi.roots.impl.OrderEnumeratorBase.lambda$forEachLibrary$1(OrderEnumeratorBase.java:345)
    at com.intellij.openapi.roots.impl.OrderEnumeratorBase.processEntries(OrderEnumeratorBase.java:308)
    at com.intellij.openapi.roots.impl.ModuleOrderEnumerator.forEach(ModuleOrderEnumerator.java:34)
    at com.intellij.openapi.roots.impl.OrderEnumeratorBase.forEachLibrary(OrderEnumeratorBase.java:341)
    at com.intellij.openapi.roots.impl.ModuleOrderEnumerator.forEachLibrary(ModuleOrderEnumerator.java:17)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener.autoDetectTypes(MinecraftFacetDetector.kt:190)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener.checkExistingFacet(MinecraftFacetDetector.kt:162)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener.access$checkExistingFacet(MinecraftFacetDetector.kt:86)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener$doCheck$2.invokeSuspend(MinecraftFacetDetector.kt:121)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener$doCheck$2.invoke(MinecraftFacetDetector.kt)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener$doCheck$2.invoke(MinecraftFacetDetector.kt)
    at com.intellij.platform.util.progress.StepsKt$forEachWithProgress$2$1$1.invokeSuspend(steps.kt:155)
    at com.intellij.platform.util.progress.StepsKt$forEachWithProgress$2$1$1.invoke(steps.kt)
    at com.intellij.platform.util.progress.StepsKt$forEachWithProgress$2$1$1.invoke(steps.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
    at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
    at com.intellij.platform.util.progress.SequentialProgressReporterImpl.sizedStep(SequentialProgressReporterImpl.kt:62)
    at com.intellij.platform.util.progress.SequentialProgressReporter.itemStep$suspendImpl(SequentialProgressReporter.kt:112)
    at com.intellij.platform.util.progress.SequentialProgressReporter.itemStep(SequentialProgressReporter.kt)
    at com.intellij.platform.util.progress.SequentialProgressReporter.itemStep$default(SequentialProgressReporter.kt:111)
    at com.intellij.platform.util.progress.StepsKt.forEachWithProgress(steps.kt:154)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener.doCheck(MinecraftFacetDetector.kt:114)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener$doCheckUnderProgress$2.invokeSuspend(MinecraftFacetDetector.kt:105)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener$doCheckUnderProgress$2.invoke(MinecraftFacetDetector.kt)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener$doCheckUnderProgress$2.invoke(MinecraftFacetDetector.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
    at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
    at com.intellij.platform.util.progress.ProgressPipeImpl.collectProgressUpdates(ProgressPipe.kt:43)
    at com.intellij.openapi.progress.impl.PlatformTaskSupport$withBackgroundProgressInternal$2.invokeSuspend(PlatformTaskSupport.kt:82)
    at com.intellij.openapi.progress.impl.PlatformTaskSupport$withBackgroundProgressInternal$2.invoke(PlatformTaskSupport.kt)
    at com.intellij.openapi.progress.impl.PlatformTaskSupport$withBackgroundProgressInternal$2.invoke(PlatformTaskSupport.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
    at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
    at com.intellij.openapi.progress.impl.PlatformTaskSupport.withBackgroundProgressInternal(PlatformTaskSupport.kt:76)
    at com.intellij.platform.ide.progress.TasksKt.withBackgroundProgress(tasks.kt:56)
    at com.intellij.platform.ide.progress.TasksKt.withBackgroundProgress(tasks.kt:31)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector$MinecraftModuleRootListener.doCheckUnderProgress(MinecraftFacetDetector.kt:100)
    at com.demonwav.mcdev.facet.MinecraftFacetDetector.execute(MinecraftFacetDetector.kt:76)
    at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:496)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
rlnt commented 2 months ago

Can confirm on the new IDEA 2024.2.1 update as well.

Xelbayria commented 2 months ago

Confirmed this on IDEA 2024.2 Community Edition. I also have an issue with a library of Minecraft missing on FABRIC side. I can't resolve this with varying methods.

I'm trying to find out what's the cause of this. I had no problem with the current version of Minecraft Development (MD plugin) Until today.