intellij-haxe
intellij-haxe copied to clipboard
IntelliJ IDEA 14 locks, becoming unusable
Similar to issue #67, I'm experiencing occasional locks in IntelliJ after the Haxe plugin is installed.
Not exactly sure what causes them, it appears that after IntelliJ restarts is when issues begin. As before, whatever occurs corrupts my environment enough that I have to totally reinstall IntelliJ to resolve the issue - removing the plugin and deleting caches does not resolve the issue.
On Mac OS X Yosemite, I've cleared:
- Config: ~/Library/Preferences/IntelliJIdeaXX
- System: ~/Library/Caches/IntelliJIdeaXX
- Plugins: ~/Library/Application Support/IntelliJIdeaXX
There's nothing significant in the logs - the CPU becomes deadlocked with IntelliJ fully maxed out at 100% CPU:
For this point forward, each start of IntelliJ is frozen, and will not produce any logging information.
- IDE: IntelliJ IDEA (build #IU-141.1010.3, 12 May 2015 00:00)
- OS: Mac OS X (10.10.4, x86_64)
- JRE: 1.6.0_65-b14-466.1-11M4716 (Apple Inc.)
- JVM: 20.65-b04-466.1 (Java HotSpot(TM) 64-Bit Server VM)
- Haxe Support (0.9.5 for IDEA 14.1.3)
Perfectly fine at first:
2015-08-27 13:54:27,977 [ 14584] DEBUG - ns.haxe.haxelib.HaxelibManager - initComponent() for module away3d-core-openfl
2015-08-27 13:54:28,395 [ 15002] DEBUG - ns.haxe.haxelib.HaxelibManager - Module added event for away3d-core-openfl
2015-08-27 13:54:28,396 [ 15003] DEBUG - ns.haxe.haxelib.HaxelibManager - Project opened event (2) for Project '/Users/jsturges/Projects/away3d-core-openfl' away3d-core-openfl
2015-08-27 13:54:30,168 [ 16775] INFO - .psi.impl.AbstractHaxePsiClass - Loaded AbstractHaxePsiClass
2015-08-27 13:54:30,173 [ 16780] INFO - lang.psi.impl.HaxePsiFieldImpl - Loaded HaxePsiFieldImpl
2015-08-27 13:54:30,179 [ 16786] INFO - si.impl.HaxeMethodPsiMixinImpl - Loaded HaxeMethodPsiMixinImpl
2015-08-27 13:54:42,409 [ 29016] DEBUG - ns.haxe.haxelib.HaxelibManager - Project closed event for module away3d-core-openfl
2015-08-27 13:54:42,453 [ 29060] DEBUG - ns.haxe.haxelib.HaxelibManager - disposeComponent() for module away3d-core-openfl
2015-08-27 13:55:44,148 [ 90755] DEBUG - ns.haxe.haxelib.HaxelibManager - initComponent() for module openfl-away3d-terrain-demo
2015-08-27 13:55:46,161 [ 92768] DEBUG - ns.haxe.haxelib.HaxelibManager - disposeComponent() for module openfl-away3d-terrain-demo
2015-08-27 13:55:46,161 [ 92768] DEBUG - ns.haxe.haxelib.HaxelibManager - Module added event for openfl-away3d-terrain-demo
There are errors:
2015-08-27 13:56:03,495 [ 110102] ERROR - llij.ide.plugins.PluginManager - null
java.lang.AssertionError
at com.intellij.plugins.haxe.ide.projectStructure.ui.HaxeConfigurationEditor$5.actionPerformed(HaxeConfigurationEditor.java:185)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6414)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6179)
at java.awt.Container.processEvent(Container.java:2084)
at java.awt.Component.dispatchEventImpl(Component.java:4776)
at java.awt.Container.dispatchEventImpl(Container.java:2142)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209)
at java.awt.Container.dispatchEventImpl(Container.java:2128)
at java.awt.Window.dispatchEventImpl(Window.java:2492)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:565)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
at java.awt.Dialog$1.run(Dialog.java:1049)
at java.awt.Dialog$3.run(Dialog.java:1101)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1099)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:778)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1614)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1571)
at com.intellij.ide.actions.ShowStructureSettingsAction.showDialog(ShowStructureSettingsAction.java:43)
at com.intellij.ide.actions.ShowStructureSettingsAction.actionPerformed(ShowStructureSettingsAction.java:38)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:182)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:312)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:109)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:291)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at com.apple.laf.ScreenMenuItemCheckbox.itemStateChanged(ScreenMenuItemCheckbox.java:178)
at java.awt.CheckboxMenuItem.processItemEvent(CheckboxMenuItem.java:372)
at java.awt.CheckboxMenuItem.processEvent(CheckboxMenuItem.java:340)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:343)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:331)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:720)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Or, error:
2015-08-27 14:50:52,417 [3399024] ERROR - n.impl.GeneralHighlightingPass - null
java.lang.NullPointerException
at com.intellij.plugins.haxe.util.PsiFileUtils.findRoot(PsiFileUtils.java:65)
at com.intellij.plugins.haxe.ide.annotator.PackageChecker.check(HaxeSemanticAnnotator.java:528)
at com.intellij.plugins.haxe.ide.annotator.HaxeSemanticAnnotator.analyzeSingle(HaxeSemanticAnnotator.java:53)
at com.intellij.plugins.haxe.ide.annotator.HaxeSemanticAnnotator.annotate(HaxeSemanticAnnotator.java:48)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:159)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:340)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$100(GeneralHighlightingPass.java:64)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$3.run(GeneralHighlightingPass.java:274)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:294)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:64)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:300)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:297)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:266)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:205)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:438)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1098)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:429)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:426)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:202)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)
And, some strange things like this:
2015-08-27 14:39:22,926 [2709533] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:39:22,928 [2709535] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:39:28,470 [2715077] DEBUG - axe.ide.HaxeFindUsagesProvider - canFindUsagesFor(COMPONENT_NAME 'value')->true
2015-08-27 14:39:28,471 [2715078] DEBUG - axe.ide.HaxeFindUsagesProvider - canFindUsagesFor(COMPONENT_NAME 'value')->true
2015-08-27 14:39:57,672 [2744279] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:39:57,672 [2744279] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:40:08,430 [2755037] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:40:08,430 [2755037] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:40:09,255 [2755862] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:40:09,255 [2755862] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:40:10,042 [2756649] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:40:10,042 [2756649] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:40:11,840 [2758447] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:40:11,840 [2758447] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:40:19,345 [2765952] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:40:19,345 [2765952] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:40:53,401 [2800008] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:40:53,402 [2800009] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:40:54,824 [2801431] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:40:54,824 [2801431] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:40:56,336 [2802943] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:40:56,336 [2802943] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
2015-08-27 14:41:00,007 [2806614] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexBuildConfiguration::getDependencies
2015-08-27 14:41:00,007 [2806614] INFO - ns.haxe.config.sdk.HaxeSdkUtil - FakeFlexDependencies::getEntries
However, nothing in the logs looks that concerning, nor provides anything relevant during the lock.
Is there anything I can provide to help resolve this issue? Is there any additional logging or debug available?
Are you aware of what artifact is left behind that could be cleared to prevent full reinstallation of IntelliJ IDEA?
In general, this plugin is working great; however, strangely seems time-bombed in that it's guaranteed it will lock my IntelliJ IDEA at some point in the future.
A couple of guesses: Are your module, project, or workspace files messed up somehow? Or maybe the haxelib library synchronization is hogging the CPU? Or perhaps circular references in the dependencies?
I actually don't know of anything that would max out the CPU. A number of these things run on background threads and shouldn't halt the UI. The last time we (meaning folks at TiVo) saw 100% CPU, it was during the haxelib synchronization which used to run on the UI thread, but that's been optimized and all runs in the background now.
Maybe the next time you re-install, you can copy the installation and configuration directories to a backup and can compare the files after you see the issue. That's probably the easiest way to figure it out.
The NPE in PsiFindRoot is annoying, but ignorable. It's in the new highlighting code that Carlos put in place, and I've put a fix in the latest pull request.
The assertion error is apparently because the module file (.iml) cannot be found for the named module while editing project settings. That may actually be a clue as to why we have errors persisting project settings. Still, I think it's ignorable.
Can you run intellij under gdb and break the program to get the stack traces when your CPU goes to 100%? Or usd gdb to attach to IDEA after it's already at 100%? (At least then, the program is stopped for you by gdb, rather than us hoping that Ctrl-C will break it.) Then, we can at least see what's running. The command to dump all stacks is "thread apply all bt".
Another way to attack the problem is to set up IDEA as a development environment for the Haxe plugin. You don't install the plugin into IDEA at all, but you load the intellij-haxe project, build (takes 15 seconds) and then "Run->Debug Haxe". Then, you're debugging a second instance of IDEA, which is also running the Haxe plugin, and you can point that second instance at your normal project. When things go south, you can switch back to the first instance and halt the program in the debugger. Of course, I do this on Linux, so your mileage may vary on OSX. Also, the second instance doesn't pick up all of the configuration from the first instance, so you have to reset things to your liking.
Using a diff tool, I compared the installation paths of IntelliJ IDEA. The only difference is that the broken install had files missing from Contents/bin/
Comparing the corrupted install to a new install, the corrupted install was missing:
From /Applications/IntelliJ IDEA 14.app/Contents/bin/
- appletviewer.policy
- fsnotifier
- idea.properties
- idea.vmoptions
- inspect.sh
- libMacNativeKit64.dylib
- libbreakgen.dylib
- libbreakgen.jnilib
- libbreakgen64.dylib
- libbreakgen64.jnilib
- libyjpagent.dylib
- libyjpagent.jnilib
- log.xml
- printenv.py
- restarter
No idea how that could be caused, or if it's relevant.
In my use of IntelliJ IDEA (which is heavy, 12+ hours a day, 7-days a week), this never happens unless the Haxe plugin is installed. Although, it may be unrelated to the plugin; or, potentially an issue with IntelliJ IDEA itself.
After reinstalling IntelliJ IDEA, everything is perfectly fine - even my Haxe projects. No configurations need changed, nor reapplied. Everything just works perfectly.
CPU usage is specious - an artifact of some root cause. In these Haxe modules, there's nothing that elaborate, nor circular in reference. And after reinstalling IntelliJ, everything works perfectly again.
Anyways, I realize this is of little help - I will try to setup a debug environment of the plugin the near future.
I've been running into this problem as well and I'm on OS X. However, this occurs even when I'm not working on projects with any Haxe code ... I just happened to run across this ticket.
@EBatTiVo Maybe you could try running an OS X virtual machine or getting someone in the office to switch over to OS X for a little while?
@indolering Totally, just having the plugin installed somehow effects the entire IntelliJ IDEA installation.
With it installed, it may seize up opening static web sites, Node, or Flash projects.
Just so you guys know how this works: When a plugin is installed, it is put into a chain of all plugins. Each plugin registers a set of services that it desires to perform. When the service is required each plugin has a chance to respond to the request (e.g. your keystrokes). The plugin is supposed to figure out, by asking IDEA, if the file is one that the plugin should work on, or if the plugin should work with a short section of that code embedded into another file type (think ASM blocks inside of c++, or javascript embedded in HTML). So, each plugin is always live, no matter what you are editing, and is supposed to decide on its own whether or not it's appropriate to respond to the service request. And, though I'm not real familiar with that part of the API, when I was debugging, I didn't see any code that stops progressing through the plugin stack when one of the plugins is done processing. So, yes, just having any plugin installed will affect your execution times and load, as well as have a chance to mess things up.
That said, I'm quite sure that there are bugs in here, because we've seen a number of complaints from IDEA users as well as folks using other JetBrains custom products. Nobody on the plugin dev team (at TiVo) regularly uses a mac, but plenty of our developers do on other projects. I don't know why we aren't seeing these issues in-house.
@jasonsturges Have you had any luck stopping a runaway process using gdb? A stack trace would be really helpful.
@EBatTiVo Not yet - I'd also like to get a plugin development environment setup. I'll get a trace soon.
I haven't run into the problem recently, are you still running into it @jasonsturges?
@EBatTiVo @indolering Sorry, I just don't have any bandwidth until mid-December. If issues persist and I can identify a valid root cause, I will reopen this issue.
Meanwhile, IntelliJ IDEA 15 EAP is here... :scream_cat:
@jasonsturges FWIW, I've been running into this problem on a daily basis for some reason. IntelliJ doesn't hit 100% CPU usuage, so it might be a different issue, but I would love to see some testing of the OS X build.
Let's leave it open, then, until we can get some more testing.
@EBatTiVo Cool, thanks - I will get to this, and am looking forward to getting more involved with the plugin at a development level.
Also, see #284, #580, and #641.