intellij getting stuck when optimizing imports

I work on a scala project. Some devs of the projects seem to like a lot implicits and mixin traits (the project is a feast of those !). I think this makes the optimizer run forever. I was trying to optimize imports on 2 classes before commiting them. I had it running during my lunch and when I got back to my desk, it was still running. It is activelly uses one of my cpu's and memory usage is slowly increases over time. I can't share or replicate the project code that creates the issue, but I was able to take a stacktrace (thread dump). Is this an intellij bug?

This occurs quite often with classes of this project. This is the stacktrace from the thread dump:


"AWT-EventQueue-0 14.0.3#IC-139.1117.1, eap:false" prio=10 tid=0lix00007fc00018c000 nid=0x3137 runnable [0x00007fc01821f000]
   java.lang.Thread.State: RUNNABLE
    at java.util.HashMap.newKeyIterator(HashMap.java:968)
    at java.util.HashMap$KeySet.iterator(HashMap.java:1002)
    at java.util.HashSet.iterator(HashSet.java:170)
    at org.jetbrains.plugins.scala.lang.resolve.processor.ImplicitProcessor.changedLevel(ImplicitProcessor.scala:60)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector.collect(ImplicitCollector.scala:77)
    at org.jetbrains.plugins.scala.lang.psi.api.InferUtil$.findImplicits(InferUtil.scala:151)
    at org.jetbrains.plugins.scala.lang.psi.api.InferUtil$$anonfun$updateTypeWithImplicitParameters$1.apply(InferUtil.scala:89)
    at org.jetbrains.plugins.scala.lang.psi.api.InferUtil$$anonfun$updateTypeWithImplicitParameters$1.apply(InferUtil.scala:82)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizablileArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
    at org.jetbrains.plugins.scala.lang.psi.api.InferUtil$.updateTypeWithImplicitParameters(InferUtil.scala:82)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.org$jetbrains$plugins$scala$lang$psi$implicits$ImplicitCollector$ImplicitParametersProcessor$$compute$1(ImplicitCollector.scala:267)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor$$anonfun$10.apply(ImplicitCollector.scala:298)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor$$anonfun$10.apply(ImplicitCollector.scala:298)
    at org.jetbrains.plugins.scala.caches.ScalaRecursionManager$.doComputations(ScalaRecursionManager.scala:68)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.checkType$1(ImplicitCollector.scala:291)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.org$jetbrains$plugins$scala$lang$psi$implicits$ImplicitCollector$ImplicitParametersProcessor$$forMap$1(ImplicitCollector.scala:335)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.mapCandidates$1(ImplicitCollector.scala:369)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.candidatesS(ImplicitCollector.scala:392)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector.collect(ImplicitCollector.scala:97)
    at org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil$.checkImplicits$1(ScalaPsiUtil.scala:365)
    at org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil$.findImplicitConversion(ScalaPsiUtil.scala:369)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.collectImplicits(ResolvableReferenceExpression.scala:500)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.processType(ResolvableReferenceExpression.scala:428)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.processTypes(ResolvableReferenceExpression.scala:380)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.resolveUnqalified(ResolvableReferenceExpression.scala:90)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.doResolve(ResolvableReferenceExpression.scala:75)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.doResolve(ScReferenceExpressionImpl.scala:38)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver.nonAssignResolve$1(ReferenceExpressionResolver.scala:116)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver.resolve(ReferenceExpressionResolver.scala:141)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.org$jetbrains$plugins$scala$lang$resolve$ResolvableReferenceExpression$$shapeResolveInner(ResolvableReferenceExpression.scala:51)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$$anonfun$shapeResolve$1$$anonfun$apply$1.apply(ResolvableReferenceExpression.scala:46)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$$anonfun$shapeResolve$1$$anonfun$apply$1.apply(ResolvableReferenceExpression.scala:46)
    at org.jetbrains.plugins.scala.caches.CachesUtil$MyProvider.compute(CachesUtil.scala:183)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$1$$anon$2.compute(CachesUtil.scala:134)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$1$$anon$2.compute(CachesUtil.scala:131)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$1.compute(CachesUtil.scala:131)
    at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:200)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getWithRecursionPreventingWithRollback(CachesUtil.scala:163)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.shapeResolve(ResolvableReferenceExpression.scala:45)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.shapeResolve(ScReferenceExpressionImpl.scala:38)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver$$anon$1.candidatesS(ReferenceExpressionResolver.scala:105)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver.nonAssignResolve$1(ReferenceExpressionResolver.scala:118)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver.resolve(ReferenceExpressionResolver.scala:141)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$$anonfun$multiResolve$2.apply(ResolvableReferenceExpression.scala:39)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$$anonfun$multiResolve$2.apply(ResolvableReferenceExpression.scala:39)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$4.compute(CachesUtil.scala:245)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getMappedWithRecursionPreventingWithRollback(CachesUtil.scala:242)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.multiResolve(ResolvableReferenceExpression.scala:38)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.multiResolve(ScReferenceExpressionImpl.scala:38)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceElement$class.bind(ResolvableReferenceElement.scala:28)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.bind(ScReferenceExpressionImpl.scala:38)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScInfixExprImpl.innerType(ScInfixExprImpl.scala:48)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getNonValueType$2.apply(ScExpression.scala:363)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getNonValueType$2.apply(ScExpression.scala:357)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$4.compute(CachesUtil.scala:245)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getMappedWithRecursionPreventingWithRollback(CachesUtil.scala:242)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.getNonValueType(ScExpression.scala:356)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScInfixExprImpl.getNonValueType(ScInfixExprImpl.scala:22)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getTypeWithoutImplicits$2.apply(ScExpression.scala:127)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getTypeWithoutImplicits$2.apply(ScExpression.scala:123)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$4.compute(CachesUtil.scala:245)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getMappedWithRecursionPreventingWithRollback(CachesUtil.scala:242)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.getTypeWithoutImplicits(ScExpression.scala:122)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScInfixExprImpl.getTypeWithoutImplicits(ScInfixExprImpl.scala:22)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getTypeAfterImplicitConversion$2.apply(ScExpression.scala:63)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getTypeAfterImplicitConversion$2.apply(ScExpression.scala:53)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$4.compute(CachesUtil.scala:245)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getMappedWithRecursionPreventingWithRollback(CachesUtil.scala:242)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.getTypeAfterImplicitConversion(ScExpression.scala:52)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScInfixExprImpl.getTypeAfterImplicitConversion(ScInfixExprImpl.scala:22)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer.org$jetbrains$plugins$scala$editor$importOptimizer$ScalaImportOptimizer$$checkTypeForExpression(ScalaImportOptimizer.scala:421)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer$$anon$1.process(ScalaImportOptimizer.scala:108)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer$$anon$1.process(ScalaImportOptimizer.scala:84)
    at com.intellij.concurrency.ApplierCompleter$3.run(ApplierCompleter.java:230)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1146)
    at com.intellij.concurrency.ApplierCompleter$2.run(ApplierCompleter.java:94)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.registerIndicatorAndRun(ProgressManagerImpl.java:281)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:106)
    at com.intellij.concurrency.ApplierCompleter.completeTaskWhichFailToAcquireReadAction(ApplierCompleter.java:226)
    at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyForAll(JobLauncherImpl.java:109)
    at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:160)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer.processFile(ScalaImportOptimizer.scala:84)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer.processFile(ScalaImportOptimizer.scala:50)
    at com.intellij.codeInsight.actions.OptimizeImportsProcessor.prepareTask(OptimizeImportsProcessor.java:76)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.preprocessFile(AbstractLayoutCodeProcessor.java:199)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ReformatFilesTask.performFileProcessing(AbstractLayoutCodeProcessor.java:513)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ReformatFilesTask.iteration(AbstractLayoutCodeProcessor.java:505)
    at com.intellij.util.SequentialModalProgressTask$1.run(SequentialModalProgressTask.java:95)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:748)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:832)
    at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:208)
    at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:660)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:418)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressManagerImpl.java:578)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$4.run(AbstractLayoutCodeProcessor.java:339)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$6.run(AbstractLayoutCodeProcessor.java:358)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:977)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$8$1$1.run(AbstractLayoutCodeProcessor.java:418)
    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.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$8$1.run(AbstractLayoutCodeProcessor.java:413)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:318)
    - locked <0x00000000d10406d8> (a java.lang.Object)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:748)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    at java.awt.Dialog.show(Dialog.java:1082)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:779)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:464)
    at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1569)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1536)
    at com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog.commitChanges(CommitChangeListDialog.java:165)
    at com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog.commitChanges(CommitChangeListDialog.java:222)
    at com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog.commitChanges(CommitChangeListDialog.java:197)
    at com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog.commitPaths(CommitChangeListDialog.java:191)
    at com.intellij.openapi.vcs.actions.AbstractCommonCheckinAction.performCheckIn(AbstractCommonCheckinAction.java:76)
    at com.intellij.openapi.vcs.actions.AbstractCommonCheckinAction$1.run(AbstractCommonCheckinAction.java:62)
    at com.intellij.openapi.vcs.changes.Waiter.onSuccess(Waiter.java:79)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:435)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressManagerImpl.java:578)
    at com.intellij.openapi.vcs.changes.CallbackData$3.run(CallbackData.java:83)
    at com.intellij.openapi.vcs.changes.UpdateRequestsQueue.invokeAfterUpdate(UpdateRequestsQueue.java:218)
    at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.invokeAfterUpdate(ChangeListManagerImpl.java:382)
    at com.intellij.openapi.vcs.actions.AbstractCommonCheckinAction.actionPerformed(AbstractCommonCheckinAction.java:59)
    at com.intellij.openapi.vcs.actions.AbstractVcsAction.actionPerformed(AbstractVcsAction.java:65)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:614)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:663)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:513)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:211)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:546)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.flushIdleRequests(FocusManagerImpl.java:578)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:60)
    at com.intellij.openapi.wm.impl.FocusManagerImpl$IdleRunnable.runEdt(FocusManagerImpl.java:108)
    at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:28)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:748)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

   Locked ownable synchronizers:
    - <0x00000000d0ba8cd0> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)

