Intellij UI freezing due to "long scala calculation" - intellij-idea

Intellij is occasionally freezing on my fastest/newest Mac. I have not pinpointed the action occurring: but in general it is while editing scala code. Seems that it could be normal editing of code or also showing popups of possible code choices for fill-in.
Here is a strong "hint" of what is happening from the intellij logs:
org.jetbrains.plugins.scala.util.UIFreezingGuard$$anon$1:
Long scala calculation on UI thread canceled
I see that error message approximately at the times that the freezes occurred: three times in the past fifteen minutes for example.
Here is an illustration: at the moment shown in the screenshot I can do absolutely nothing with Intellij directly. By quickly switching focus to ANY other os/x app and then back to Intellij it gets unfrozen:
Here are IJ version details:
IntelliJ IDEA 2016.3.2
Build #IU-163.10154.41, built on December 21, 2016
Licensed to ****
You have perpetual fallback license for this version
Subscription is active until February 9, 2018
JRE: 1.8.0_112-release-408-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
The Activity Monitor shows plenty of RAM available and the CPU is consistnely at single digit percentage utilization. As direct evidence the IJ GUI is snappy - until it freezes.
Are there any known workarounds for this?

Do you believe your problem could be related to the icon rendering calculation for the Scala plugin as described here?
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206002459-Is-there-a-way-to-disable-features-to-solve-performance-problems-
This says it can be worked around by disabling the toolbar that it's a current bug in the Scala plugin. Does this work at all?

Related

IntelliJ keeps moving cursor focus to the Build Output tool window while coding

I'm using IntelliJ IDEA CE, on macOS Monterey, and while coding it frequently builds the code base every few seconds, automatically.
This becomes very frustrating as then the cursor focus would move to the Build Output window while I'm writing my code, after every few seconds. The errors shown in the window are the obvious compile errors as I'm still writing my code.
I tried turning off "Build project automatically" and "Build project" in "Actions on Save" setting but that doesn't help. I'm not sure which setting is causing this problem.
IntelliJ IDEA 2021.3.1 (Community Edition)
Build #IC-213.6461.79, built on December 28, 2021
Runtime version: 11.0.13+7-b1751.21 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.1

VS Code Platform-IO configuration

I had been using Platform-IO up to 2019 but when I reopened a project things started getting worse and worse. Tasks disappeared and it took a while to be able to compile again. Now Platform-IO has disappeared completely and I was getting deprecation warnings in the "Toggle developer tool' console.
Now after a complete reinstall of VS, Platform-IO etc. the IDE is still not functioning and I regret ever using it. It is like you jump into your car begging it to start. For professional use (able to restart your car every day without a mechanics) this solution needed to be solid and reliable which it does not seem to be. I will have to switch to another IDE I guess. The name Microsoft should have make me hesitate ...
I am using Windows 7 Professional and NO I WILL NOT UPGRADE THE OS.
Is there any means to install a functioning VS-Code / Platform-IO on Windows 7 or is it just an idea of an IDE ?
Sorry to appear mean but "Making you more productive" sounds like a scorn.
I recently tried installing Platform IO on a Win 7 PC of a colleague and experienced similar issues like you. Seems like current Platform IO versions / builds are not compatible and therefore not runnable on Windows 7.
Only idea comes to my mind is using legacy / previous releases of VS Code and Platform IO (manual plugin installation with a legacy release) to get a runnable environment on Win 7, but I didn't test it since I ended up installing a recent Ubuntu next to Win 7. (Seemed like a better solution to me).
Here you can find all of the older releases of VS Code & Platform IO:
https://code.visualstudio.com/docs/supporting/faq#_previous-release-versions
https://code.visualstudio.com/updates/v1_64
https://github.com/platformio/platformio-core/releases
Good luck ;)

Navigate | Class or File popup closes immediately in IntelliJ IDEA 2017.2

I'm having a annoying problem since I update IntelliJ IDEA Community to this version:
IntelliJ IDEA 2017.2
Build #IC-172.3317.76, built on July 15, 2017
JRE: 1.8.0_152-release-915-b5 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.8.0-53-generic
There is a problem with "Main Menu/Navigate/Class" action. When a trigger this action using keyboard shortcut or menu access, most of time the "Enter class name" window is showed, but closes immediately.
Sometimes the action works ok, but most of time, not.
I'm using linux Mint 18.2 (Cinnamon).
It's a known issue, please follow it here for updates:
IDEA-173000 Navigate | File and Class popups disappear
Workaround (add the following via Help | Edit Custom VM Options):
-DactionSystem.xWindow.remove.focus.from.nonFocusable.popups=false
Downgrading to 2017.1 version is another option.
UPDATE: the issue is resolved in 2017.2.3 release.
According to the release notes it's fixed in the latest release - 2017.2.3 (build number IU-172.3968.16) - 173000 is in the list: https://confluence.jetbrains.com/display/IDEADEV/IntelliJ+IDEA+2017.2.3+Release+Notes?fromIDE
What ultimately worked for me was adding -Dfocus.follows.mouse.workarounds=true to my custom VM options (Help > Edit Custom VM Options).
I found this in https://youtrack.jetbrains.com/issue/IDEA-173000, mentioned above.
I use a tiling window manager (i3) which I suspect is related.

