Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: "Read access is allowed from event dispatch thread or inside read-action only" #140

Closed
windmueller opened this issue Mar 31, 2015 · 1 comment

Comments

@windmueller
Copy link

After using checkstyle from the commit dialog in IDEA 14.1, I received this exception:

Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
Details: Current thread: Thread[ApplicationImpl pooled thread 39,4,main] 1294714407
; dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0 14.1#IU-141.177.4, eap:false,6,main] 1096794837
java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:126)
    at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:982)
    at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:375)
    at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:184)
    at org.infernus.idea.checkstyle.checker.AbstractCheckerThread$1.visitFile(AbstractCheckerThread.java:109)
    at com.intellij.openapi.vfs.VirtualFileVisitor.visitFileEx(VirtualFileVisitor.java:132)
    at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:264)
    at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.buildFilesList(AbstractCheckerThread.java:105)
    at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.<init>(AbstractCheckerThread.java:47)
    at org.infernus.idea.checkstyle.checker.ScanFilesThread.<init>(ScanFilesThread.java:35)
    at org.infernus.idea.checkstyle.CheckStylePlugin.scanFiles(CheckStylePlugin.java:198)
    at org.infernus.idea.checkstyle.handlers.ScanFilesBeforeCheckinHandler$2.run(ScanFilesBeforeCheckinHandler.java:98)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
    at com.intellij.openapi.progress.impl.CoreProgressManager$8.run(CoreProgressManager.java:367)
    at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:452)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
    at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:623)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
    at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)

@jshiell
Copy link
Owner

jshiell commented Apr 10, 2015

Thanks for the report. I've wrapped this in a readAction, so it should be fixed as of 4.14.1.

@jshiell jshiell closed this as completed Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants