SBT project refresh fails with "Unable to unmap shared space"

After recent update I started to have problems with reloading/refreshing SBT project. First it was intermittent now it is constant. Wheneber I try to refresf SBT project I am getting error: "Unable to unmap shared space". Tried with multiple project, the same error.

There are thing in the idea.log that seems to be related:

2015-10-16 09:22:22,999 [ 483984]   INFO - ution.rmi.RemoteProcessSupport - Error occurred during initialization of VM
2015-10-16 09:22:22,999 [ 483984]   INFO - ution.rmi.RemoteProcessSupport - Unable to use shared archive.
2015-10-16 09:22:23,004 [ 483989]   WARN - ution.rmi.RemoteProcessSupport - An error has occurred while processing the shared archive file.
2015-10-16 09:22:23,004 [ 483989]   WARN - ution.rmi.RemoteProcessSupport - Unable to unmap shared space.
2015-10-16 09:22:23,005 [ 483990]   INFO - ution.rmi.RemoteProcessSupport - Process finished with exit code 1
2015-10-16 09:22:23,006 [ 483991]   WARN - nal.AbstractExternalSystemTask -  
java.lang.reflect.UndeclaredThrowableException
    at com.sun.proxy.$Proxy113.getResolver(Unknown Source)
    at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48)
    at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
    at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:124)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:419)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$2.run(ExternalSystemUtil.java:500)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
    at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:365)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
Caused by: com.intellij.execution.ExecutionException: An error has occurred while processing the shared archive file.
Unable to unmap shared space.



I tried to restart IDEA, does not help.

Is there any way to get project refresh working back?

Jarek

7 comments
Comment actions Permalink

I am seeing this problem also.

0
Comment actions Permalink

Hi! What version of IDEA and Scala plugin do you use? What is your operating system?

0
Comment actions Permalink

Thet was the latest version of IDEA 15 and Scala plugin at the time of the writing.
.
I did not see it recently with the latest versions. I think I deleted all the cashes and stopped seeing the errors.

0
Comment actions Permalink

Same thing here.  I am no longer seeing it on the newer builds.

Currently running:
IntelliJ IDEA (build #IU-143.379.11, 20 Oct 2015 00:00)
OS: Windows 7 (6.1, x86)
JRE: 1.8.0_51-b16 (Oracle Corporation)

Scala Plugin: 1.9.4.21

0
Comment actions Permalink

Hi,

I'm also experiencing this issue. First time it occured for me was after installing IntellIJ IDEA 15 EAP, and was occuring while using EAP, RC1 and RC2 (always with up-to-date Scala plugin version).

Now I'm running Intellij IDEA 15 (Build #IC-143.381, built on October 30, 2015) with Scala plugin version 2.0.0 and I still experience this issue - after retrying to refresh SBT project several times, eventually it'll work.

java -version output:

java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)


This problem also happens to my co-worker, he's running Java 1.8.0_45. We both use Windows 8.1, x64.

idea.log output:

2015-11-04 10:14:50,488 [1592776]   INFO - ution.rmi.RemoteProcessSupport - "C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\jre\jre\bin\java" -Djava.awt.headless=true -Dsun.rmi.transport.connectionTimeout=3600000 -Dexternal.system.id=SBT -Didea.log.path=C:\Users\mkobierski\.IdeaIC15\system\log -Dfile.encoding=windows-1252 -classpath "/C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 142.5239.7/lib/idea.jar;/C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 142.5239.7/lib/resources_en.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\picocontainer.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\trove4j.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\resources_en.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\annotations.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\snappy-in-java-0.3.1.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\jdom.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\jna-platform.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\log4j.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\oromatcher.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\util.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\jna.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\openapi.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\idea.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\lib\extensions.jar;C:\Users\mkobierski\.IdeaIC15\config\plugins\Scala\lib\scala-plugin.jar;C:\Users\mkobierski\.IdeaIC15\config\plugins\Scala\lib\sbt-structure-core_2.11.jar;C:\Users\mkobierski\.IdeaIC15\config\plugins\Scala\lib\scala-library.jar;C:\Users\mkobierski\.IdeaIC15\config\plugins\Scala\lib\scala-xml.jar" com.intellij.openapi.externalSystem.service.RemoteExternalSystemFacadeImpl org.jetbrains.sbt.project.SbtProjectResolver org.jetbrains.sbt.project.SbtTaskManager
2015-11-04 10:14:50,514 [1592802]   INFO - ution.rmi.RemoteProcessSupport - Error occurred during initialization of VM
2015-11-04 10:14:50,514 [1592802]   WARN - ution.rmi.RemoteProcessSupport - An error has occurred while processing the shared archive file.
2015-11-04 10:14:50,514 [1592802]   INFO - ution.rmi.RemoteProcessSupport - Unable to use shared archive.
2015-11-04 10:14:50,514 [1592802]   WARN - ution.rmi.RemoteProcessSupport - Unable to unmap shared space.
2015-11-04 10:14:50,515 [1592803]   INFO - ution.rmi.RemoteProcessSupport - Process finished with exit code 1
2015-11-04 10:14:50,516 [1592804]   WARN - nal.AbstractExternalSystemTask -  
java.lang.reflect.UndeclaredThrowableException
 at com.sun.proxy.$Proxy64.getResolver(Unknown Source)
 at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48)
 at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
 at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:124)
 at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:419)
 at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$2.run(ExternalSystemUtil.java:500)
 at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
 at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
 at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
 at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
 at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
 at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:365)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
 at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
Caused by: com.intellij.execution.ExecutionException: An error has occurred while processing the shared archive file.
Unable to unmap shared space.

 at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:162)
 at com.intellij.openapi.externalSystem.service.RemoteExternalSystemCommunicationManager.acquire(RemoteExternalSystemCommunicationManager.java:218)
 at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doCreateFacade(ExternalSystemFacadeManager.java:189)
 at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doGetFacade(ExternalSystemFacadeManager.java:178)
 at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:133)
 at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:270)
 ... 20 more


My SBT project is Play 2 application, imported via 'Import project' option
0
Comment actions Permalink

This is known bug of JVM 8 on Windows (https://bugs.openjdk.java.net/browse/JDK-8134687). Try running java -Xshare:dump (please make sure that you're using java from the same JDK you have issues with). If it is not helping, try to remove JAVA_HOME/jre/lib/server/classes.jsa file.

0
Comment actions Permalink

Some magic with java share:dump helped. Run it like this as Administrator:

C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 142.5239.7\jre\jre\bin>java -Xshare:dump -version

0

Please sign in to leave a comment.