FalsePattern / ZigBrains

The zig language plugin for intellij
https://falsepattern.com/zigbrains
Other
121 stars 9 forks source link

Clion 2023.2.1 - Startup crash #12

Closed artronics closed 1 year ago

artronics commented 1 year ago

Thank you for creating this plugin. New update works on IntelliJ however, Clion crashes during start-up. I've already opened a support request with Jetbrains, because I can't remove the plugin and revert back to original state. This is the stack-trace that I'm getting:

Your JRE: 17.0.8+7-b1000.8 aarch64 (JetBrains s.r.o.) Apple M1 Clion 2023.2.1

Internal error. Please refer to https://jb.gg/ide/critical-startup-errors

java.lang.ExceptionInInitializerError
    at com.falsepattern.zigbrains.zig.ZigFileType.<init>(ZigFileType.java:30)
    at com.falsepattern.zigbrains.zig.ZigFileType.<clinit>(ZigFileType.java:27)
    at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
    at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1155)
    at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:42)
    at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:185)
    at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1132)
    at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1113)
    at java.base/java.lang.reflect.Field.get(Field.java:425)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.instantiateFileTypeBean(FileTypeManagerImpl.java:495)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.mergeOrInstantiateFileTypeBean(FileTypeManagerImpl.java:464)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.instantiatePendingFileTypes(FileTypeManagerImpl.java:457)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.initializeComponent(FileTypeManagerImpl.java:588)
    at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:133)
    at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:48)
    at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:577)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:51)
    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.access$createInstance(BaseComponentAdapter.kt:21)
    at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invokeSuspend(BaseComponentAdapter.kt:185)
    at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
    at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
    at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceAsync(BaseComponentAdapter.kt:180)
    at com.intellij.serviceContainer.ComponentManagerImpl.getServiceAsyncIfDefined(ComponentManagerImpl.kt:646)
    at com.intellij.serviceContainer.ComponentManagerImpl.getServiceAsync(ComponentManagerImpl.kt:637)
    at com.intellij.ide.bootstrap.AppServicePreloadingKt$postAppRegistered$1$1$1.invokeSuspend(appServicePreloading.kt:179)
    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)
Caused by: com.intellij.diagnostic.ImplementationConflictException: Language with ID 'Zig' is already registered: class org.ziglang.jb.ZigLang. Conflicting plugins: [com.falsepattern.zigbrains, org.ziglang.jb]
    at com.intellij.lang.Language.<init>(Language.java:89)
    at com.intellij.lang.Language.<init>(Language.java:65)
    at com.intellij.lang.Language.<init>(Language.java:61)
    at com.falsepattern.zigbrains.zig.ZigLanguage.<init>(ZigLanguage.java:25)
    at com.falsepattern.zigbrains.zig.ZigLanguage.<clinit>(ZigLanguage.java:22)
    ... 37 more

-----
Your JRE: 17.0.8+7-b1000.8 aarch64 (JetBrains s.r.o.)
/Users/jalal/Applications/CLion.app/Contents/jbr/Contents/Home
FalsePattern commented 1 year ago

ZigBrains is incompatible with other zig language plugins. Go into your plugins folder, and remove the other zig plugin.

FalsePattern commented 1 year ago

https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#plugins-directory

artronics commented 1 year ago

Thanks it worked. Jetbrains support also mentioned the problem was caused by another incompatible zig plugins. I close this issue.