kumaraman21/IntelliJBehave — Issue #6: Exception: Access is allowed from event dispatch thread only.
Author: fibric
Created: 2012-01-11 10:53:43+00:00
State: open

In Intellij Idea 11.0.1 JBehave causes an Exception:

```
Details: Current thread: Thread[JobScheduler pool 3/4,5,Idea Thread Group] 1424228791
Our dispatch thread:Thread[AWT-EventQueue-0 11.0.1#IU-111.167, eap:false,6,Idea Thread Group] 1353776547
SystemEventQueueThread: Thread[AWT-EventQueue-0 11.0.1#IU-111.167, eap:false,6,Idea Thread Group] 1353776547
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:61)
at com.intellij.openapi.application.impl.ApplicationImpl.d(ApplicationImpl.java:973)
at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread(ApplicationImpl.java:957)
at com.intellij.openapi.wm.impl.FocusManagerImpl.p(FocusManagerImpl.java:1097)
at com.intellij.openapi.wm.impl.FocusManagerImpl.isFocusTransferReady(FocusManagerImpl.java:616)
at com.intellij.openapi.wm.impl.FocusManagerImpl.isFocusBeingTransferred(FocusManagerImpl.java:1051)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.isFocusBeingTransferred(IdeFocusManagerImpl.java:138)
at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:250)
at com.intellij.ide.impl.DataManagerImpl.getDataContext(DataManagerImpl.java:205)
at com.github.kumaraman21.intellijbehave.utility.ProjectFinder.getCurrentProject(ProjectFinder.java:27)
at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolve(StepPsiReference.java:54)
at com.github.kumaraman21.intellijbehave.resolver.StoryAnnotator.annotate(StoryAnnotator.java:42)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:157)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:100)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$8.run(GeneralHighlightingPass.java:593)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:771)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:84)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.RefCountHolder.analyze(RefCountHolder.java:238)
at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:135)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:639)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:204)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:58)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:350)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1037)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:342)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:206)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:340)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:316)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:134)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:131)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:61)
at com.intellij.openapi.application.impl.ApplicationImpl.d(ApplicationImpl.java:973)
at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread(ApplicationImpl.java:957)
at com.intellij.openapi.wm.impl.FocusManagerImpl.p(FocusManagerImpl.java:1097)
at com.intellij.openapi.wm.impl.FocusManagerImpl.isFocusTransferReady(FocusManagerImpl.java:616)
at com.intellij.openapi.wm.impl.FocusManagerImpl.isFocusBeingTransferred(FocusManagerImpl.java:1051)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.isFocusBeingTransferred(IdeFocusManagerImpl.java:138)
at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:250)
at com.intellij.ide.impl.DataManagerImpl.getDataContext(DataManagerImpl.java:205)
at com.github.kumaraman21.intellijbehave.utility.ProjectFinder.getCurrentProject(ProjectFinder.java:27)
at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolve(StepPsiReference.java:54)
at com.github.kumaraman21.intellijbehave.resolver.StoryAnnotator.annotate(StoryAnnotator.java:42)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:157)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:100)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$8.run(GeneralHighlightingPass.java:593)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:771)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:84)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.RefCountHolder.analyze(RefCountHolder.java:238)
at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:135)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:639)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:204)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:58)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:350)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1037)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:342)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:206)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:340)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:316)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:134)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:131)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:61)
at com.intellij.openapi.application.impl.ApplicationImpl.d(ApplicationImpl.java:973)
at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread(ApplicationImpl.java:957)
at com.intellij.openapi.wm.impl.FocusManagerImpl.p(FocusManagerImpl.java:1097)
at com.intellij.openapi.wm.impl.FocusManagerImpl.isFocusTransferReady(FocusManagerImpl.java:616)
at com.intellij.openapi.wm.impl.FocusManagerImpl.isFocusBeingTransferred(FocusManagerImpl.java:1051)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.isFocusBeingTransferred(IdeFocusManagerImpl.java:138)
at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:250)
at com.intellij.ide.impl.DataManagerImpl.getDataContext(DataManagerImpl.java:205)
at com.github.kumaraman21.intellijbehave.utility.ProjectFinder.getCurrentProject(ProjectFinder.java:27)
at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolve(StepPsiReference.java:54)
at com.github.kumaraman21.intellijbehave.resolver.StoryAnnotator.annotate(StoryAnnotator.java:42)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:157)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:100)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$8.run(GeneralHighlightingPass.java:593)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:771)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:84)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.RefCountHolder.analyze(RefCountHolder.java:238)
at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:135)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:639)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:204)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:58)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:350)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1037)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:342)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:206)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:340)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:316)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:134)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:131)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
```

This happens after creating a new story file from File menu create new JBehave story.

Running Idea in 64bit mode on Windows 7 64bit.