Error in SonarLint for IntelliJ

Environment:

  • Java: JetBrains s.r.o. 21.0.4
  • OS: Windows 11 amd64
  • IDE: PyCharm 2024.2.3
  • SonarLint: 10.11.0.79648

Browsing source code

java.io.UncheckedIOException: java.nio.channels.ClosedByInterruptException
	at c.ij.oa.vfs.newvfs.persistent.FSRecordsImpl.lambda$static$0(FSRecordsImpl.java:148)
	at c.ij.oa.vfs.newvfs.persistent.FSRecordsImpl.handleError(FSRecordsImpl.java:1390)
	at c.ij.oa.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1326)
	at c.ij.oa.vfs.newvfs.persistent.PersistentFSImpl.writeContent(PersistentFSImpl.java:491)
	at c.ij.oa.vfs.newvfs.persistent.PersistentFSImpl.contentsToByteArray(PersistentFSImpl.java:838)
	at c.ij.oa.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:120)
	at c.ij.oa.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:109)
	at c.ij.oa.vfs.VfsUtilCore.loadBytes(VfsUtilCore.java:415)
	at c.ij.oa.vfs.newvfs.impl.VirtualFileSystemEntry.computeCharset(VirtualFileSystemEntry.java:500)
	at c.ij.oa.vfs.newvfs.impl.VirtualFileSystemEntry.getCharset(VirtualFileSystemEntry.java:483)
	at o.sl.ij.SonarLintIntelliJClient.toClientFileDto(SonarLintIntelliJClient.kt:798)
	at o.sl.ij.SonarLintIntelliJClient.listModuleFiles(SonarLintIntelliJClient.kt:736)
	at o.sl.ij.SonarLintIntelliJClient.listFiles$lambda$27$lambda$26(SonarLintIntelliJClient.kt:677)
	at o.sl.ij.util.ThreadUtilsKt.computeOnPooledThread$lambda$2(ThreadUtils.kt:47)
	at c.ij.oa.ap.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$2.call(AnyThreadWriteThreadingSupport.kt:162)
	at c.ij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at c.ij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.nio.channels.ClosedByInterruptException
	at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:200)
	at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
	at java.base/sun.nio.ch.FileChannelImpl.size(FileChannelImpl.java:430)
	at c.ij.util.io.IOUtil.allocateFileRegion(IOUtil.java:384)
	at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage$Page.ensureFileRegionAllocatedAndZeroed(MMappedFileStorage.java:515)
	at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage$Page.map(MMappedFileStorage.java:471)
	at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage$Page.<init>(MMappedFileStorage.java:453)
	at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndexLocked(MMappedFileStorage.java:422)
	at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndex(MMappedFileStorage.java:243)
	at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByOffset(MMappedFileStorage.java:228)

Hello @DavidSC, and thanks for reaching out to us!

This issue should normally be fixed on SonarLint 10.11.1. Could you update and see if you still face any problem?

Thank you, Nicolas. I’ve updated – no crashes so far!

2 Likes

Super, thank you for letting us know!

If you enjoy SonarLint for IntelliJ, do not hesitate to leave a review on our marketplace page, it’s always appreciated :sonarlint: