IDE crashes when listing DX connections

Issue #781 resolved
Luke Kozakewycz created an issue

I would be working in a legacy project (as opposed to a DX project) when I decide I need to start using something like the log viewer so I open it up only to be presented with a dialog stating it is now listing SFDX connections (despite not actually using SFDX at this time).

The CPU usage hits the roof and the IDE crashes.

If I force the IDE to end, I can then re-open the project to view the logs but it may take more than one attempt to do so.

Found this error - don't know if this is related?

2017-11-15 10:31:52,368 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 
2017-11-15 10:31:52,382 [     14]   INFO -     #com.intellij.util.ui.JBUI - User scale factor: 1.0 
2017-11-15 10:31:52,382 [     14]   INFO -     #com.intellij.util.ui.JBUI - System scale factor: 1.0 (IDE-managed HiDPI) 
2017-11-15 10:31:52,391 [     23]   INFO -        #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IC-172.4574.11, 13 Nov 2017 22:52) 
2017-11-15 10:31:52,392 [     24]   INFO -        #com.intellij.idea.Main - OS: Windows 10 (10.0, amd64) 
2017-11-15 10:31:52,392 [     24]   INFO -        #com.intellij.idea.Main - JRE: 1.8.0_152-release-915-b12 (JetBrains s.r.o) 
2017-11-15 10:31:52,392 [     24]   INFO -        #com.intellij.idea.Main - JVM: 25.152-b12 (OpenJDK 64-Bit Server VM) 
2017-11-15 10:31:52,394 [     26]   INFO -        #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx750m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djb.vmOptionsFile=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2017.1\bin\idea64.exe.vmoptions -Xbootclasspath/a:C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2017.1\lib\boot.jar -Didea.platform.prefix=Idea -Didea.jre.check=true -Didea.paths.selector=IdeaIC2017.2 -XX:ErrorFile=C:\Users\Luke\java_error_in_idea_%p.log -XX:HeapDumpPath=C:\Users\Luke\java_error_in_idea.hprof 
2017-11-15 10:31:52,394 [     26]   INFO -        #com.intellij.idea.Main - ext: C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2017.1\jre64\lib\ext: [access-bridge-64.jar, cldrdata.jar, dnsns.jar, jaccess.jar, jfxrt.jar, localedata.jar, meta-index, nashorn.jar, sunec.jar, sunjce_provider.jar, sunmscapi.jar, sunpkcs11.jar, zipfs.jar] 
2017-11-15 10:31:52,394 [     26]   INFO -        #com.intellij.idea.Main - JNU charset: Cp1252 
2017-11-15 10:31:52,435 [     67]   INFO -        #com.intellij.idea.Main - JNA library (64-bit) loaded in 40 ms 
2017-11-15 10:31:52,437 [     69]   INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational 
2017-11-15 10:31:53,488 [   1120]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor duplicates-groovy.xml 
2017-11-15 10:31:54,217 [   1849]   INFO - llij.ide.plugins.PluginManager - 33 plugins initialized in 1133 ms 
2017-11-15 10:31:54,223 [   1855]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: Android Support (10.2.3), Ant Support (1.0), Bytecode Viewer (0.1), CVS Integration (11), Copyright (8.1), Coverage (172.4574.11), Eclipse Integration (3.0), EditorConfig (172.4574.11), Git Integration (8.1), GitHub (172.4574.11), Gradle (172.4574.11), Groovy (9.0), I18n for Java (172.4574.11), IDEA CORE (172.4574.11), IntelliLang (8.0), JUnit (1.0), Java Bytecode Decompiler (172.4574.11), JavaFX (1.0), Kotlin (1.1.4-release-IJ2017.2-3), Maven Integration (172.4574.11), Plugin DevKit (1.0), Properties Support (172.4574.11), Settings Repository (172.4574.11), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TestNG-J (8.0), UI Designer (172.4574.11), XPathView + XSLT Support (4), XSLT-Debugger (1.4), YAML (172.4574.11), hg4idea (10.0) 
2017-11-15 10:31:54,223 [   1855]   INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: Illuminated Cloud (1.8.1.2-idea14) 
2017-11-15 10:31:55,859 [   3491]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=705 
2017-11-15 10:31:55,890 [   3522]   INFO - pl.local.NativeFileWatcherImpl - Starting file watcher: C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2017.1\bin\fsnotifier64.exe 
2017-11-15 10:31:55,908 [   3540]   INFO - pl.local.NativeFileWatcherImpl - Native file watcher is operational. 
2017-11-15 10:31:56,169 [   3801]   INFO - lluminatedCloudFileTypeFactory - Registering external resource http://soap.sforce.com/2006/04/metadata as C:/Users/Luke/.IdeaIC2017.2/config/plugins/IlluminatedCloud/lib/IlluminatedCloud.jar!/xsd/metadata.xsd. 
2017-11-15 10:31:56,333 [   3965]   INFO - com.intellij.ide.ui.UISettings - Loaded: fontSize=12, fontScale=0.0; restored: fontSize=12, fontScale=1.0 
2017-11-15 10:31:56,515 [   4147]  ERROR - nSystem.impl.ActionManagerImpl - "first-keystroke" attribute has invalid value for action with id=IlluminatedCloud.Delete [Plugin: com.illuminatedcloud.intellij] 
com.intellij.diagnostic.PluginException: "first-keystroke" attribute has invalid value for action with id=IlluminatedCloud.Delete [Plugin: com.illuminatedcloud.intellij]
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.reportActionError(ActionManagerImpl.java:361)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.processKeyboardShortcutNode(ActionManagerImpl.java:881)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.processActionElement(ActionManagerImpl.java:602)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.processActionsChildElement(ActionManagerImpl.java:956)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.registerPluginActions(ActionManagerImpl.java:464)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.<init>(ActionManagerImpl.java:143)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:103)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:80)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:63)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:469)
    at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:239)
    at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:206)
    at org.picocontainer.defaults.BasicComponentParameter.resolveInstance(BasicComponentParameter.java:77)
    at org.picocontainer.defaults.ComponentParameter.resolveInstance(ComponentParameter.java:114)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getConstructorArguments(CachingConstructorInjectionComponentAdapter.java:129)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:100)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:80)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:63)
    at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.getComponentInstance(ServiceManagerImpl.java:220)
    at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:239)
    at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:206)
    at org.picocontainer.defaults.BasicComponentParameter.resolveInstance(BasicComponentParameter.java:77)
    at org.picocontainer.defaults.ComponentParameter.resolveInstance(ComponentParameter.java:114)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getConstructorArguments(CachingConstructorInjectionComponentAdapter.java:129)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:100)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:80)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:63)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:469)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:118)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$9(ApplicationImpl.java:462)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
    at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:469)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:102)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:421)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:407)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:203)
    at com.intellij.idea.MainImpl$1.lambda$null$0(MainImpl.java:49)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:345)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Comments (7)

  1. Scott Wells repo owner

    Luke, I see that you're on Windows. What you're seeing is a bug in the Windows SFDX CLI that I've been working with the SFDX team to help resolve. Basically when it tries to check for a CLI update it deadlocks itself. This can happen every 4-5 hours based on the update polling interval. They have a prospective fix that I'm hoping will end up in a VERY near-term build as it bites me as well. Unfortunately until that fix is in place, you have two options: 1) remove the path to the sfdx CLI from IC's config temporarily; 2) touch the file /home/to/homeDir/AppData/Local/sfdx/autoupdate to trick the CLI into thinking that it doesn't require an update.

    In recent builds I've tried to make it so that IC doesn't care about SFDX when working on a non-SFDX project for the most part, but there are times when it should show SFDX scratch orgs in the connection list, in particular in the Open Connection drop-down and in the tool windows which can work against any configured connection...oh, also in the application-level config dialog.

    Anyway, that's obviously not an ideal response, but it's unfortunately the current state of the SFDX CLI on Windows. I'll check with my contacts there and see if there's an ETA for the fix being released. I'll let you know once I hear as it affects me frequently as well.

  2. Luke Kozakewycz reporter

    That's ideal enough for me. :) It's not a blocking issue, it's just a little inconvenient on the odd occasion. Hopefully Salesforce can see it resolved soon.

    Thanks Scott.

  3. Scott Wells repo owner

    Sounds good. If it makes you feel any better, I was absolutely plagued by this going into my Dreamforce demo last week, hence the mad scramble the previous week working with the DX team to help isolate and characterize the issue. I actually have a one-off patch to the SFDX implementation that I can overlay that seems to resolve it, but it hasn't been released yet. As a result I created a little scheduled process to touch that autoupdate file every couple of hours to make sure I didn't accidentally forget about it before demoing in front of an audience and as a result see my CPUs spike and IC hang.

    I'll keep this issue around until I see the SFDX CLI fix go through. That way anyone else who hits this will have a reference point for the underlying issue.

  4. Luke Kozakewycz reporter

    That's definitely not what you want happening during a Dreamforce session! Glad you were able to work around the issue for your presentation.

    Look forward to hearing about future updates.

  5. Log in to comment