Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.1.4 NPEs, Freezes, ISEs #18

Closed
Noam-Dori opened this issue Oct 31, 2019 · 12 comments
Closed

0.1.4 NPEs, Freezes, ISEs #18

Noam-Dori opened this issue Oct 31, 2019 · 12 comments
Assignees
Labels
bug Something isn't working
Projects
Milestone

Comments

@Noam-Dori
Copy link
Owner

If you encountered any NullPointerExceptions, IllegalStateExceptions that were raised in the log, please report them here, along with a stack trace and the action you were doing.

If your IDE happens to freeze, please use this guide to get a thread dump (like a stack trace, but for freezes), and if it is caused by this plugin, please report it here as well (with your thread dump attached).

@Noam-Dori Noam-Dori added the bug Something isn't working label Oct 31, 2019
@Noam-Dori Noam-Dori self-assigned this Oct 31, 2019
This was referenced Oct 31, 2019
@Noam-Dori Noam-Dori added this to the 0.1.5 milestone Oct 31, 2019
@Noam-Dori
Copy link
Owner Author

some sort of weirdness is happening that prevents a lot things in this new version:

java.lang.Throwable: It's prohibited to access index during event dispatching
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
	at com.intellij.openapi.project.NoAccessDuringPsiEvents.checkCallContext(NoAccessDuringPsiEvents.java:39)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:736)
	at com.intellij.util.indexing.FileBasedIndexImpl.processExceptions(FileBasedIndexImpl.java:907)
	at com.intellij.util.indexing.FileBasedIndexImpl.processValueIterator(FileBasedIndexImpl.java:983)
	at com.intellij.util.indexing.FileBasedIndexImpl.processValuesInScope(FileBasedIndexImpl.java:954)
	at com.intellij.util.indexing.FileBasedIndexImpl.processValues(FileBasedIndexImpl.java:851)
	at com.intellij.psi.search.FileNameIndexServiceImpl.getVirtualFilesByName(FileNameIndexServiceImpl.java:27)
	at com.intellij.psi.search.FilenameIndex.processFilesByName(FilenameIndex.java:87)
	at com.intellij.psi.search.FilenameIndex.processFilesByName(FilenameIndex.java:74)
	at com.intellij.psi.search.FilenameIndex.getFilesByName(FilenameIndex.java:145)
	at com.intellij.psi.search.FilenameIndex.getFilesByName(FilenameIndex.java:65)
	at ros.integrate.workspace.ROSPackageFinderBase.lambda$investigate$5(ROSPackageFinderBase.java:92)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.TreeMap$KeySpliterator.forEachRemaining(TreeMap.java:2739)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at ros.integrate.workspace.ROSPackageFinderBase.investigate(ROSPackageFinderBase.java:93)
	at ros.integrate.workspace.ROSPackageManagerImpl.applyChangesToOrphans(ROSPackageManagerImpl.java:118)
	at ros.integrate.workspace.ROSPackageManagerImpl.doBulkFileChangeEvents(ROSPackageManagerImpl.java:110)
	at ros.integrate.workspace.ROSPackageManagerImpl.access$300(ROSPackageManagerImpl.java:25)
	at ros.integrate.workspace.ROSPackageManagerImpl$1.after(ROSPackageManagerImpl.java:60)
	at jdk.internal.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:513)
	at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:142)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:438)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:398)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:388)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:370)
	at com.intellij.util.messages.impl.MessageBusImpl.lambda$createTopicHandler$1(MessageBusImpl.java:241)
	at com.sun.proxy.$Proxy40.modificationCountChanged(Unknown Source)
	at com.intellij.psi.impl.PsiModificationTrackerImpl.fireEvent(PsiModificationTrackerImpl.java:70)
	at com.intellij.psi.impl.PsiModificationTrackerImpl.incCountersInner(PsiModificationTrackerImpl.java:75)
	at com.intellij.psi.impl.PsiModificationTrackerImpl.incOutOfCodeBlockModificationCounter(PsiModificationTrackerImpl.java:65)
	at com.jetbrains.cidr.lang.symbols.symtable.FileSymbolTablesCache$1.incModificationCount(FileSymbolTablesCache.java:130)
	at com.jetbrains.cidr.lang.symbols.symtable.FileSymbolTablesCache$3.done(FileSymbolTablesCache.java:205)
	at com.jetbrains.cidr.VirtualFileChangeListener.after(VirtualFileChangeListener.kt:76)
	at jdk.internal.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:513)
	at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:142)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:438)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:398)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:388)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:370)
	at com.intellij.util.messages.impl.MessageBusImpl.lambda$createTopicHandler$1(MessageBusImpl.java:241)
	at com.sun.proxy.$Proxy21.fileWithNoDocumentChanged(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.multiCast(FileDocumentManagerImpl.java:162)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$new$0(FileDocumentManagerImpl.java:125)
	at com.sun.proxy.$Proxy21.fileWithNoDocumentChanged(Unknown Source)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.contentsChanged(FileDocumentManagerImpl.java:690)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$MyAsyncFileListener$1.afterVfsChange(FileDocumentManagerImpl.java:655)
	at com.intellij.openapi.vfs.newvfs.AsyncEventSupport.afterVfsChange(AsyncEventSupport.java:109)
	at com.intellij.openapi.vfs.newvfs.AsyncEventSupport.access$200(AsyncEventSupport.java:27)
	at com.intellij.openapi.vfs.newvfs.AsyncEventSupport$1.after(AsyncEventSupport.java:53)
	at jdk.internal.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:513)
	at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:142)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:438)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:398)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:388)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:372)
	at com.intellij.util.messages.impl.MessageBusImpl.lambda$createTopicHandler$1(MessageBusImpl.java:241)
	at com.sun.proxy.$Proxy124.after(Unknown Source)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl$2.close(PersistentFSImpl.java:661)
	at java.base/sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:341)
	at java.base/sun.nio.cs.StreamEncoder.close(StreamEncoder.java:161)
	at java.base/java.io.OutputStreamWriter.close(OutputStreamWriter.java:258)
	at java.base/java.io.BufferedWriter.close(BufferedWriter.java:269)
	at kotlin.io.CloseableKt.closeFinally(Closeable.kt:53)
	at com.intellij.configurationStore.StringDataWriter.write(XmlElementStorage.kt:419)
	at com.intellij.configurationStore.DataWriter$DefaultImpls.write$default(XmlElementStorage.kt:400)
	at com.intellij.configurationStore.FileBasedStorageKt.doWrite(FileBasedStorage.kt:329)
	at com.intellij.configurationStore.FileBasedStorageKt.writeFile(FileBasedStorage.kt:281)
	at com.intellij.configurationStore.FileBasedStorage$FileSaveSession.saveLocally(FileBasedStorage.kt:113)
	at com.intellij.configurationStore.XmlElementStorage$XmlElementStorageSaveSession$SaveExecutor.save(XmlElementStorage.kt:164)
	at com.intellij.configurationStore.SaveExecutorKt.executeSave(SaveExecutor.kt:90)
	at com.intellij.configurationStore.SaveExecutorKt.saveSessions(SaveExecutor.kt:84)
	at com.intellij.configurationStore.ProjectSaveSessionProducerManager$saveWithAdditionalSaveSessions$$inlined$withEdtContext$1$lambda$1.compute(actions.kt:81)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runWriteAction$11(ApplicationImpl.java:894)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:873)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:894)
	at com.intellij.configurationStore.ProjectSaveSessionProducerManager$saveWithAdditionalSaveSessions$$inlined$withEdtContext$1.invokeSuspend(ComponentStoreImpl.kt:655)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:238)
	at com.intellij.configurationStore.EdtPoolDispatcherManager.processQueue(EdtPoolDispatcher.kt:54)
	at com.intellij.configurationStore.EdtPoolDispatcherManager.access$processQueue(EdtPoolDispatcher.kt:18)
	at com.intellij.configurationStore.EdtPoolDispatcherManager$scheduleFlush$1.invoke(EdtPoolDispatcher.kt:32)
	at com.intellij.configurationStore.EdtPoolDispatcherManager$scheduleFlush$1.invoke(EdtPoolDispatcher.kt:18)
	at com.intellij.configurationStore.EdtPoolDispatcherKt$sam$java_lang_Runnable$0.run(EdtPoolDispatcher.kt)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:309)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:906)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:779)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:422)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:421)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Another NPE is now popping up when trying to resolve links in linux:

