jvolkman / intellij-protobuf-editor

Protocol Buffers for IntelliJ-based IDEs
Apache License 2.0
122 stars 15 forks source link

error occurs when starting GoLand after Protocol Buffer Editor is installed #65

Closed xuyifangreeneyes closed 3 years ago

xuyifangreeneyes commented 3 years ago

OS: macOS 11.2.1 GoLand Version: GoLand 2021.1 Build #GO-211.6693.119

After I installed Protocol Buffer Editor and clicked Apply, GoLand seems stuck. When I tried to restart GoLand, it cannot open a project normally. So I look into log.txt.

2021-04-12 12:04:51.669 goland[2145:39568] allVms required 1.8*,1.8+
2021-04-12 12:04:51.671 goland[2145:39571] Current Directory: /Applications/GoLand.app/Contents/MacOS
2021-04-12 12:04:51.671 goland[2145:39571] Value of GOLAND_VM_OPTIONS is (null)
2021-04-12 12:04:51.671 goland[2145:39571] Processing VMOptions file at /Users/xuyifan/Library/Application Support/JetBrains/GoLand2021.1/goland.vmoptions
2021-04-12 12:04:51.671 goland[2145:39571] Done
Dynamic Code Evolution 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2021-04-12 12:04:54,992 [   2937]  ERROR - Types.impl.FileTypeManagerImpl - Trying to override already registered file type 'protobuf' [Plugin: idea.plugin.protoeditor] 
com.intellij.diagnostic.PluginException: Trying to override already registered file type 'protobuf' [Plugin: idea.plugin.protoeditor]
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.loadFileTypeBeans(FileTypeManagerImpl.java:342)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.initStandardFileTypes(FileTypeManagerImpl.java:233)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.<init>(FileTypeManagerImpl.java:178)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:47)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:771)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:64)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:57)
    at com.intellij.serviceContainer.ComponentManagerImpl$preloadServices$future$1.run(ComponentManagerImpl.kt:906)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:187)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)
2021-04-12 12:04:55,000 [   2945]  ERROR - Types.impl.FileTypeManagerImpl - GoLand 2021.1  Build #GO-211.6693.119 
2021-04-12 12:04:55,003 [   2948]  ERROR - Types.impl.FileTypeManagerImpl - JDK: 11.0.10; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-04-12 12:04:55,004 [   2949]  ERROR - Types.impl.FileTypeManagerImpl - OS: Mac OS X 
2021-04-12 12:04:55,005 [   2950]  ERROR - Types.impl.FileTypeManagerImpl - Plugin to blame: Protocol Buffer Editor version: 2.3.1 
2021-04-12 12:04:55,005 [   2950]  ERROR - Types.impl.FileTypeManagerImpl - Trying to override already registered file type 'prototext' [Plugin: idea.plugin.protoeditor] 
com.intellij.diagnostic.PluginException: Trying to override already registered file type 'prototext' [Plugin: idea.plugin.protoeditor]
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.loadFileTypeBeans(FileTypeManagerImpl.java:342)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.initStandardFileTypes(FileTypeManagerImpl.java:233)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.<init>(FileTypeManagerImpl.java:178)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:47)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:771)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:64)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:57)
    at com.intellij.serviceContainer.ComponentManagerImpl$preloadServices$future$1.run(ComponentManagerImpl.kt:906)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:187)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)

It seems that I registered file type 'protobuf' twice by mistake. I think this is a bug because registering file type 'protobuf' twice should be forbidden rather than makes IDE crash but I have no idea whether the bug belongs to GoLand or the plugin. Can you give some help? thanks a lot.

jvolkman commented 3 years ago

Did you install other protobuf plugins? I just became aware of two other forks of this plugin in the marketplace that are likely to conflict. I'm not sure of a solution other than picking one and uninstalling the others.

This plugin is https://plugins.jetbrains.com/plugin/14004-protocol-buffer-editor

The other two are: https://plugins.jetbrains.com/plugin/16422-protobuf https://plugins.jetbrains.com/plugin/16228-protobuf-support

jvolkman commented 3 years ago

Found IDEA-266005 which is tracking this issue.

jvolkman commented 3 years ago

Also found GO-10881 with a screenshot where the IDE suggests installing two protobuf editors by default. Unfortunate, as this suggestion is out of my control (as far as I know) and results in these issues for people.

xuyifangreeneyes commented 3 years ago

I installed both https://plugins.jetbrains.com/plugin/14004-protocol-buffer-editor and https://plugins.jetbrains.com/plugin/16228-protobuf-support. I just removed some config files and re-installed GoLand yesterday. It seems that IDEA-266448 has a better way to solve the problem. Thanks a lot for your help.

jvolkman commented 3 years ago

I'm going to leave this open for the time being in case others run into the same problem.

jvolkman commented 3 years ago

Seems this has cleared up now.