Fix IncorrectOperationException when editor disposed before async PsiTreeChangeListener registration#971
Merged
SeeSharpSoft merged 4 commits intomainfrom Mar 29, 2026
Conversation
…eChangeListener registration Co-authored-by: SeeSharpSoft <3205800+SeeSharpSoft@users.noreply.github.com> Agent-Logs-Url: https://github.com/SeeSharpSoft/intellij-csv-validator/sessions/0c0b9df9-c4a1-4307-ab7f-554c71abc7d3
Copilot
AI
changed the title
[WIP] Fix IncorrectOperationException in CsvTableEditorSwing
Fix IncorrectOperationException when editor disposed before async PsiTreeChangeListener registration
Mar 21, 2026
SeeSharpSoft
requested changes
Mar 29, 2026
Owner
SeeSharpSoft
left a comment
There was a problem hiding this comment.
Rebase on latest main. Update CHANGELOG.MD and add the fix to under the Fixed section of version 4.2.1
Co-authored-by: SeeSharpSoft <3205800+SeeSharpSoft@users.noreply.github.com>
…tion Agent-Logs-Url: https://github.com/SeeSharpSoft/intellij-csv-validator/sessions/02fb7c80-41fd-4561-ac47-12924be00c20 Co-authored-by: SeeSharpSoft <3205800+SeeSharpSoft@users.noreply.github.com>
Contributor
Author
Done in 96c8a54. Merged latest main (which introduced the 4.2.1 section) and added the fix entry to the 4.2.1 Fixed section in CHANGELOG.md. |
SeeSharpSoft
approved these changes
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CsvTableModelBase.addPsiTreeChangeListener(): guard asyncfinishOnUiThreadcallback withvolatile myDisposedcheckCHANGELOG.md: added the fix entry under the4.2.1 FixedsectionOriginal prompt
This section details on the original issue you should resolve
<issue_title>[Automated Report] com.intellij.util.IncorrectOperationException: Sorry but parent: net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing (class net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing) has already been disposed (see the cause for stacktrace) so the child: com.intellij.psi.impl.PsiManagerImpl$$Lambda/0x0000025cc656f750 (class com.intellij.psi.impl.PsiManagerImpl$$Lambda/0x0000025cc656f750) will never be disposed</issue_title>
<issue_description>Message
Stacktrace
com.intellij.util.IncorrectOperationException: Sorry but parent: net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing@fb2cfbd (class net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing) has already been disposed (see the cause for stacktrace) so the child: com.intellij.psi.impl.PsiManagerImpl$$Lambda/0x0000025cc656f750@11a671c9 (class com.intellij.psi.impl.PsiManagerImpl$$Lambda/0x0000025cc656f750) will never be disposed
at com.intellij.openapi.util.ObjectTree.register(ObjectTree.java:43)
at com.intellij.openapi.util.Disposer.register(Disposer.java:162)
at com.intellij.psi.impl.PsiManagerImpl.addPsiTreeChangeListener(PsiManagerImpl.java:236)
at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableModelBase.lambda$addPsiTreeChangeListener$1(CsvTableModelBase.java:61)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$safeTransferToEdt$9(NonBlockingReadActionImpl.java:801)
at com.intellij.concurrency.ThreadContext.installThreadContext(threadContext.kt:305)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$safeTransferToEdt$10(NonBlockingReadActionImpl.java:800)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:204)
at com.intellij.openapi.application.impl.AppImplKt$runnableUnitFunction$1.invoke(appImpl.kt:124)
at com.intellij.openapi.application.impl.AppImplKt$runnableUnitFunction$1.invoke(appImpl.kt:124)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.doRunWriteIntentReadAction(NestedLocksThreadingSupport.kt:736)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.runPreventiveWriteIntentReadAction(NestedLocksThreadingSupport.kt:710)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.runWriteIntentReadAction(NestedLocksThreadingSupport.kt:664)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:1048)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:582)
at com.intellij.openapi.application.impl.NonBlockingFlushQueue.runNextEvent$lambda$1$1$0(NonBlockingFlushQueue.kt:334)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:901)
at com.intellij.openapi.application.impl.NonBlockingFlushQueue.runNextEvent$lambda$1$1(NonBlockingFlushQueue.kt:333)
at com.intellij.concurrency.ThreadContext.resetThreadContext(threadContext.kt:294)
at com.intellij.openapi.application.impl.NonBlockingFlushQueue.runNextEvent$lambda$1(NonBlockingFlushQueue.kt:330)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.tryRunWriteIntentReadAction(NestedLocksThreadingSupport.kt:689)
at com.intellij.openapi.application.impl.NonBlockingFlushQueue.runNextEvent(NonBlockingFlushQueue.kt:326)
at com.intellij.openapi.application.impl.NonBlockingFlushQueue.flushNow(NonBlockingFlushQueue.kt:305)
at com.intellij.openapi.application.impl.NonBlockingFlushQueue.FLUSH_NOW$lambda$0(NonBlockingFlushQueue.kt:167)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:664)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:517)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$0$0$0(IdeEventQueue.kt:333)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1065)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1065)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$0(IdeEventQueue.kt:331)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:371)
a...
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.