Error in SonarLint for IntelliJ

Environment:

  • Java: JetBrains s.r.o. 21.0.5
  • OS: Windows 11 amd64
  • IDE: IntelliJ IDEA 2024.3
  • SonarLint: 10.12.0.79769
java.lang.IllegalStateException: There is no ProgressIndicator or Job in this thread, the current job is not cancellable.
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable$lambda$0(coroutines.kt:142)
	at c.ij.oa.progress.ContextKt.prepareThreadContext(context.kt:85)
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:140)
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:123)
	at c.ij.execution.wsl.WslIjentUtil.runProcessBlocking(WslIjentUtil.kt:68)
	at c.ij.execution.wsl.WSLDistribution.lambda$patchCommandLine$2(WSLDistribution.java:245)
	at c.ij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:463)
	at c.ij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:469)
	at c.ij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:374)
	at c.ij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:85)
	at c.ij.execution.process.OSProcessHandler.<init>(OSProcessHandler.java:45)
	at c.ij.execution.process.KillableProcessHandler.<init>(KillableProcessHandler.java:41)
	at c.ij.execution.process.KillableProcessHandler.<init>(KillableProcessHandler.java:55)
	at git4idea.commands.GitTextHandler$MyOSProcessHandler.<init>(GitTextHandler.java:166)
	at git4idea.commands.GitLineHandler$1.<init>(GitLineHandler.java:143)
	at git4idea.commands.GitLineHandler.createProcess(GitLineHandler.java:143)
	at git4idea.commands.GitTextHandler.startProcess(GitTextHandler.java:77)
	at git4idea.commands.GitHandler.start(GitHandler.java:470)
	at git4idea.commands.GitHandler.runInCurrentThread(GitHandler.java:408)
	at git4idea.commands.GitImplBase.doRun(GitImplBase.java:199)
	at git4idea.commands.GitImplBase.run(GitImplBase.java:162)
	at git4idea.commands.GitImplBase.runCommand(GitImplBase.java:62)
	at o.sl.ij.git.GitRepo.getNumberOfCommitsBetween(GitRepo.kt:98)
	at o.sl.ij.git.GitRepo.distance(GitRepo.kt:85)
	at o.sl.ij.git.GitRepo.electBestMatchingServerBranchForCurrentHead(GitRepo.kt:45)
	at o.sl.ij.SonarLintIntelliJClient.matchSonarProjectBranch(SonarLintIntelliJClient.kt:629)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$matchSonarProjectBranch$27(SonarLintRpcClientImpl.java:308)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:124)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Environment:

  • Java: JetBrains s.r.o. 21.0.5
  • OS: Windows 11 amd64
  • IDE: IntelliJ IDEA 2024.3
  • SonarLint: 10.12.0.79769