java.lang.NullPointerException
	at java.base/java.util.Objects.requireNonNull(Objects.java:221)
	at ros.integrate.pkt.ROSMsgFileReference.multiResolve(ROSMsgFileReference.java:56)
	at ros.integrate.pkt.ROSMsgFileReference.resolve(ROSMsgFileReference.java:68)
	at ros.integrate.pkt.ROSMsgFileReference.resolve(ROSMsgFileReference.java:28)
	at com.intellij.ide.actions.CopyReferenceUtil.elementToFqn(CopyReferenceUtil.java:145)
	at com.intellij.ide.actions.CopyTBXReferenceAction.createJetbrainsLink(CopyTBXReferenceAction.kt:44)
	at com.intellij.ide.actions.CopyTBXReferenceProvider.getQualifiedName(CopyPathProvider.kt:116)
	at com.intellij.ide.actions.CopyPathProvider.update(CopyPathProvider.kt:31)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:177)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:444)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$null$1(ActionUpdater.java:93)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:130)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$2(ActionUpdater.java:94)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:427)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:290)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$19(ActionUpdater.java:270)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1697)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:270)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:319)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$19(ActionUpdater.java:270)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1697)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:270)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:181)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:155)
	at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:61)
	at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:52)
	at com.intellij.ide.actions.CopyReferencePopup.update(CopyReferencePopup.java:46)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:177)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:444)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$null$1(ActionUpdater.java:93)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:130)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$2(ActionUpdater.java:94)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:427)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:290)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$19(ActionUpdater.java:270)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1697)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:270)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:319)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$19(ActionUpdater.java:270)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1697)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:270)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:181)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:155)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupWithTimeout$11(ActionUpdater.java:197)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$3(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.withTimeout(ProgressIndicatorUtils.java:277)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroupWithTimeout(ActionUpdater.java:197)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroupWithTimeout(ActionUpdater.java:189)
	at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:101)
	at com.intellij.openapi.actionSystem.impl.ActionMenu.fillMenu(ActionMenu.java:312)
	at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:270)
	at java.desktop/javax.swing.JMenu.fireMenuSelected(JMenu.java:1036)
	at java.desktop/javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1116)
	at java.desktop/javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:352)
	at java.desktop/javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:234)
	at java.desktop/javax.swing.JMenu.setSelected(JMenu.java:291)
	at java.desktop/javax.swing.JMenu.menuSelectionChanged(JMenu.java:1187)
	at com.intellij.openapi.actionSystem.impl.ActionMenu.menuSelectionChanged(ActionMenu.java:202)
	at java.desktop/javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:129)
	at java.desktop/javax.swing.plaf.basic.BasicMenuUI$Handler.mousePressed(BasicMenuUI.java:508)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6416)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4544)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:906)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:844)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:776)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:422)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:421)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90

