Error in SonarLint for IntelliJ 10.8.1: Write-unsafe context!

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2024.2
  • SonarLint: 10.8.1.79205
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)

Hi @Shahbaz_Hussain

Is this the whole log? If not can you share the remaining part?
Can you describe what you were doing before this error occurred?

Thank you

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2024.2.0.1
  • SonarLint: 10.8.1.79205
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)

Hi,

Is the full stacktrace available? Also, can you share what you were doing when this happened?

 
Thx,
Ann

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Windows 11 amd64
  • IDE: IntelliJ IDEA 2024.2.0.1
  • SonarLint: 10.8.1.79205
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)

Hi,

Welcome to the community and thanks for this report!

Can you share what you were doing when this happened? Also, is the full stacktrace available?

 
Thx,
Ann

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2024.2.0.1
  • 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)

Can you upgrade to v10.8.1 and see if the issue persists?

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Linux amd64
  • IDE: IntelliJ IDEA 2024.2.0.1
  • SonarLint: 10.8.1.79205
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)

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Linux amd64
  • IDE: IntelliJ IDEA 2024.2.0.1
  • SonarLint: 10.8.1.79205
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)

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Mac OS X x86_64
  • IDE: IntelliJ IDEA 2024.2.0.2
  • SonarLint: 10.8.1.79205
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)

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Linux amd64
  • IDE: IntelliJ IDEA 2024.2.0.2
  • SonarLint: 10.8.1.79205
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)

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2024.2.0.2
  • SonarLint: 10.8.1.79205
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)

Hi @evteev777 , @pavankjadda , @Maxime_anlitaka , @Ly_Heng

Is this the whole log? If not can you share the remaining part?
Can you describe what you were doing before this error occurred?

Thank you

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Mac OS X aarch64
  • IDE: PyCharm 2024.2.0.1
  • SonarLint: 10.8.1.79205
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)

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Windows 11 amd64
  • IDE: IntelliJ IDEA 2024.2.0.2
  • SonarLint: 10.8.1.79205
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)

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Windows 11 amd64
  • IDE: IntelliJ IDEA 2024.2.1
  • SonarLint: 10.8.1.79205
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)

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2024.2.1
  • SonarLint: 10.8.1.79205
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)

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2024.2.1
  • SonarLint: 10.8.1.79205
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)

Environment:

  • Java: JetBrains s.r.o. 21.0.3
  • OS: Windows 11 amd64
  • IDE: IntelliJ IDEA 2024.2.0.2
  • SonarLint: 10.8.1.79205
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)