java.lang.IllegalStateException: There is no ProgressIndicator or Job in this thread, the current job is not cancellable.
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable$lambda$0(coroutines.kt:142)
	at c.ij.oa.progress.ContextKt.prepareThreadContext(context.kt:85)
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:140)
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:123)
	at c.ij.execution.wsl.WslIjentUtil.runProcessBlocking(WslIjentUtil.kt:68)
	at c.ij.execution.wsl.WSLDistribution.lambda$patchCommandLine$2(WSLDistribution.java:245)
	at c.ij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:463)
	at c.ij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:469)
	at c.ij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:374)
	at c.ij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:85)
	at c.ij.execution.process.OSProcessHandler.<init>(OSProcessHandler.java:45)
	at c.ij.execution.process.KillableProcessHandler.<init>(KillableProcessHandler.java:41)
	at c.ij.execution.process.KillableProcessHandler.<init>(KillableProcessHandler.java:55)
	at git4idea.commands.GitTextHandler$MyOSProcessHandler.<init>(GitTextHandler.java:166)
	at git4idea.commands.GitLineHandler$1.<init>(GitLineHandler.java:143)
	at git4idea.commands.GitLineHandler.createProcess(GitLineHandler.java:143)
	at git4idea.commands.GitTextHandler.startProcess(GitTextHandler.java:77)
	at git4idea.commands.GitHandler.start(GitHandler.java:470)
	at git4idea.commands.GitHandler.runInCurrentThread(GitHandler.java:408)
	at git4idea.commands.GitImplBase.doRun(GitImplBase.java:199)
	at git4idea.commands.GitImplBase.run(GitImplBase.java:162)
	at git4idea.commands.GitImplBase.runCommand(GitImplBase.java:62)
	at git4idea.history.GitHistoryUtils.getMergeBase(GitHistoryUtils.java:291)
	at o.sl.ij.git.GitRepo.distance(GitRepo.kt:78)
	at o.sl.ij.git.GitRepo.electBestMatchingServerBranchForCurrentHead(GitRepo.kt:45)
	at o.sl.ij.SonarLintIntelliJClient.matchSonarProjectBranch(SonarLintIntelliJClient.kt:629)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$matchSonarProjectBranch$27(SonarLintRpcClientImpl.java:308)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:124)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Hi,

Thanks for these reports. We’ve just released v10.13.0.800096. Could you upgrade and see if this is still replicable?

And if it is, could you let us know what you were doing when these errors hit?

 
Thx,
Ann

Sure.

Still the same issue at intellij startup

Environment:

  • Java: JetBrains s.r.o. 21.0.5
  • OS: Windows 11 amd64
  • IDE: IntelliJ IDEA 2024.3
  • SonarQube for IDE: 10.13.0.80096
java.lang.IllegalStateException: There is no ProgressIndicator or Job in this thread, the current job is not cancellable.
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable$lambda$0(coroutines.kt:142)
	at c.ij.oa.progress.ContextKt.prepareThreadContext(context.kt:85)
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:140)
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:123)
	at c.ij.execution.wsl.WslIjentUtil.runProcessBlocking(WslIjentUtil.kt:68)
	at c.ij.execution.wsl.WSLDistribution.lambda$patchCommandLine$2(WSLDistribution.java:245)
	at c.ij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:463)
	at c.ij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:469)
	at c.ij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:374)
	at c.ij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:85)
	at c.ij.execution.process.OSProcessHandler.<init>(OSProcessHandler.java:45)
	at c.ij.execution.process.KillableProcessHandler.<init>(KillableProcessHandler.java:41)
	at c.ij.execution.process.KillableProcessHandler.<init>(KillableProcessHandler.java:55)
	at git4idea.commands.GitTextHandler$MyOSProcessHandler.<init>(GitTextHandler.java:166)
	at git4idea.commands.GitLineHandler$1.<init>(GitLineHandler.java:143)
	at git4idea.commands.GitLineHandler.createProcess(GitLineHandler.java:143)
	at git4idea.commands.GitTextHandler.startProcess(GitTextHandler.java:77)
	at git4idea.commands.GitHandler.start(GitHandler.java:470)
	at git4idea.commands.GitHandler.runInCurrentThread(GitHandler.java:408)
	at git4idea.commands.GitImplBase.doRun(GitImplBase.java:199)
	at git4idea.commands.GitImplBase.run(GitImplBase.java:162)
	at git4idea.commands.GitImplBase.runCommand(GitImplBase.java:62)
	at o.sl.ij.git.GitRepo.getNumberOfCommitsBetween(GitRepo.kt:98)
	at o.sl.ij.git.GitRepo.distance(GitRepo.kt:84)
	at o.sl.ij.git.GitRepo.electBestMatchingServerBranchForCurrentHead(GitRepo.kt:45)
	at o.sl.ij.SonarLintIntelliJClient.matchSonarProjectBranch(SonarLintIntelliJClient.kt:631)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$matchSonarProjectBranch$27(SonarLintRpcClientImpl.java:308)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:124)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