@Noam-Dori
Copy link
Owner Author

Noam-Dori commented Nov 3, 2019

The errors above do not happen on the intelliJ platform version 2019.2.*
I specfically checked on 2019.2.3

Issue happens on the latest EAPs for CLion & IntelliJ IDEA (193.4932).
Working on fix.

Noam-Dori added a commit that referenced this issue Nov 8, 2019
and fixed no access during dispatch exception (#18).
Also added the option to switch between EAP sandbox and normal sandbox.
@Noam-Dori
Copy link
Owner Author

seems like in the EAP after 193.4932 (IC-193.5096), the log error still occurs, but the indexing still properly functions. In any case, the commit above fixes the log and any possible indexing issue in the future.

Noam-Dori added a commit that referenced this issue Nov 8, 2019
II. package.xml files can now be excluded using an intention and from the ROS settings.
this action has two ways to be undone - from the ROS settings and the complement "undo include" intention.
Both actions have complete descriptions.
Many more small yet internal changes were also done.

Signed-off-by: Noam Dori <TheNODO55@gmail.com>
@peci1
Copy link
Contributor

peci1 commented Feb 15, 2020

Have a look at https://youtrack.jetbrains.com/issue/CPP-19104 . I'm now pretty much convinced that this plugin is what causes the slowness and constant searching for files to index. What's more interesting - the project with which to problem manifests is not a ROS project.

@Noam-Dori
Copy link
Owner Author

Noam-Dori commented Feb 15, 2020

reading your .idea file and the ticket you opened, it seems you have a lot of package paths in the "additional package paths" settings (40 paths to be exact), some include things that shouldn't be there like the compiled ROS path (which is already covered by ros path).
Other than the actual ROS path, I also see 5 workspaces in there.
In order to find all possible packages for use, the plugin runs a recursive filesystem lookup on all paths specified both in the "workspace" setting and the "additional package paths" setting. Seems like the plugin cannot handle indexing all of those paths.
If you empty the setting "additional package paths" comepletely, it should solve the problem. Let me know if that worked out for you!

@peci1
Copy link
Contributor

peci1 commented Feb 15, 2020

Hmm, what do you mean by "compiled ros path" in my ROS_PACKAGE_PATH? I don't see any build/devel paths there.

The elevation_mapping and mapper workspaces are built with catkin tools, while the rest of the workspace is built with catkin_make. The thing with catkin_tools is that they will eventually add the path to every single package to ROS_PACKAGE_PATH. And this is something this plugin has to cope with.

Here's an example of ROS_PACKAGE_PATH from our robots, where we build the whole workspace with catkin tools:

/home/robot/workspace/cras_subt/src/tradr-resources/adaptive_traversability_joy:/home/robot/workspace/cras_subt/src/apriltag:/home/robot/workspace/cras_subt/src/apriltag_ros/apriltag_ros:/home/robot/workspace/cras_subt/src/artifact_detection:/home/robot/workspace/cras_subt/src/bag_crawler:/home/robot/workspace/cras_subt/src/camera1394:/home/robot/workspace/cras_subt/src/camera_base:/home/robot/workspace/cras_subt/src/catch_ros:/home/robot/workspace/cras_subt/src/catkin_boost_python_buildtool/catkin_boost_python_buildtool:/home/robot/workspace/cras_subt/src/catkin_simple:/home/robot/workspace/cras_subt/src/catkin_boost_python_buildtool/catkin_boost_python_buildtool_test:/home/robot/workspace/cras_subt/src/darpa_commandpost/ros_nodes/test_mapping_server/cbor:/home/robot/workspace/cras_subt/src/exploration/cloud_proc:/home/robot/workspace/cras_subt/src/control_policy:/home/robot/workspace/cras_subt/src/ros-utils/cras_cpp_common:/home/robot/workspace/cras_subt/src/ros-utils/cras_py_common:/home/robot/workspace/cras_subt/src/darpa-communications/sw-ros/darpa_carousel:/home/robot/workspace/cras_subt/src/darpa_estop_driver:/home/robot/workspace/cras_subt/src/darpa-communications/sw-ros/darpa_motes:/home/robot/workspace/cras_subt/src/darpa_msgs:/home/robot/workspace/cras_subt/src/darpa_commandpost/ros_nodes/darpa_commandpost:/home/robot/workspace/cras_subt/src/darpa_rviz_plugins:/home/robot/workspace/cras_subt/src/tradr-resources/dem_generation_msgs:/home/robot/workspace/cras_subt/src/doxygen_catkin:/home/robot/workspace/cras_subt/src/draco:/home/robot/workspace/cras_subt/src/eigen_catkin:/home/robot/workspace/cras_subt/src/ethzasl_icp_mapping/ethzasl_extrinsic_calibration:/home/robot/workspace/cras_subt/src/ethzasl_icp_mapping/ethzasl_gridmap_2d:/home/robot/workspace/cras_subt/src/ethzasl_icp_mapping/ethzasl_icp_mapping:/home/robot/workspace/cras_subt/src/exploration/exploration_launchers:/home/robot/workspace/cras_subt/src/tradr-resources/exploration_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/flc_msgs:/home/robot/workspace/cras_subt/src/tradr-ugv-base/flc_teleoperation:/home/robot/workspace/cras_subt/src/tradr-payload/flipper_touch_driver:/home/robot/workspace/cras_subt/src/tradr-resources/flipper_touch_driver_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/gas_detector_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/gas_sensor_msgs:/home/robot/workspace/cras_subt/src/tradr-payload/gas_smoke_alerts:/home/robot/workspace/cras_subt/src/gazebo_custom_sensor_preloader:/home/robot/workspace/cras_subt/src/gazebo_noisy_depth_camera:/home/robot/workspace/cras_subt/src/gazebo_rotating_lidar:/home/robot/workspace/cras_subt/src/tradr-resources/general_monitoring_msgs:/home/robot/workspace/cras_subt/src/gflags_catkin:/home/robot/workspace/cras_subt/src/glog_catkin:/home/robot/workspace/cras_subt/src/eigen_checks:/home/robot/workspace/cras_subt/src/tradr-resources/gpio_teleop_joy:/home/robot/workspace/cras_subt/src/tradr-ugv-base/gps_from_odom_updater:/home/robot/workspace/cras_subt/src/tradr-resources/gps_from_odom_updater_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/jetson_media:/home/robot/workspace/cras_subt/src/darpa_commandpost/ros_nodes/test_mapping_server/json:/home/robot/workspace/cras_subt/src/libnabo:/home/robot/workspace/cras_subt/src/libpointmatcher:/home/robot/workspace/cras_subt/src/ethzasl_icp_mapping/libpointmatcher_ros:/home/robot/workspace/cras_subt/src/ethzasl_icp_mapping/ethzasl_icp_mapper:/home/robot/workspace/cras_subt/src/ethzasl_icp_mapping/ethzasl_icp_mapper_experiments:/home/robot/workspace/cras_subt/src/ethzasl_icp_mapping/ethzasl_point_cloud_vtk_tools:/home/robot/workspace/cras_subt/src/tradr-resources/librover_common_catkin:/home/robot/workspace/cras_subt/src/lms1xx:/home/robot/workspace/cras_subt/src/darpa_commandpost/ros_nodes/test_mapping_server/mapping_relay:/home/robot/workspace/cras_subt/src/darpa_commandpost/ros_nodes/test_mapping_server/mapping_server:/home/robot/workspace/cras_subt/src/metis_catkin:/home/robot/workspace/cras_subt/src/gtsam_catkin:/home/robot/workspace/cras_subt/src/mikrotik_swos_tools:/home/robot/workspace/cras_subt/src/minkindr/minkindr:/home/robot/workspace/cras_subt/src/minkindr_ros/minkindr_conversions:/home/robot/workspace/cras_subt/src/minkindr_gtsam/minkindr_gtsam:/home/robot/workspace/cras_subt/src/mincurves/mincurves:/home/robot/workspace/cras_subt/src/tradr-laser-slam/laser_slam:/home/robot/workspace/cras_subt/src/tradr-laser-slam/laser_slam_ros/laser_mapper:/home/robot/workspace/cras_subt/src/tradr-resources/mobilicom_media:/home/robot/workspace/cras_subt/src/mrs_msgs:/home/robot/workspace/cras_subt/src/mrs_lib:/home/robot/workspace/cras_subt/src/detection_localize:/home/robot/workspace/cras_subt/src/msg_db:/home/robot/workspace/cras_subt/src/tradr-resources/networkanalysis_msgs:/home/robot/workspace/cras_subt/src/tradr-ugv-base/nifti_drivers_launchers:/home/robot/workspace/cras_subt/src/tradr-ugv-base/nifti_image_proc:/home/robot/workspace/cras_subt/src/tradr-ugv-base/nifti_laser_assembler:/home/robot/workspace/cras_subt/src/tradr-ugv-base/nifti_laser_filtering:/home/robot/workspace/cras_subt/src/tradr-loc-map-nav/nifti_mapping_launchers:/home/robot/workspace/cras_subt/src/tradr-resources/nifti_robot_description:/home/robot/workspace/cras_subt/src/tradr-resources/nifti_robot_driver_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/adaptive_traversability_msgs:/home/robot/workspace/cras_subt/src/tradr-ugv-base/nifti_teleop:/home/robot/workspace/cras_subt/src/tradr-resources/nifti_teleop_client:/home/robot/workspace/cras_subt/src/tradr-ugv-base/emergency_stop:/home/robot/workspace/cras_subt/src/tradr-resources/nifti_teleop_joy:/home/robot/workspace/cras_subt/src/tradr-ugv-base/nifti_vision_data:/home/robot/workspace/cras_subt/src/nimbro_network/nimbro_cam_transport:/home/robot/workspace/cras_subt/src/nimbro_network/nimbro_log_transport:/home/robot/workspace/cras_subt/src/nimbro_network/nimbro_service_transport:/home/robot/workspace/cras_subt/src/nimbro_network/nimbro_topic_transport:/home/robot/workspace/cras_subt/src/numpy_eigen:/home/robot/workspace/cras_subt/src/minkindr/minkindr_python:/home/robot/workspace/cras_subt/src/tradr-resources/omnicamera_msgs:/home/robot/workspace/cras_subt/src/tradr-ugv-base/omnicamera:/home/robot/workspace/cras_subt/src/tradr-resources/optris_camera_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/patrolling_build_graph_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/plugin_teleop:/home/robot/workspace/cras_subt/src/tradr-ugv-base/point_cloud_color:/home/robot/workspace/cras_subt/src/point_cloud_transport:/home/robot/workspace/cras_subt/src/draco_point_cloud_transport:/home/robot/workspace/cras_subt/src/python_pcd:/home/robot/workspace/cras_subt/src/exploration/rds_msgs:/home/robot/workspace/cras_subt/src/exploration/rds_map_interactive:/home/robot/workspace/cras_subt/src/exploration/rds_map_nav:/home/robot/workspace/cras_subt/src/exploration/rds_multirob_teleop:/home/robot/workspace/cras_subt/src/exploration/rds_path_follow:/home/robot/workspace/cras_subt/src/exploration/rds_tools:/home/robot/workspace/cras_subt/src/realsense-ros/realsense2_camera:/home/robot/workspace/cras_subt/src/realsense-ros/realsense2_description:/home/robot/workspace/cras_subt/src/tradr-payload/realsense_camera_tradr:/home/robot/workspace/cras_subt/src/tradr-simulation/realsense_gazebo:/home/robot/workspace/cras_subt/src/realsense_gazebo_plugin:/home/robot/workspace/cras_subt/src/tradr-resources/realsense_media:/home/robot/workspace/cras_subt/src/robot_body_filter:/home/robot/workspace/cras_subt/src/tradr-ugv-base/robot_image_mask:/home/robot/workspace/cras_subt/src/tradr-resources/robot_trajectory_saver_msgs:/home/robot/workspace/cras_subt/src/ros_numpy:/home/robot/workspace/cras_subt/src/fiducial_markers:/home/robot/workspace/cras_subt/src/ros_tmux:/home/robot/workspace/cras_subt/src/darpa_commandpost/ros_nodes/darpa_commandpost_rqt:/home/robot/workspace/cras_subt/src/exploration/rviz_keyboard_plugin:/home/robot/workspace/cras_subt/src/tradr-resources/safe_exploration_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/simple_srvs:/home/robot/workspace/cras_subt/src/tradr-ugv-base/speed_limiter:/home/robot/workspace/cras_subt/src/tradr-resources/stamped_msgs:/home/robot/workspace/cras_subt/src/tradr-ugv-base/nifti_robot_driver:/home/robot/workspace/cras_subt/src/tradr-simulation/nifti_robot_gazebo:/home/robot/workspace/cras_subt/src/subt_diagnostics:/home/robot/workspace/cras_subt/src/subt_launch:/home/robot/workspace/cras_subt/src/subt_mission:/home/robot/workspace/cras_subt/src/subt_network:/home/robot/workspace/cras_subt/src/ros-system-monitor:/home/robot/workspace/cras_subt/src/tensorflow_ros_cpp:/home/robot/workspace/cras_subt/src/tensorflow_ros_test:/home/robot/workspace/cras_subt/src/tradr-loc-map-nav/tensorflow_tools:/home/robot/workspace/cras_subt/src/tradr-loc-map-nav/dem_generation:/home/robot/workspace/cras_subt/src/tradr-loc-map-nav/flipper_control_policies:/home/robot/workspace/cras_subt/src/tradr-loc-map-nav/adaptive_traversability:/home/robot/workspace/cras_subt/src/tradr-simulation/safe_exploration:/home/robot/workspace/cras_subt/src/tradr-resources/terrain_shape_estimation_msgs:/home/robot/workspace/cras_subt/src/tradr-ugv-base/inso:/home/robot/workspace/cras_subt/src/tf2_client:/home/robot/workspace/cras_subt/src/nav_utils:/home/robot/workspace/cras_subt/src/odom_proc:/home/robot/workspace/cras_subt/src/tf2_server:/home/robot/workspace/cras_subt/src/ros-utils/tf_static_publisher:/home/robot/workspace/cras_subt/src/nimbro_network/tf_throttle:/home/robot/workspace/cras_subt/src/tradr-ugv-base/tradr_diagnostics:/home/robot/workspace/cras_subt/src/tradr-ugv-base/tradr_ft232h_gpio_driver:/home/robot/workspace/cras_subt/src/tradr-resources/tradr_ft232h_gpio_driver_msgs:/home/robot/workspace/cras_subt/src/tradr-ugv-base/tradr_odometry:/home/robot/workspace/cras_subt/src/tradr-ugv-base/tradr_system_monitor:/home/robot/workspace/cras_subt/src/tradr-resources/tradrdb_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/common_db_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/fire_detector_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/test_db_msgs:/home/robot/workspace/cras_subt/src/tradr-resources/trajectory_control_msgs:/home/robot/workspace/cras_subt/src/transforms3d:/home/robot/workspace/cras_subt/src/ubnt_airos_tools:/home/robot/workspace/cras_subt/src/tradr-resources/ultrasonic_range_finder_msgs:/home/robot/workspace/cras_subt/src/tradr-laser-slam/sensor_drivers/velodyne_assembler:/home/robot/workspace/cras_subt/src/tradr-resources/virtual_camera_msgs:/home/robot/workspace/cras_subt/src/tradr-ugv-base/virtual_camera:/home/robot/workspace/cras_subt/src/tradr-resources/vision_msgs:/home/robot/workspace/cras_subt/src/volumetric_mapping/volumetric_map_base:/home/robot/workspace/cras_subt/src/volumetric_mapping/volumetric_mapping:/home/robot/workspace/cras_subt/src/volumetric_mapping/volumetric_msgs:/home/robot/workspace/cras_subt/src/volumetric_mapping/octomap_world:/home/robot/workspace/cras_subt/src/tradr-laser-slam/laser_slam_ros/laser_mapper_tools:/home/robot/workspace/cras_subt/src/voxel_map:/home/robot/workspace/cras_subt/src/wifi_scan:/home/robot/workspace/cras_subt/src/tradr-resources/wireless_network_msgs:/opt/ros/melodic/share

@peci1
Copy link
Contributor

peci1 commented Feb 15, 2020

And I can confirm that reducing the additional packages path to the 5 real workspaces helped.

However, I don't get suggestions in .msg files for anything else than the current package (e.g. even std_msgs aren't suggested).

