Error in SonarLint for IntelliJ during startup

During start this error occurs…

Environment:

  • Java: JetBrains s.r.o. 11.0.13
  • OS: Mac OS X x86_64
  • IDE: IntelliJ IDEA 2021.3.1
  • SonarLint: 6.3.1.40498
java.lang.ClassCastException: class java.lang.String cannot be cast to class javax.swing.Icon (java.lang.String is in module java.base of loader 'bootstrap'; javax.swing.Icon is in module java.desktop of loader 'bootstrap')
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.installDefaults(BasicTreeUI.java:838)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.installUI(BasicTreeUI.java:767)
	at java.desktop/com.apple.laf.AquaTreeUI.installUI(AquaTreeUI.java:84)
	at java.desktop/javax.swing.JComponent.setUI(JComponent.java:688)
	at java.desktop/javax.swing.JTree.setUI(JTree.java:706)
	at c.ij.ui.treeStructure.Tree.setUI(Tree.java:121)
	at java.desktop/javax.swing.JTree.updateUI(JTree.java:727)
	at java.desktop/javax.swing.JTree.<init>(JTree.java:678)
	at c.ij.ui.treeStructure.Tree.<init>(Tree.java:74)
	at o.sl.ij.ui.tree.FlowsTree.<init>(FlowsTree.java:48)
	at o.sl.ij.ui.AbstractIssuesPanel.createFlowsTree(AbstractIssuesPanel.java:148)
	at o.sl.ij.ui.AbstractIssuesPanel.<init>(AbstractIssuesPanel.java:75)
	at o.sl.ij.ui.SonarLintIssuesPanel.<init>(SonarLintIssuesPanel.java:49)
	at o.sl.ij.ui.SonarLintToolWindowFactory.addIssuesTab(SonarLintToolWindowFactory.java:110)
	at o.sl.ij.ui.SonarLintToolWindowFactory.createToolWindowContent(SonarLintToolWindowFactory.java:58)
	at c.ij.oa.wm.impl.ToolWindowImpl.createContentIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:542)
	at c.ij.oa.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.kt:403)

Hi @ThomasMinor

I fail to see the reason why this happens. The error is in IntelliJ internals. Maybe this is a bug on their side, I have asked on their Slack channel. Are you using a custom theme? Can you try switching to a different one?

This is confirmed, this is a bug on IntelliJ side, when using custom theme:
https://youtrack.jetbrains.com/issue/IDEA-215462
They are mentioning as workaround to revert to default theme.

Uhh, just seen your reply, I’ll try the workaround you mentioned and report back!