IntelliJ IDEA 2024.3 (Ultimate Edition)
Build #IU-243.21565.193, built on November 13, 2024
Licensed to Prajoth Prasannan
Subscription is active until January 5, 2025.
Runtime version: 21.0.5+8-b631.28 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
This IDE is not managed via JetBrains IDE Services because no configuration was specified.
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 20
Registry:
ide.windowSystem.autoShowProcessPopup=true
debugger.watches.in.variables=false
ide.experimental.ui=true
i18n.locale=
feature.suggester.enable.suggesters=true
terminal.new.ui=true
Non-Bundled Plugins:
com.jetbrains.plugins.ini4idea (243.21565.208)
com.github.izhangzhihao.intellijgooglesearch (0.0.2)
com.fabio (1.2)
dev.camunda.bpmn-editor (1.4.2)
org.turbanov.run.configuration.as.action (3.0)
com.intellij.ideolog (243.21565.208)
Error-prone plugin (243.21565.129)
org.jetbrains.jumpToLine (0.1.17)
SpotProfiler (2.0)
GenerateSerialVersionUID (3.0.3)
com.github.mkartashev.hserr (0.0.3)
com.github.setial (4.1.3)
name.kropp.intellij.makefile (243.21565.122)
com.jetbrains.jax.ws (243.21565.129)
com.intellij.spring.shell (243.21565.129)
com.intellij.spring.debugger (243.21565.129)
com.intellij.spring.webflow (243.21565.129)
com.intellij.properties.bundle.editor (243.21565.122)
CMD Support (1.0.5)
com.intellij.spring.websocket (243.21565.129)
com.intellij.editSuggestion (243.21565.129)
com.intellij.microservices.debugger (243.21565.129)
com.intellij.spring.batch (243.21565.129)
gherkin (243.21565.122)
cucumber-java (243.21565.129)
W3Validators (243.21565.120)
com.intellij.ml.llm (243.21565.247)
com.jetbrains.fast.mouse.scroll (1.6.1)
com.intellij.grazie.pro (0.3.350)
com.intellij.nativeDebug (243.21565.129)
org.intellij.featureSuggester (243.283)
org.jetbrains.plugins.github (243.21565.204-ultimate)
com.jetbrains.changeReminder (243.21565.122)
com.intellij.spring.ws (243.21565.129)
com.intellij.lang.jsgraphql (243.21565.122)
izhangzhihao.rainbow.brackets (2024.2.7-241)
dev.turingcomplete.intellijdevelopertoolsplugins (6.0.1)
ru.adelf.idea.dotenv (2024.3)
org.jetbrains.toolbox-enterprise-client (2024.4.1.9053-ij243)
zielu.gittoolbox (600.0.9+243)
com.intellij.spring.graphql (243.21565.129)
com.jetbrains.evaluation.scratcher (1.6-SNAPSHOT)
com.intellij.java.rareRefactorings (243.21565.129)
com.intellij.plugins.html.instantEditing (243.21565.129)
Kotlin: 243.21565.193-IJ

1 Like

Hey @prajoth89, unfortunately, we didn’t have time to tackle this issue in our latest release. Here is our bug ticket for reference.

We are likely to be making a new release in the coming days, and I will try to include this fix. Please note that this error should be noisy but without any impact on SonarQube for IDE.

2 Likes

We have just released SonarQube for IntelliJ 10.13.1. Could you please upgrade to this version and see if you can reproduce the issue? Thank you!

1 Like

But one thing I’ve noticed with this issue is somehow when I turn on the SonarLint plugin the IntelliJ memory usage goes up significantly.

Here’s a screenshot of what it looks like before and after.

BEFORE
image

AFTER

image

Memory usage is expected to increase, although not as much as your screenshot shows. When you click on this memory indicator, I believe it triggers a GC cycle. I recommend making sure you’re clicking on it before checking the before/after.