c.ij.util.IncorrectOperationException: Sorry but parent: o.sl.ij.config.global.rules.RuleConfigurati

Environment:

  • Java: JetBrains s.r.o. 17.0.7
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2023.2
  • SonarLint: 8.4.0.73538
c.ij.util.IncorrectOperationException: Sorry but parent: o.sl.ij.config.global.rules.RuleConfigurationPanel@4e721045 (class o.sl.ij.config.global.rules.RuleConfigurationPanel) has already been disposed (see the cause for stacktrace) so the child: o.sl.ij.ui.ruledescription.RuleCodeSnippet[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=c.ij.util.ui.JBEmptyBorder@1e5f3d4b,flags=9,maximumSize=,minimumSize=,preferredSize=] (class o.sl.ij.ui.ruledescription.RuleCodeSnippet) will never be disposed
	at c.ij.oa.util.ObjectTree.register(ObjectTree.java:43)
	at c.ij.oa.util.Disposer.register(Disposer.java:161)
	at o.sl.ij.ui.ruledescription.RuleParsingUtils$Companion.parseCodeExamples(RuleParsingUtils.kt:94)
	at o.sl.ij.config.global.rules.RuleConfigurationPanel.updateParamsAndDescriptionPanel(RuleConfigurationPanel.java:464)
	at o.sl.ij.config.global.rules.RuleConfigurationPanel.updateParamsAndDescriptionPanel(RuleConfigurationPanel.java:447)
	at o.sl.ij.config.global.rules.RuleConfigurationPanel.lambda$initTreeScrollPane$11(RuleConfigurationPanel.java:408)
	at java.desktop/javax.swing.JTree.fireValueChanged(JTree.java:3021)
	at java.desktop/javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3522)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:650)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1120)

Good Morning @luc_Steven,

can you provide me with more information on when the exception occurred? What did you do at that particular moment? Did it happen once or does it happen regularly?
This would be of great help to me in order to reproduce the issue and try to find a fix for that!

Best,
Tobias

Hi @luc_Steven,

just for a quick getting back to you: I created THIS ticket for us to fix this issue in the upcoming release.
I was able to reproduce the issue but it does not happen all the time: I noticed that the only issue is with the UI (like a race condition) but the configuration is still done correctly.
Therefore I’d say you can ignore the issue for now if it only happens sporadically.

Best,
Tobias

Something similar happened to me as well. For me, the error happened when I disabled rule java:S2699 from the Alt+Enter menu, then re-enabled it from Settings>Tools>SonarLint>Rules
Intellij said in a notification, that an IDE error occurred, and when I clicked the link in the message, it took me to the Intellij report dialog, I clicked the button, and it brought me to this page with new topic and I saw this was a similar topic.

My stacktrace:

com.intellij.util.IncorrectOperationException: Sorry but parent: org.sonarlint.intellij.config.global.rules.RuleConfigurationPanel@577163e0 (class org.sonarlint.intellij.config.global.rules.RuleConfigurationPanel) has already been disposed (see the cause for stacktrace) so the child: org.sonarlint.intellij.ui.ruledescription.RuleCodeSnippet[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=com.intellij.util.ui.JBEmptyBorder@6db17aab,flags=9,maximumSize=,minimumSize=,preferredSize=] (class org.sonarlint.intellij.ui.ruledescription.RuleCodeSnippet) will never be disposed
	at com.intellij.openapi.util.ObjectTree.register(ObjectTree.java:43)
	at com.intellij.openapi.util.Disposer.register(Disposer.java:161)
	at org.sonarlint.intellij.ui.ruledescription.RuleParsingUtils$Companion.parseCodeExamples(RuleParsingUtils.kt:94)
	at org.sonarlint.intellij.config.global.rules.RuleConfigurationPanel.updateParamsAndDescriptionPanel(RuleConfigurationPanel.java:464)
	at org.sonarlint.intellij.config.global.rules.RuleConfigurationPanel.updateParamsAndDescriptionPanel(RuleConfigurationPanel.java:447)
	at org.sonarlint.intellij.config.global.rules.RuleConfigurationPanel.lambda$initTreeScrollPane$11(RuleConfigurationPanel.java:408)
	at java.desktop/javax.swing.JTree.fireValueChanged(JTree.java:3021)
	at java.desktop/javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3522)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:650)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1120)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:306)
	at java.desktop/javax.swing.JTree.setSelectionPaths(JTree.java:1723)
	at org.sonarlint.intellij.config.global.rules.RuleConfigurationPanel.updateModel(RuleConfigurationPanel.java:311)
	at org.sonarlint.intellij.config.global.rules.RuleConfigurationPanel.lambda$load$5(RuleConfigurationPanel.java:272)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:789)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:740)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:734)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:759)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:685)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:589)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:992)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:992)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
	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)
1 Like