Error in unit tests: DefaultColorSchemesManager has default state, but not marked to load it
I made some changes to my IDE color scheme and now I get the following stacktrace every time I run a JUnit test against my plugin in the IDE. Any ideas how to fix this?
ERROR: DefaultColorSchemesManager has default state, but not marked to load it
java.lang.Throwable at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115) at com.intellij.openapi.components.impl.stores.ComponentStoreImpl.a(ComponentStoreImpl.java:303) at com.intellij.openapi.components.impl.stores.ComponentStoreImpl.initComponent(ComponentStoreImpl.java:75) at com.intellij.openapi.application.impl.ApplicationImpl.initializeComponent(ApplicationImpl.java:182) at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.initializeInstance(ServiceManagerImpl.java:233) at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter$1.compute(ServiceManagerImpl.java:216) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:890) at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.getComponentInstance(ServiceManagerImpl.java:207) at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245) at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211) at org.picocontainer.defaults.BasicComponentParameter.resolveInstance(BasicComponentParameter.java:77) at org.picocontainer.defaults.ComponentParameter.resolveInstance(ComponentParameter.java:114) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:257) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:217) at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248) at com.intellij.util.pico.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:58) at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.initializeInstance(ServiceManagerImpl.java:228) at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter$1.compute(ServiceManagerImpl.java:216) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:890) at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.getComponentInstance(ServiceManagerImpl.java:207) at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245) java.lang.RuntimeException: java.lang.RuntimeException: DefaultColorSchemesManager has default state, but not marked to load it at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$21.run(CodeInsightTestFixtureImpl.java:1220) at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2398) at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1212) at com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase.setUp(LightPlatformCodeInsightFixtureTestCase.java:65) at com.sencha.idea.IntegrationTestBase.super$5$setUp(IntegrationTestBase.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150) at com.sencha.idea.IntegrationTestBase.setUp(IntegrationTestBase.groovy:22) at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:341) at com.intellij.testFramework.UsefulTestCase$4.run(UsefulTestCase.java:428) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:676) at java.awt.EventQueue$2.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.awt.EventQueue.dispatchEvent(EventQueue.java:685) at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:734) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: java.lang.RuntimeException: DefaultColorSchemesManager has default state, but not marked to load it at com.intellij.openapi.ui.TestDialog$1.show(TestDialog.java:23) at com.intellij.openapi.ui.Messages.showDialog(Messages.java:263) at com.intellij.openapi.ui.Messages.showDialog(Messages.java:288) at com.intellij.openapi.ui.Messages.showDialog(Messages.java:299) at com.intellij.openapi.ui.Messages.showErrorDialog(Messages.java:729) at com.intellij.openapi.project.impl.ProjectManagerImpl.newProject(ProjectManagerImpl.java:279) at com.intellij.openapi.project.impl.ProjectManagerImpl.newProject(ProjectManagerImpl.java:230) at com.intellij.testFramework.PlatformTestCase.createProject(PlatformTestCase.java:252) at com.intellij.testFramework.LightPlatformTestCase$2.run(LightPlatformTestCase.java:252) at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:166) at com.intellij.openapi.application.RunResult.run(RunResult.java:38) at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:114) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:937) at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:111) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:124) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99) at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:108) at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:80) at com.intellij.testFramework.LightPlatformTestCase.a(LightPlatformTestCase.java:236) at com.intellij.testFramework.LightPlatformTestCase.doSetup(LightPlatformTestCase.java:399) at com.intellij.testFramework.fixtures.impl.LightIdeaTestFixtureImpl.setUp(LightIdeaTestFixtureImpl.java:51) at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$21.run(CodeInsightTestFixtureImpl.java:1216) ... 33 more Process finished with exit code 255
请先登录再写评论。
Please use the -Didea.config.path VM option to make sure that your tests use a different settings directory from the one used by your main IDEA installation.
What would be an example value? Is that the path to where IntelliJ is installed? Is there a way for me to set that universally or do I have to set that every time I run a test?
This is a bug that is already fixed in the upcoming IntelliJ IDEA 14.1.3 EAP.
I asked responsible engineer to suggest a workaround for you (if any available).
Please use IntelliJ IDEA 14.1.3 EAP — https://confluence.jetbrains.com/display/IDEADEV/IDEA+14.1+EAP