Error in SonarLint for IntelliJ editor

Environment:
*Java version=11.0.3
*Java vendor=JetBrains s.r.o
*OS name=Mac OS X
*OS architecture=x86_64
*IDE=IntelliJIDEA 2019.2.1
*SonarLint version=4.5.0.15320

java.lang.IllegalArgumentException:Argument for @NotNull parameter 'module' of com/intellij/openapi/roots/ModuleRootManager.getInstance must not be null
	at com.intellij.openapi.roots.ModuleRootManager.$$$reportNull$$$0(ModuleRootManager.java)
	at com.intellij.openapi.roots.ModuleRootManager.getInstance(ModuleRootManager.java)
	at org.sonarlint.intellij.util.SonarLintUtils.getSourceFolder(SonarLintUtils.java:193)
	at org.sonarlint.intellij.analysis.LocalFileExclusions.checkFileInSourceFolders(LocalFileExclusions.java:145)
	at org.sonarlint.intellij.analysis.LocalFileExclusions.checkExclusions(LocalFileExclusions.java:119)
	at org.sonarlint.intellij.ui.AutoTriggerStatusPanel.getCard(AutoTriggerStatusPanel.java:119)
	at org.sonarlint.intellij.ui.AutoTriggerStatusPanel.switchCards(AutoTriggerStatusPanel.java:107)
	at org.sonarlint.intellij.ui.AutoTriggerStatusPanel.access$000(AutoTriggerStatusPanel.java:58)
	at org.sonarlint.intellij.ui.AutoTriggerStatusPanel$2.selectionChanged(AutoTriggerStatusPanel.java:101)
	at jdk.internal.reflect.GeneratedMethodAccessor851.invoke(UnknownSource)
	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.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:102)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:446)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:406)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:395)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:379)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:372)
	at com.intellij.util.messages.impl.MessageBusImpl.lambda$createTopicHandler$1(MessageBusImpl.java:242)
	at com.sun.proxy.$Proxy176.selectionChanged(UnknownSource)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$fireSelectionChanged$20(FileEditorManagerImpl.java:1602)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$5$1.run(FileEditorManagerImpl.java:1051)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.lambda$doWhenFocusSettlesDown$3(FocusManagerImpl.java:170)
	at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:2458)
	at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.java:167)
	at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:119)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:161)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:167)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.lambda$null$2(FocusManagerImpl.java:175)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:312)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:433)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:416)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)

Hello,

Thanks for joining the community and for raising this issue.

You use a pretty old version of SonarLint (feb 2020) and the bug has been fixed since. I encourage you to update to the latest version, which is 4.13 to date.

Thanks for using SonarLint!
Damien

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.