beansoft / iscratch-support

Supports for the Notes IDEA plugin
Other
6 stars 0 forks source link

在“代码笔记”界面更新的标题栏更新标题偶尔出错 #66

Open Fortern opened 8 months ago

Fortern commented 8 months ago

What happened

在“代码笔记”界面更新的标题栏更新标题偶尔出现这种错误,但是不影响最终标题修改成功。

Version information

GoLand 2023.3.4 • Notes plugin com.github.beansoft.iscratch 2023.3.0

Exception

null

java.lang.RuntimeException: Cannot invoke (class=, method=titleChanged, topic=NotesEventListener)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:677)
    at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:423)
    at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:402)
    at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
    at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:461)
    at jdk.proxy12/jdk.proxy12.$Proxy226.titleChanged(Unknown Source)
    at com.github.beansoft.iscratch.event.NotesEventManager.changeTitle(NotesEventManager.java:43)
    at com.github.beansoft.iscratch.ui.CodeViewComponent$5.lambda$textChanged$0(CodeViewComponent.java:442)
    at java.base/java.util.Optional.ifPresent(Optional.java:178)
    at com.github.beansoft.iscratch.ui.CodeViewComponent$5.textChanged(CodeViewComponent.java:432)
    at com.intellij.ui.DocumentAdapter.insertUpdate(DocumentAdapter.java:15)
    at java.desktop/javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:226)
    at java.desktop/javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:780)
    at java.desktop/javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:739)
    at java.desktop/javax.swing.text.PlainDocument.insertString(PlainDocument.java:131)
    at java.desktop/javax.swing.text.AbstractDocument.replace(AbstractDocument.java:698)
    at java.desktop/javax.swing.text.JTextComponent.replaceSelection(JTextComponent.java:1339)
    at java.desktop/javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(DefaultEditorKit.java:884)
    at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
    at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2943)
    at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:2991)
    at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2905)
    at java.desktop/javax.swing.text.JTextComponent.replaceInputMethodText(JTextComponent.java:4833)
    at java.desktop/javax.swing.text.JTextComponent.processInputMethodEvent(JTextComponent.java:4581)
    at java.desktop/java.awt.Component.processEvent(Component.java:6439)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:794)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:766)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:764)
    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:763)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:695)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:589)
    at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:44)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
    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)
Caused by: java.util.ConcurrentModificationException
    at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:756)
    at java.base/java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:778)
    at com.github.beansoft.iscratch.highlight.BookmarksManager.refresh(BookmarksManager.kt:311)
    at com.github.beansoft.iscratch.ui.ScratchCodePane$1.titleChanged(ScratchCodePane.java:269)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:700)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:660)
    ... 61 more