Complete keyboard block in IntelliJ 13

Sometimes when running IntelliJ it completely blocks all keyboard inputs in the program. E.g. I can click around a document with the mouse, I can even right click + paste. I cannot, however write anything through the keyboard or navigate with the arrows inside a document or between documents for that matter.
The only keyboard related actions that work seem to be system related; alt + tab, ctrl + alt + delete, caps lock etc. also when tabbing to another window the keyboard works fine, so it is not a hardware issue.
This seem to occur when a popup is active and I tab out of IntelliJ and back in, but I am not certain that this is the case.
I would like to stress that it is not merely the currently open document that I cannot modify, since I CAN insert text and remove it using mouse commands only (the file is not write protected or anything like that), it seem to be a complete block of all keyboard inputs in IntelliJ.
The only workaround I have found is to restart IntelliJ.
I am running Ubuntu 13.10. More or less all projects I work with in IntelliJ are maven projects. It happens roughly once a day when using IntelliJ as main IDE.
This seems to be an IBus issue. The bug is not localized yet but it's clear it is not in IDEA - rather in IBus or possibly in Java X events handling code.
Workarounds:
IBus can be disabled for IDEA by unsetting env. variable XMODIFIERS. So, add the following lines to $IDEA_HOME/bin/idea.sh at almost the end of the file:
...
XMODIFIERS=idea.sh
export XMODIFIERS
# ---------------------------------------------------------------------
# Run the IDE.
# ---------------------------------------------------------------------
...
Have been reported that run ibus-daemon -rd is not recommended as it may cause JVM crash. However, it also seems to work.
http://youtrack.jetbrains.com/issue/IDEA-78860
I ran into the same issue with Ubuntu 14.04 LTS and IDEA 14+. I'm currently running IDEA 14.1.3.
The XMODIFIERS fix seemed to work for a while, but then the issue returned.
Changing Setup->Language->Keyboard input method system from iBus to none did not fix it for me.
What finally worked was switching JDKs from
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
to
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
using
export IDEA_JDK=/home/don/apps/jdk1.7.0_75/

Simple-OpenNI for Processing fatal errors with the Kinect

I have been using SimpleOpenNI, a wrapper for Processing, all summer now. I use it for the Kinect to make games and demos. Last week, I have been getting a fatal error in my processing window and none of the SimpleOpenNI projects will work. Here is the error:
SimpleOpenNI Version 0.20
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x72e8f955, pid=4596, tid=4624
JRE version: 6.0_24-b07
Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode windows-x86 )
Problematic frame:
C [OpenNI.dll+0xf955]
An error report file with more information is saved as:
C:\Users\mss042\Desktop\processing-1.5.1\hs_err_pid4596.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
It appears as if the new OpenNI/NITE/SensorKinect drivers do not work with the SimpleOpenNI wrapper. I have tried it with people using the old drivers and everything still works. Problem is, you cannot download the old drivers off of the websites so I cannot test if it's that or not. You can see everything I've downloaded from the simpleopenni site: http://code.google.com/p/simple-openni/
Any help with this error would be appreciated. Thanks.
Mike
It looks like there's a problem with OpenNI.dll. Make sure that:
You have the dll (It should be in Program Files where you've installed OpenNI)
Make sure you've got the Environment Variables for the Open NI paths and that the paths are correct, otherwise, you might have the .dll file, but the .jnilib wouldn't know where it is.
Had a Kinect Workshop in Uni, and my colleagues using Windows all had issues with the drivers,
so I'm just passing on what they did:
Even though they had 64-bit versions of Windows they used the 32-bit version, and used Brekel OpenNI Kinect Auto Installer - Developer Edition v1.3.2.3.exe(direct link via developkinect.com) after reading this message:
Comment 4 by tijmenva...#gmail.com, Oct 21, 2011 Hey all I have Solved
the unsatisfied link dll error on windows 7 64 bits by installing java
runtime (jre-7u1-windows-i586.exe)and (Brekel OpenNI Kinect Auto
Installer - Developer Edition v1.3.2.3.exe) I uninstalled everything
and than it worked :)
hope this helpes
in Issue#17 on the SimpleOpenNI project issues page.
Another colleague used Synapse and OSC in Processing instead of SimpleOpenNI, but she had loads of errors with the drivers (basically spent a few good hours uninstalling/installing different versions). In her case, uninstalling any previous partial or complete drivers from the machine and deleting any registry entries related to PrimeSense(Sensor, Nite) and OpenNI, then using the installers from the links on the Synapse page, worked for her.
HTH
This is a long shot, but that exact error is also given if the Kinect USB and/or power supply simply becomes unplugged. Thought it was worth mentioning as it is not obvious from the error message itself and it may help someone out if they kicked their power supply and started searching for the above exception :)