Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntelliJ reports "Error trying to annotate file" #40

Open
markaddleman opened this issue Dec 16, 2022 · 1 comment
Open

IntelliJ reports "Error trying to annotate file" #40

markaddleman opened this issue Dec 16, 2022 · 1 comment

Comments

@markaddleman
Copy link

(from slack conversation https://clojurians.slack.com/archives/C02UN1B0998/p1671049377693669)

Every once in a while, Intellij reports the following error:

Error trying to annotate file

java.lang.Throwable: Control-flow exceptions (e.g. this class com.intellij.openapi.progress.ProcessCanceledException) should never be logged. Instead, these should have been rethrown or, if not possible, caught and ignored
	at com.intellij.openapi.diagnostic.Logger.ensureNotControlFlow(Logger.java:298)
	at com.intellij.idea.IdeaLogger.doLogError(IdeaLogger.java:151)
	at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:142)
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:232)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.lintWithBuiltinLinter(CljKondoAnnotator.kt:116)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.doAnnotate(CljKondoAnnotator.kt:61)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.doAnnotate(CljKondoAnnotator.kt:31)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:209)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:203)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.runChangeAware(ExternalToolPass.java:278)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$1(ExternalToolPass.java:181)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:190)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:591)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:666)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:622)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:590)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:177)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:365)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:343)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:180)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:334)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:324)
	at com.intellij.util.ui.update.MergingUpdateQueue.doExecute(MergingUpdateQueue.java:281)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:264)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:238)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:241)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:377)
	at com.intellij.util.Alarm$Request.run(Alarm.java:366)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:272)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:243)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:216)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:205)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.intellij.openapi.progress.ProcessCanceledException
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.startRead(ReadMostlyRWLock.java:108)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:871)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:68)
	at com.intellij.openapi.editor.impl.DocumentImpl.getText(DocumentImpl.java:939)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.getPsiFileContent(CljKondoAnnotator.kt:125)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.getTempLintFile(CljKondoAnnotator.kt:131)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.lintWithBuiltinLinter(CljKondoAnnotator.kt:102)
	... 39 more

I’m running 2022.3

@devurandom
Copy link

IntelliJ Ultimate 2022.3.2, Cursive 1.12.7-2022.3, Clojure Extras 0.7.6:

Error trying to annotate file

java.lang.Throwable: Control-flow exceptions (e.g. this class com.intellij.openapi.progress.ProcessCanceledException) should never be logged. Instead, these should have been rethrown or, if not possible, caught and ignored
	at com.intellij.openapi.diagnostic.Logger.ensureNotControlFlow(Logger.java:298)
	at com.intellij.idea.IdeaLogger.doLogError(IdeaLogger.java:151)
	at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:142)
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:232)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.lintWithBuiltinLinter(CljKondoAnnotator.kt:116)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.doAnnotate(CljKondoAnnotator.kt:61)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.doAnnotate(CljKondoAnnotator.kt:31)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:209)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:203)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.runChangeAware(ExternalToolPass.java:278)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$1(ExternalToolPass.java:181)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:366)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:344)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:180)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:334)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:324)
	at com.intellij.util.ui.update.MergingUpdateQueue.doExecute(MergingUpdateQueue.java:281)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:264)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:238)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:241)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:377)
	at com.intellij.util.Alarm$Request.run(Alarm.java:366)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:272)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:243)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:216)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:205)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.intellij.openapi.progress.ProcessCanceledException
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.startRead(ReadMostlyRWLock.java:107)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:896)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:68)
	at com.intellij.openapi.editor.impl.DocumentImpl.getText(DocumentImpl.java:939)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.getPsiFileContent(CljKondoAnnotator.kt:125)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.getTempLintFile(CljKondoAnnotator.kt:131)
	at com.github.brcosta.cljstuffplugin.extensions.CljKondoAnnotator.lintWithBuiltinLinter(CljKondoAnnotator.kt:102)
	... 39 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants