bestv5 / CodeGlance

Intelij IDEA plugin for displaying a code mini-map similar to the one found in Sublime
BSD 2-Clause "Simplified" License
21 stars 3 forks source link

Concurrent Modification Exception #6

Open ron-wolf opened 3 years ago

ron-wolf commented 3 years ago

This error occurred when I opened a C++ file that hadn't been open before, which utilized Google Test. I am using CodeGlance3 2.1.1-2021.1.3, on CLion 2021.2.3 build #CL-212.5457.51. It looks like the error is caused here, on line 118:

https://github.com/ranbest/CodeGlance/blob/7185ff1c6dfa50e5b99023a515581df3154b9f09/src/main/java/net/vektah/codeglance/render/Minimap.kt#L117-L119

…which in turn is called here, on line 144:

https://github.com/ranbest/CodeGlance/blob/7185ff1c6dfa50e5b99023a515581df3154b9f09/src/main/java/net/vektah/codeglance/GlancePanel.kt#L142-L144

Here is the stack trace:

Worker exited due to exception

java.util.ConcurrentModificationException
    at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.getAttributesKeys(LexerEditorHighlighter.java:492)
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.getAttributes(LexerEditorHighlighter.java:484)
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter$HighlighterIteratorImpl.getTextAttributes(LexerEditorHighlighter.java:626)
    at net.vektah.codeglance.render.Minimap.update(Minimap.kt:118)
    at net.vektah.codeglance.GlancePanel$7.computeInReadAction(GlancePanel.kt:144)
    at com.intellij.openapi.progress.util.ReadTask.performInReadAction(ReadTask.java:49)
    at com.intellij.openapi.progress.util.ReadTask.lambda$runBackgroundProcess$0(ReadTask.java:66)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:854)
    at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
    at com.intellij.openapi.progress.util.ReadTask.runBackgroundProcess(ReadTask.java:66)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runUnderProgress$5(ProgressIndicatorUtils.java:267)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runUnderProgress(ProgressIndicatorUtils.java:265)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils$4.run(ProgressIndicatorUtils.java:215)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:829)
lorrin commented 2 years ago

I've seen this as well, but in PyCharm 2021.2.3 Build #PY-212.5457.59. Same stack trace, same ClodeGlance plug-in version. A Vagrantfile was the active editor view when it happened.