6 comments
Comment actions Permalink

and one more, a couple of minutes after I took the first one:

AWT-EventQueue-0 14.0.3#IC-139.1117.1, eap:false" prio=10 tid=0x00007fc00018c000 nid=0x3137 runnable [0x00007fc01821f000]
   java.lang.Thread.State: RUNNABLE
    at org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil$.collectObjects$1(ScalaPsiUtil.scala:713)
    at org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil$.collectImplicitObjects(ScalaPsiUtil.scala:734)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector.collect(ImplicitCollector.scala:102)
    at org.jetbrains.plugins.scala.lang.psi.api.InferUtil$.findImplicits(InferUtil.scala:151)
    at org.jetbrains.plugins.scala.lang.psi.api.InferUtil$$anonfun$updateTypeWithImplicitParameters$1.apply(InferUtil.scala:89)
    at org.jetbrains.plugins.scala.lang.psi.api.InferUtil$$anonfun$updateTypeWithImplicitParameters$1.apply(InferUtil.scala:82)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
    at org.jetbrains.plugins.scala.lang.psi.api.InferUtil$.updateTypeWithImplicitParameters(InferUtil.scala:82)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.org$jetbrains$plugins$scala$lang$psi$implicits$ImplicitCollector$ImplicitParametersProcessor$$compute$1(ImplicitCollector.scala:267)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor$$anonfun$10.apply(ImplicitCollector.scala:298)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor$$anonfun$10.apply(ImplicitCollector.scala:298)
    at org.jetbrains.plugins.scala.caches.ScalaRecursionManager$.doComputations(ScalaRecursionManager.scala:68)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.checkType$1(ImplicitCollector.scala:291)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.org$jetbrains$plugins$scala$lang$psi$implicits$ImplicitCollector$ImplicitParametersProcessor$$forMap$1(ImplicitCollector.scala:335)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.mapCandidates$1(ImplicitCollector.scala:369)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector$ImplicitParametersProcessor.candidatesS(ImplicitCollector.scala:392)
    at org.jetbrains.plugins.scala.lang.psi.implicits.ImplicitCollector.collect(ImplicitCollector.scala:97)
    at org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil$.checkImplicits$1(ScalaPsiUtil.scala:365)
    at org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil$.findImplicitConversion(ScalaPsiUtil.scala:369)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.collectImplicits(ResolvableReferenceExpression.scala:500)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.processType(ResolvableReferenceExpression.scala:428)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.processTypes(ResolvableReferenceExpression.scala:380)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.resolveUnqalified(ResolvableReferenceExpression.scala:90)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.doResolve(ResolvableReferenceExpression.scala:75)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.doResolve(ScReferenceExpressionImpl.scala:38)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver.nonAssignResolve$1(ReferenceExpressionResolver.scala:116)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver.resolve(ReferenceExpressionResolver.scala:141)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.org$jetbrains$plugins$scala$lang$resolve$ResolvableReferenceExpression$$shapeResolveInner(ResolvableReferenceExpression.scala:51)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$$anonfun$shapeResolve$1$$anonfun$apply$1.apply(ResolvableReferenceExpression.scala:46)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$$anonfun$shapeResolve$1$$anonfun$apply$1.apply(ResolvableReferenceExpression.scala:46)
    at org.jetbrains.plugins.scala.caches.CachesUtil$MyProvider.compute(CachesUtil.scala:183)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$1$$anon$2.compute(CachesUtil.scala:134)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$1$$anon$2.compute(CachesUtil.scala:131)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$1.compute(CachesUtil.scala:131)
    at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:200)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getWithRecursionPreventingWithRollback(CachesUtil.scala:163)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.shapeResolve(ResolvableReferenceExpression.scala:45)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.shapeResolve(ScReferenceExpressionImpl.scala:38)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver$$anon$1.candidatesS(ReferenceExpressionResolver.scala:105)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver.nonAssignResolve$1(ReferenceExpressionResolver.scala:118)
    at org.jetbrains.plugins.scala.lang.resolve.ReferenceExpressionResolver.resolve(ReferenceExpressionResolver.scala:141)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$$anonfun$multiResolve$2.apply(ResolvableReferenceExpression.scala:39)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$$anonfun$multiResolve$2.apply(ResolvableReferenceExpression.scala:39)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$4.compute(CachesUtil.scala:245)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getMappedWithRecursionPreventingWithRollback(CachesUtil.scala:242)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceExpression$class.multiResolve(ResolvableReferenceExpression.scala:38)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.multiResolve(ScReferenceExpressionImpl.scala:38)
    at org.jetbrains.plugins.scala.lang.resolve.ResolvableReferenceElement$class.bind(ResolvableReferenceElement.scala:28)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.bind(ScReferenceExpressionImpl.scala:38)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScInfixExprImpl.innerType(ScInfixExprImpl.scala:48)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getNonValueType$2.apply(ScExpression.scala:363)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getNonValueType$2.apply(ScExpression.scala:357)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$4.compute(CachesUtil.scala:245)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getMappedWithRecursionPreventingWithRollback(CachesUtil.scala:242)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.getNonValueType(ScExpression.scala:356)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScInfixExprImpl.getNonValueType(ScInfixExprImpl.scala:22)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getTypeWithoutImplicits$2.apply(ScExpression.scala:127)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getTypeWithoutImplicits$2.apply(ScExpression.scala:123)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$4.compute(CachesUtil.scala:245)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getMappedWithRecursionPreventingWithRollback(CachesUtil.scala:242)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.getTypeWithoutImplicits(ScExpression.scala:122)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScInfixExprImpl.getTypeWithoutImplicits(ScInfixExprImpl.scala:22)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getTypeAfterImplicitConversion$2.apply(ScExpression.scala:63)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$$anonfun$getTypeAfterImplicitConversion$2.apply(ScExpression.scala:53)
    at org.jetbrains.plugins.scala.caches.CachesUtil$$anon$4.compute(CachesUtil.scala:245)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at org.jetbrains.plugins.scala.caches.CachesUtil$.getMappedWithRecursionPreventingWithRollback(CachesUtil.scala:242)
    at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.getTypeAfterImplicitConversion(ScExpression.scala:52)
    at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScInfixExprImpl.getTypeAfterImplicitConversion(ScInfixExprImpl.scala:22)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer.org$jetbrains$plugins$scala$editor$importOptimizer$ScalaImportOptimizer$$checkTypeForExpression(ScalaImportOptimizer.scala:421)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer$$anon$1.process(ScalaImportOptimizer.scala:108)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer$$anon$1.process(ScalaImportOptimizer.scala:84)
    at com.intellij.concurrency.ApplierCompleter$3.run(ApplierCompleter.java:230)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1146)
    at com.intellij.concurrency.ApplierCompleter$2.run(ApplierCompleter.java:94)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.registerIndicatorAndRun(ProgressManagerImpl.java:281)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:106)
    at com.intellij.concurrency.ApplierCompleter.completeTaskWhichFailToAcquireReadAction(ApplierCompleter.java:226)
    at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyForAll(JobLauncherImpl.java:109)
    at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:160)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer.processFile(ScalaImportOptimizer.scala:84)
    at org.jetbrains.plugins.scala.editor.importOptimizer.ScalaImportOptimizer.processFile(ScalaImportOptimizer.scala:50)
    at com.intellij.codeInsight.actions.OptimizeImportsProcessor.prepareTask(OptimizeImportsProcessor.java:76)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.preprocessFile(AbstractLayoutCodeProcessor.java:199)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ReformatFilesTask.performFileProcessing(AbstractLayoutCodeProcessor.java:513)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ReformatFilesTask.iteration(AbstractLayoutCodeProcessor.java:505)
    at com.intellij.util.SequentialModalProgressTask$1.run(SequentialModalProgressTask.java:95)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:748)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:832)
    at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:208)
    at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:660)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:418)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressManagerImpl.java:578)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$4.run(AbstractLayoutCodeProcessor.java:339)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$6.run(AbstractLayoutCodeProcessor.java:358)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:977)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$8$1$1.run(AbstractLayoutCodeProcessor.java:418)
    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.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
    at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$8$1.run(AbstractLayoutCodeProcessor.java:413)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:318)
    - locked <0x00000000d102dc20> (a java.lang.Object)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:748)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    at java.awt.Dialog.show(Dialog.java:1082)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:779)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:464)
    at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1569)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1536)
    at com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog.commitChanges(CommitChangeListDialog.java:165)
    at com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog.commitChanges(CommitChangeListDialog.java:222)
    at com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog.commitChanges(CommitChangeListDialog.java:197)
    at com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog.commitPaths(CommitChangeListDialog.java:191)
    at com.intellij.openapi.vcs.actions.AbstractCommonCheckinAction.performCheckIn(AbstractCommonCheckinAction.java:76)
    at com.intellij.openapi.vcs.actions.AbstractCommonCheckinAction$1.run(AbstractCommonCheckinAction.java:62)
    at com.intellij.openapi.vcs.changes.Waiter.onSuccess(Waiter.java:79)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:435)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressManagerImpl.java:578)
    at com.intellij.openapi.vcs.changes.CallbackData$3.run(CallbackData.java:83)
    at com.intellij.openapi.vcs.changes.UpdateRequestsQueue.invokeAfterUpdate(UpdateRequestsQueue.java:218)
    at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.invokeAfterUpdate(ChangeListManagerImpl.java:382)
    at com.intellij.openapi.vcs.actions.AbstractCommonCheckinAction.actionPerformed(AbstractCommonCheckinAction.java:59)
    at com.intellij.openapi.vcs.actions.AbstractVcsAction.actionPerformed(AbstractVcsAction.java:65)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:614)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:663)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:513)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:211)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:546)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.flushIdleRequests(FocusManagerImpl.java:578)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:60)
    at com.intellij.openapi.wm.impl.FocusManagerImpl$IdleRunnable.runEdt(FocusManagerImpl.java:108)
    at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:28)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:748)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

0
Comment actions Permalink

Which version of Scala plugin do you use?

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

1.3.3 on Intellij 14.03 (latest versions)

0
Comment actions Permalink

Is it possible to provide reproducible example?

Best regrads,
Alexander Podkhalyuzin.

0
Comment actions Permalink

I am afraid not. I didnt have any such issue other than that project and now i am not working there anymore. The code was full of implicits and a mixin feast, it was badly structured. But still, intellij should be able to parse it, i believe there is either a bug in te parser that ends in an endless loop that makes intellij run out of memory after a couple of minutes, or maybe intellij should timeout in such cases. Funilly that occured only on my ubuntu laptop, other developers with macos and faster processors didnt have that issue. Maybe a timing issue due to the processor difference

0
Comment actions Permalink

Ok, thank you for the information.

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.