Error in SonarLint for IntelliJ on Windows 10

Environment:

  • Java: JetBrains s.r.o. 11.0.13
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2021.3.1
  • SonarLint: 6.4.1.42145

Error determining tab size

java.lang.IllegalStateException: @NotNull method com/intellij/psi/impl/source/codeStyle/CodeStyleSchemeImpl.getCodeStyleSettings must not return null
	at c.ij.psi.impl.source.codeStyle.CodeStyleSchemeImpl.$$$reportNull$$$0(CodeStyleSchemeImpl.java)
	at c.ij.psi.impl.source.codeStyle.CodeStyleSchemeImpl.getCodeStyleSettings(CodeStyleSchemeImpl.java:82)
	at c.ij.psi.codeStyle.CodeStyleSettingsManager.getCurrentSettings(CodeStyleSettingsManager.java:222)
	at c.ij.application.options.CodeStyle.getSettings(CodeStyle.java:57)
	at c.ij.oa.editor.impl.SettingsImpl.getTabSize(SettingsImpl.java:389)
	at c.ij.oa.editor.ex.util.EditorUtil.getTabSize(EditorUtil.java:336)
	at c.ij.oa.editor.impl.view.EditorView.getTabSize(EditorView.java:580)
	at c.ij.oa.editor.impl.view.LogicalPositionCache.reset(LogicalPositionCache.java:75)
	at c.ij.oa.editor.impl.view.EditorView.reinitSettings(EditorView.java:366)
	at c.ij.oa.editor.impl.EditorImpl.<init>(EditorImpl.java:494)
	at c.ij.oa.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:203)
	at c.ij.oa.editor.impl.EditorFactoryImpl.createViewer(EditorFactoryImpl.java:173)
	at c.ij.execution.impl.ConsoleViewUtil.setupConsoleEditor(ConsoleViewUtil.java:52)
	at c.ij.execution.impl.ConsoleViewImpl.doCreateConsoleEditor(ConsoleViewImpl.java:861)
	at c.ij.execution.impl.ConsoleViewImpl.createConsoleEditor(ConsoleViewImpl.java:843)
	at c.ij.execution.impl.ConsoleViewImpl.initConsoleEditor(ConsoleViewImpl.java:454)

Hi,

The error doesn’t look to have any relation with SonarLint.

I found many similar issues in JetBrains issue tracker, like this one: https://youtrack.jetbrains.com/issue/RIDER-61339

The advice from JetBrains is:

The issue might be caused by some custom plugins you use. So you need to remove all the custom color schemes and plugins that produce them to resolve this issue.

I saw an alert in intellij that said an update is available for SonarLint. I clicked update. Saw restart intelij. Restarted it and intelij said cannot update plugin. Then I restarted system and opened intelij. That is when I saw the exception stack trace that I have shared with you

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