Exception when creating a project inside a SDK path

Hello.

I'm working on the Golang plugin and the only thing that is major and prevents a new release for it is that the IDEs will throw the following exception when creating a project inside one of the SDKs path:

my file: file:///home/florin/golang/src (70)class com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl - 1736922411; root: file:///home/florin/golang/src/untitled11 (6626)class com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl - 1709748006; equalsToParent:false; equalsToRoot:false; equalsToRootPath:false; my contentRoot: file:///home/florin/golang/src/untitled11; my sourceRoot: null; my classRoot: null; path is substring: false: my file: file:///home/florin/golang/src (70)class com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl - 1736922411; root: file:///home/florin/golang/src/untitled11 (6626)class com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl - 1709748006; equalsToParent:false; equalsToRoot:false; equalsToRootPath:false; my contentRoot: file:///home/florin/golang/src/untitled11; my sourceRoot: null; my classRoot: null; path is substring: false
java.lang.AssertionError: my file: file:///home/florin/golang/src (70)class com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl - 1736922411; root: file:///home/florin/golang/src/untitled11 (6626)class com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl - 1709748006; equalsToParent:false; equalsToRoot:false; equalsToRootPath:false; my contentRoot: file:///home/florin/golang/src/untitled11; my sourceRoot: null; my classRoot: null; path is substring: false
at com.intellij.openapi.roots.impl.DirectoryIndexImpl.a(DirectoryIndexImpl.java:1628)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl.access$1600(DirectoryIndexImpl.java:64)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState.a(DirectoryIndexImpl.java:926)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState.access$4900(DirectoryIndexImpl.java:753)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState$4.visitFile(DirectoryIndexImpl.java:1138)
at com.intellij.openapi.vfs.VirtualFileVisitor.visitFileEx(VirtualFileVisitor.java:124)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:246)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:278)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState.a(DirectoryIndexImpl.java:1122)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState.a(DirectoryIndexImpl.java:1107)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState.a(DirectoryIndexImpl.java:1407)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState.access$4000(DirectoryIndexImpl.java:753)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl.e(DirectoryIndexImpl.java:586)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl.access$1200(DirectoryIndexImpl.java:64)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$5.rootsChanged(DirectoryIndexImpl.java:155)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:114)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:228)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:234)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:219)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:216)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:209)
at com.intellij.util.messages.impl.MessageBusImpl.access$000(MessageBusImpl.java:43)
at com.intellij.util.messages.impl.MessageBusImpl$1.invoke(MessageBusImpl.java:131)
at com.sun.proxy.$Proxy62.rootsChanged(Unknown Source)
at com.intellij.openapi.roots.impl.ProjectRootManagerComponent.fireRootsChangedEvent(ProjectRootManagerComponent.java:207)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.b(ProjectRootManagerImpl.java:420)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.access$100(ProjectRootManagerImpl.java:56)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl$BatchSession.a(ProjectRootManagerImpl.java:108)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl$BatchSession.rootsChanged(ProjectRootManagerImpl.java:121)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.mergeRootsChangesDuring(ProjectRootManagerImpl.java:331)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.setProjectSdk(ProjectRootManagerImpl.java:237)
at ro.redeul.google.go.template.GoApplicationGenerator$2$1.run(GoApplicationGenerator.java:138)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:997)
at ro.redeul.google.go.template.GoApplicationGenerator$2.run(GoApplicationGenerator.java:88)
at com.intellij.ide.startup.impl.StartupManagerImpl$7.run(StartupManagerImpl.java:286)
at com.intellij.ide.startup.impl.StartupManagerImpl$8.run(StartupManagerImpl.java:297)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:1999)
at com.intellij.ide.startup.impl.StartupManagerImpl.runWhenProjectIsInitialized(StartupManagerImpl.java:294)
at ro.redeul.google.go.template.GoApplicationGenerator.generateProject(GoApplicationGenerator.java:86)
at com.intellij.platform.NewDirectoryProjectAction$2.projectOpened(NewDirectoryProjectAction.java:104)
at com.intellij.platform.PlatformProjectOpenProcessor.doOpenProject(PlatformProjectOpenProcessor.java:191)
at com.intellij.platform.NewDirectoryProjectAction.generateProject(NewDirectoryProjectAction.java:100)
at com.intellij.platform.NewDirectoryProjectAction.actionPerformed(NewDirectoryProjectAction.java:52)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162)
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:170)
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:133)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:311)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:696)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)


It happens for both IDEA and PHPStorm IDEs.
Unfortunately, due to the nature of golang and the paths that we need to work with, the above situation is a very common one.

The issue is opened here: https://github.com/mtoader/google-go-lang-idea-plugin/issues/441 and it's a sum of about 5-10 other issues.

The strange part is that this doesn't happen when running the IDE in slave mode from IDEA but only in standalone mode.

Is this really something we are doing wrong or should I open a ticket for it?


Kind regards,
Florin

1 comment
Comment actions Permalink

So, I've found out why this happens.
Turns out the SDK was setting the the path as OrderRootType.SOURCES which was rendering the error.
It would still be nice to know why the exception isn't triggered in slave mode.

0

Please sign in to leave a comment.