AssertionError when checking if compile scope is up-to-date


I'm facing a strange problem : when I run my plugin under the sandbox environment, everything works. But in the real mode, aka when the plugin is deployed through the plugin manager or unzipped into the config/plugins directory, checking if the compilation status is up-to-date throws an error. Here's my snippet :

final CompilerManager compilerManager = CompilerManager.getInstance(project); final VirtualFile[] files = {virtualFile}; final CompileScope compileScope = compilerManager.createFilesCompileScope(files);
if (outputDirectory != null && compilerManager.isUpToDate(compileScope)) {

It throws the following error when not run in sandbox mode :

null java.lang.AssertionError      at com.intellij.openapi.project.DumbServiceImpl.waitForSmartMode(      at com.intellij.compiler.impl.CompileDriver.a(      at com.intellij.compiler.impl.CompileDriver.a(      at com.intellij.compiler.impl.CompileDriver.a(

The complete source may be found here.

What am I doing wrong ? Dumb mode seems to be when IDEA is indexing files, but that's not the case here.

Thanks !
1 comment

Ok, the problem was that the up-to-date check was made from the dispatch thread. Fixed.


Please sign in to leave a comment.