OutOfMemoryError in 2016.3 EAP

Answered

I am consistently getting OutOfMemoryError when opening a relatively large project (~80000 files) in IDEA 2016.3 EAP. The error is:

java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.$$YJP$$start0(Native Method)
at java.lang.Thread.start0(Thread.java)
at java.lang.Thread.start(Thread.java:714)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at com.intellij.openapi.application.impl.ApplicationImpl.executeOnPooledThread(ApplicationImpl.java:300)
at org.jetbrains.kotlin.idea.caches.JarUserDataManager.scheduleJarProcessing(JarUserDataManager.kt:79)
at org.jetbrains.kotlin.idea.caches.JarUserDataManager.hasFileWithProperty(JarUserDataManager.kt:68)
at org.jetbrains.kotlin.idea.framework.KotlinJavaScriptLibraryDetectionUtil$HasKotlinJSMetadataInJar.hasMetadataFromCache(KotlinJavaScriptLibraryDetectionUtil.kt:62)
at org.jetbrains.kotlin.idea.framework.KotlinJavaScriptLibraryDetectionUtil.isKotlinJavaScriptLibrary(KotlinJavaScriptLibraryDetectionUtil.kt:41)
at org.jetbrains.kotlin.idea.framework.KotlinJavaScriptLibraryDetectionUtil.isKotlinJavaScriptLibrary(KotlinJavaScriptLibraryDetectionUtil.kt:33)
at org.jetbrains.kotlin.idea.framework.JsLibraryStdDetectionUtil.hasJsStdlibJar(JsLibraryStdDetectionUtil.java:47)
at org.jetbrains.kotlin.idea.project.ProjectStructureUtil$2$1.process(ProjectStructureUtil.java:76)
at org.jetbrains.kotlin.idea.project.ProjectStructureUtil$2$1.process(ProjectStructureUtil.java:73)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.c(OrderEnumeratorBase.java:339)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.processEntries(OrderEnumeratorBase.java:302)
at com.intellij.openapi.roots.impl.ModuleOrderEnumerator.forEach(ModuleOrderEnumerator.java:47)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.forEachLibrary(OrderEnumeratorBase.java:335)
at com.intellij.openapi.roots.impl.ModuleOrderEnumerator.forEachLibrary(ModuleOrderEnumerator.java:32)
at org.jetbrains.kotlin.idea.project.ProjectStructureUtil$2.compute(ProjectStructureUtil.java:73)
at org.jetbrains.kotlin.idea.project.ProjectStructureUtil$2.compute(ProjectStructureUtil.java:68)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:883)
at org.jetbrains.kotlin.idea.project.ProjectStructureUtil.getJSStandardLibrary(ProjectStructureUtil.java:68)
at org.jetbrains.kotlin.idea.project.ProjectStructureUtil.access$000(ProjectStructureUtil.java:37)
at org.jetbrains.kotlin.idea.project.ProjectStructureUtil$1.compute(ProjectStructureUtil.java:55)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:65)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
at org.jetbrains.kotlin.idea.project.ProjectStructureUtil.isJsKotlinModule(ProjectStructureUtil.java:63)
at org.jetbrains.kotlin.idea.project.TargetPlatformDetector.getPlatform(TargetPlatformDetector.java:60)
at org.jetbrains.kotlin.idea.project.TargetPlatformDetector.getPlatform(TargetPlatformDetector.java:55)
at org.jetbrains.kotlin.idea.caches.resolve.KotlinCacheServiceImpl.getFacadeToAnalyzeFiles(KotlinCacheServiceImpl.kt:207)
at org.jetbrains.kotlin.idea.caches.resolve.KotlinCacheServiceImpl.getResolutionFacade(KotlinCacheServiceImpl.kt:52)
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils.analyzeFullyAndGetResult(resolutionApi.kt:77)
at org.jetbrains.kotlin.idea.highlighter.KotlinPsiChecker.annotate(KotlinPsiChecker.kt:63)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:139)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:363)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:298)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:322)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:297)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:237)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:433)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1049)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:426)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:425)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:405)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:155)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

The project that I'm opening does not use Kotlin (but I have used it in other projects).

I'm using build 163.5219.11 on Windows 10. I was able to open this project without any errors on previous 2016.3 EAP versions.

I have already tried invalidating the cache and deleting the system/caches and system/index folders with no success.

4 comments
Comment actions Permalink

Done.

 

Thank you for the information, Serge.

0
Comment actions Permalink

I am getting this, too. Can you link to the bug report you created?

0

Please sign in to leave a comment.