Exception this morning with SonarLint on Intelij 2016.3.1

30 views
Skip to first unread message

Eric Hartmann

unread,
Dec 14, 2016, 5:16:25 AM12/14/16
to SonarLint
Hi guys,

Just to let you know that I've observed this exception while working on a groovy script (without any connection to a SonarQube server e) :

Write access is 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
  known modalities={ModalityState.NON_MODAL=true}
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.intellij.openapi.application.TransactionGuardImpl.assertWriteActionAllowed(TransactionGuardImpl.java:246)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveDocument(FileDocumentManagerImpl.java:337)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveDocument(FileDocumentManagerImpl.java:332)
at org.sonarlint.intellij.util.SonarLintUtils.saveFile(SonarLintUtils.java:135)
at org.sonarlint.intellij.util.SonarLintUtils.lambda$saveFiles$0(SonarLintUtils.java:100)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:934)
at org.sonarlint.intellij.util.SonarLintUtils.saveFiles(SonarLintUtils.java:98)
at org.sonarlint.intellij.analysis.SonarLintJobManager.runTask(SonarLintJobManager.java:102)
at org.sonarlint.intellij.analysis.SonarLintJobManager.runInEDT(SonarLintJobManager.java:89)
at org.sonarlint.intellij.analysis.SonarLintJobManager.submitBackground(SonarLintJobManager.java:64)
at org.sonarlint.intellij.trigger.SonarLintSubmitter.submitFiles(SonarLintSubmitter.java:95)
at org.sonarlint.intellij.trigger.SonarLintSubmitter.submitOpenFilesAuto(SonarLintSubmitter.java:58)
at org.sonarlint.intellij.trigger.MakeTrigger.compilationFinished(MakeTrigger.java:73)
at sun.reflect.GeneratedMethodAccessor1145.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:381)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:368)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:354)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:347)
at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:42)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:230)
at com.sun.proxy.$Proxy79.compilationFinished(Unknown Source)
at com.intellij.compiler.CompilerManagerImpl$ListenerNotificator.finished(CompilerManagerImpl.java:486)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:486)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.h(IdeEventQueue.java:843)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:679)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:391)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Note that Intellij was running on Low memory quite quickly (idea.log) making it unusable (I'm not sure that it's related to SonarLint) :

 19 2016-12-14 11:03:43,576 [14271479]   INFO - ntellij.analysis.SonarLintTask - Running SonarLint Analysis for 2 files
 20 2016-12-14 11:03:45,225 [14273128]   INFO - .openapi.util.LowMemoryWatcher - Low memory signal received.

Here is the information :
++
--
Eric HARTMANN | SonarSource

Duarte Meneses

unread,
Dec 14, 2016, 8:33:58 AM12/14/16
to Eric Hartmann, SonarLint
Thanks for reporting this.
It should be fixed in the latest version deployed in the repository (2.6.0.1510). Could you give it a try and let us know if the problem is still there?

Here is the ticket: https://jira.sonarsource.com/browse/SLI-147

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/CAA%3Dgi3cwDt_Ab_MwL%2BW3f0_ajevoEBvT-tKOO0OtqZHWqD9VMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Duarte MENESES | SonarSource

Eric Hartmann

unread,
Dec 14, 2016, 8:42:17 AM12/14/16
to Duarte Meneses, SonarLint
Thanks Duarte,

I've just checked with 2.6.0.1510 from repox. And I do confirm that the exception is no more thrown !

Cheers,

To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.



--
Duarte MENESES | SonarSource
--
Reply all
Reply to author
Forward
0 new messages