@peci1
Copy link
Contributor

peci1 commented Feb 15, 2020

What you could do to automatically reduce the package path length is searching for files like .catkin_workspace in each path of ROS_PACKAGE_PATH, and only add directories containing these special files.

@Noam-Dori
Copy link
Owner Author

what do you mean by "compiled ros path" in my ROS_PACKAGE_PATH?

When I say "compiled ros path" I refer to /opt/ros/melodic, which has all the binary (pre-compiled) packages you install on your platform. This path is covered by the setting "ROS Path"

The thing with catkin_tools is that they will eventually add the path to every single package to ROS_PACKAGE_PATH. And this is something this plugin has to cope with.
Here's an example of ROS_PACKAGE_PATH from our robots, where we build the whole workspace with catkin tools: ...

Good to know especially since I am not familiar with the newer build systems (e.g catkin_tools, colcon_build, etc.)
However, the ROS wiki points out that since the introduction of catkin there is no real need to use ROS_PACKAGE_PATH:

"ROS_PACKAGE_PATH is an optional, but very common environment variable that allows you to add more ROS packages from source to your environment.
...
With the introduction of catkin, the need to manually update ROS_PACKAGE_PATH becomes obsolete, and is only necessary for backwards compatibility with rosbuild packages. "

Moreover, it should be used to add packages outside the workspace.

