Noam-Dori / ros-integrate

Extends IntelliJ-Based IDEs with ROS specific development tools
Apache License 2.0
22 stars 3 forks source link

NullPointerException on CLion launch #86

Closed merkoslav closed 8 months ago

merkoslav commented 8 months ago

Describe the bug IDE Internal Errors shows exceptions in plugin ROS Support on load.

To Reproduce Steps to reproduce the behavior:

  1. Open CLion for the first time
  2. Download ROS Support
  3. Restart CLion

Expected behavior I expect the plugin to load without exceptions and give me launch file highlighting

Environment Information:

Stack Trace java.lang.NullPointerException at ros.integrate.pkg.ROSIndexChangeListener.after(ROSIndexChangeListener.java:35) at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:642) at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:617) at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:417) at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:391) at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:373) at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:34) at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:173) at com.sun.proxy.$Proxy14.fileWithNoDocumentChanged(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 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:173) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$new$0(FileDocumentManagerImpl.java:128) at com.sun.proxy.$Proxy14.fileWithNoDocumentChanged(Unknown Source) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.contentsChanged(FileDocumentManagerImpl.java:681) at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$MyAsyncFileListener$1.afterVfsChange(FileDocumentManagerImpl.java:631) at com.intellij.openapi.vfs.newvfs.AsyncEventSupport.afterVfsChange(AsyncEventSupport.java:133) at com.intellij.openapi.vfs.newvfs.AsyncEventSupport$1.after(AsyncEventSupport.java:65) at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:642) at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:617) at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:417) at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:391) at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:373) at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:34) at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:180) at com.sun.proxy.$Proxy166.after(Unknown Source) at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.fireAfterEvents(PersistentFSImpl.java:1219) at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.applyMultipleEvents(PersistentFSImpl.java:1198) at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.processEventsImpl(PersistentFSImpl.java:1161) at com.intellij.openapi.vfs.newvfs.AsyncEventSupport.processEventsFromRefresh(AsyncEventSupport.java:150) at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEventsInWriteAction(RefreshSessionImpl.java:232) at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.lambda$fireEvents$1(RefreshSessionImpl.java:211) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runEdtProgressWriteAction$9(ApplicationImpl.java:979) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176) at com.intellij.openapi.progress.util.PotemkinProgress.runInSwingThread(PotemkinProgress.java:164) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runEdtProgressWriteAction$10(ApplicationImpl.java:979) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1003) at com.intellij.openapi.application.impl.ApplicationImpl.runEdtProgressWriteAction(ApplicationImpl.java:977) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithNonCancellableProgressInDispatchThread(ApplicationImpl.java:958) at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.lambda$fireEvents$2(RefreshSessionImpl.java:205) at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:86) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1003) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1029) at com.intellij.openapi.application.WriteAction.run(WriteAction.java:85) at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.fireEvents(RefreshSessionImpl.java:204) at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.fireEventsSync(RefreshQueueImpl.java:74) at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.queueSessionSync(RefreshQueueImpl.java:70) at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.execute(RefreshQueueImpl.java:54) at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.launch(RefreshSessionImpl.java:114) at com.intellij.openapi.vfs.newvfs.RefreshQueue.refresh(RefreshQueue.java:42) at com.intellij.openapi.vfs.newvfs.RefreshQueue.refresh(RefreshQueue.java:28) at com.intellij.openapi.vfs.newvfs.NewVirtualFile.refresh(NewVirtualFile.java:62) at com.intellij.openapi.vfs.VirtualFile.refresh(VirtualFile.java:675) at com.intellij.openapi.vfs.impl.http.RemoteFileInfoImpl.lambda$finished$0(RemoteFileInfoImpl.java:133) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1003) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1029) at com.intellij.openapi.application.WriteAction.compute(WriteAction.java:96) at com.intellij.openapi.application.WriteAction.lambda$computeAndWait$3(WriteAction.java:149) at com.intellij.openapi.application.WriteThread.lambda$submit$0(WriteThread.java:27) at com.intellij.openapi.application.WriteThread.lambda$submit$1(WriteThread.java:43) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873) at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42) 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:898) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106) at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Screenshots N/A

Additional context N/A

Noam-Dori commented 8 months ago

This stack trace seems to be the same one as in issue #68 . From what I said when that issue was fixed:

... all plugin services (save for few plugin components) were not loaded by the plugin.xml. This was caused by an improper use of XInclude in the plugin.xml. XInclude, which allows importing tags from other documents, should be used at the root on the including document, and not deeper within the tree (which I did). Fixing this problem allowed the components to load.

The fix should be available for the next release, 0.1.7, and is already available here.

Fix was tested on IntelliJ IDEA Community 2021.2 on Windows 10.

If you are up for it, you can install the plugin from source to apply the fix right now, which will fix the bug.

merkoslav commented 8 months ago

Thanks for the quick response. I had read it and thought I'd do the installation but in the end the problem doesn't bother me enough daily. I'll just wait for the release