Error in SonarLint for IntelliJ

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2024.2 EAP
  • SonarLint: 10.7.0.78874
java.lang.Throwable: Write-unsafe context! Model changes are allowed from write-safe contexts only. Please ensure you're using invokeLater/invokeAndWait with a correct modality state (not "any"). See TransactionGuard documentation for details.
  current modality=ModalityState.NON_MODAL
	at c.ij.oa.diagnostic.Logger.error(Logger.java:376)
	at c.ij.oa.application.TransactionGuardImpl.assertWriteActionAllowed(TransactionGuardImpl.java:136)
	at c.ij.psi.impl.PsiModificationTrackerImpl.fireEvent(PsiModificationTrackerImpl.java:81)
	at c.ij.psi.impl.PsiModificationTrackerImpl.incCountersInner(PsiModificationTrackerImpl.java:87)
	at c.ij.psi.impl.PsiModificationTrackerImpl.treeChanged(PsiModificationTrackerImpl.java:97)
	at c.ij.psi.impl.PsiManagerImpl.fireEvent(PsiManagerImpl.java:346)
	at c.ij.psi.impl.PsiManagerImpl.beforeChildrenChange(PsiManagerImpl.java:239)
	at c.ij.psi.impl.file.impl.FileManagerImpl.forceReload(FileManagerImpl.java:161)
	at c.ij.psi.impl.file.impl.PsiVFSListener.propertyChanged(PsiVFSListener.java:344)
	at c.ij.psi.impl.file.impl.PsiVFSListener.fireForGrouped(PsiVFSListener.java:782)
	at one.util.streamex.CollapseSpliterator.accept(CollapseSpliterator.java:152)
	at one.util.streamex.CollapseSpliterator.forEachRemaining(CollapseSpliterator.java:142)
	at one.util.streamex.AbstractStreamEx.forEach(AbstractStreamEx.java:352)
	at c.ij.psi.impl.file.impl.PsiVFSListener.groupAndFire(PsiVFSListener.java:756)
	at c.ij.psi.impl.file.impl.PsiVFSListener.after(PsiVFSListener.java:746)

Hello @markusheiden, thank you for your report!

We would appreciate it if you could share the full stack trace. Regardless, we are investigating the issue and will try to fix it for the next release.

Sorry, but I have no stacktrace. I used the IDEA auto error reporter and cleared the error message afterwards.