Here's an example of ROS_PACKAGE_PATH from our robots ...

Another suggestion I have for you to improve your experience with the plugin is to put the path to the robot's workspace (/home/robot/workspace/cras_subt) in the "workspace path" setting. That path is used to find all packages in your workspace without resorting to ROS_PACKAGE_PATH. Moreover, since it is unique per-project, it allows you to switch between workspaces without reconfiguring the workspace.

I don't get suggestions in .msg files for anything else than the current package (e.g. even std_msgs aren't suggested).

This is a known bug that will hopefully be solved before version 0.2. Please report anything about the exact steps you took (settings, etc.) to get this bug in the issue's ticket.

What you could do to automatically reduce the package path length is searching for files like .catkin_workspace in each path of ROS_PACKAGE_PATH, and only add directories containing these special files.

Sadly I cannot do that. ROS_PACKAGE_PATH can also direct to packages that are not inside any workspace. Moreover, in the example you provided, the plugin would need to check the parent of these paths rather than those paths themselves for a .catkin_workspace file. It would also not remove any of the effort because these paths are still searched recursively.

@peci1
Copy link
Contributor

peci1 commented Feb 16, 2020

Thanks for the insights. The I'd say it'd be nice if the plugin issued a warning in case it finds /opt/ros/*/setup.bash in the workspaces path. It could also issue a warning when the ROS_PACKAGE_PATH is long, with a suggestion what the user should do (point to the toplevel directory).

As ROS_PACKAGE_PATH is obsolete, shouldn't you maybe look at CMAKE_PREFIX_PATH? I think that's the one that is searched by catkin.

And, in the end, do you say that with the multitude of packages I have, this plugin will be slow regardless of the settings?

@Noam-Dori
Copy link
Owner Author

As ROS_PACKAGE_PATH is obsolete, shouldn't you maybe look at CMAKE_PREFIX_PATH? I think that's the one that is searched by catkin.

CMAKE_PREFIX_PATH only points to the ros path, not the workspace. catkin actually does no work figuring out which workspace is the right one, it either:

  1. catkin_make: it runs a special cmake file it searches for in the working directory (which is why it requires you to run catkin_make from workspace/src) which runs a recursive search for all other packages and loads them.
  2. catkin_make_isolated: it runs a special python script which runs a recursive search for all other packages that are children of the current working directory (which is why workspace/src is required once again) and loads their cmake files.

The I'd say it'd be nice if the plugin issued a warning in case it finds /opt/ros/*/setup.bash in the workspaces path. ...

Feel free to open a feature ticket with more details.

And, in the end, do you say that with the multitude of packages I have, this plugin will be slow regardless of the settings?

The recursive part of the indexing stops once a package is found, so it take around as long as a catkin_make takes to load the workspace. Only one way to truly find out.

Cheers!

@peci1
Copy link
Contributor

peci1 commented Feb 16, 2020

What you are referring to is the catkin build tool. However, there is also the catkin python module along with rospack, which allow you to search for packages during runtime. These have to take some env vars into accout, as they cannot rely on the current directory...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Core
  
Done
Development

No branches or pull requests

2 participants