IntelliJ idea slow/hang during debug make phase - intellij-idea

Currently experiencing very slow debug start up times (between 25-45 seconds) with idea CE 14.1.5. To reproduce:
Make change in code that will cause javac to be invoked.
Hit debug.
Status bar shows "Make" and entire IDE hangs.
I'm using a 2015 Macbook pro and Java 1.8.0_60 64bit.

After profiling with advice from above, I tracked it down to this issue:
IntelliJ freezes for about 30 seconds before debugging
Which in turn points to an issue with InetAddress.getLocalHost() on *nix. Following the advice in this linked post certainly helped it go away:
InetAddress.getLocalHost() throws UnknownHostException

I had similar problems of starting debugging application and tried different workaround tips to figure it out, but in my case i had a lot of forgotten breakpoints marked in application and removing them all application starts and performs lightening fast.
So, my advice remove all the breakpoints from the code at least at application startup.

You should assign more memory. This almost always reduces lagging / hanging issues. You can find a guide how to change this setting in IntelliJ manual.

Related

Why would building a program fail sometimes but not others, without any changes to the source or settings? Possibly defective hardware?

I recently built a large-ish open source program in Visual Studio 2013. Initially the build failed due to a couple errors (a C1900 and a LNK2019). These errors were quite puzzling since I was following clear, simple instructions for building the program. The main developer couldn't think of any good reasons why they would occur.
I turned off my laptop overnight and the next morning I reattempted the build with the intention of reproducing the errors. But to my great surprise, no errors. I did not change any of the source or any compiler settings, etc.
Later that day I decided to do another build, and I got the same errors as before. I shut down my laptop for a minute or so, turned it back on, tried building again and it worked.
Clearly this is really strange. I have reason to suspect that there is some faulty hardware in my laptop. Could that cause these mysterious disappearing errors?
Try this on another machine and see if you get the same results. If you do, you'll know it's not a hardware issue.
It's more probable that you don't have complete build steps provided by the other developer. If he only built/tested it on his computer, then he may have added/installed (and not documented) some other tools/scripts/libraries necessary for a successful build - that he doesn't even remember about. There could also be circular dependencies between the projects which prevent you from building in one step.
You should try and identify the relationships between the projects and then build them separately, until you find where the problem is. You start with those projects not having references on any other ones, and so on. Eventually, you'll find the 'problem' project, and it'll be easier to fix.

VB.NET crashing exception (0xC0000005)

I rename a VB.NET 2010 project and the IDE crash over and over.
I open another project and same result, after a few seconds or if I open Form1.vb the IDE crash.
And the worst part is there's no info about on the Error window.
The only that I can see as an error code is 0xC0000005
Is the only program crashing on my PC so I have my doubts about a hardware issue.
How can I figure out what is happening?
Can somebody give any clue?
Thanks.
First off, take a look at this question where the answer does a good job of explaining the OXC0000005 error, and all that it encompasses.
Second, look at what has changed on your system since the last time you were able to successfully run Visual Studio. I have seen a few cases where a bad windows update was the cause of a user receiving this error. If you have installed updates since the last time you were able to run VS without error, you may want to uninstall those updates and try VS again. If VS works, begin to re-install the updates 1-by-1, testing VS between every update, to determine which update caused the issue.

Intellij IDEA 12 deadlock and lost changes

As you are working on the IDE, suddenly it has no reaction, the whole IDE become inactive and can not operate on it, but with high CPU usage, If you kill the process from Windows Task Manager, after it launched, all modified lost since your last edit. This problem occurs every now and then.
My environments:
Windows 7, Intel i7, 16GB RAM, IDEA 12.1.6 with auto save enabled.
Did anyone come across this problem before, it's to bad as my changes lost and i have to rewrite it after restarted.
You'll want to upgrade to v12.1.6 as 12.1.5 had a major bug in it that was fixed in 12.1.6. The bug prevented compiling of code in some circumstances. 12.1.6 was released only a few days after 12.1.5. That may not be the cause of your issue, but is still good advice.
Other than that, the 12.1.x line has been very stable. I think your issue is an isolated case as I have not seen any mention of it in the IntelliJ IDEA forums or here. Often times, such deadlocks are caused by third party plug-ins. Take a look in the logs (Help > Show Log) to see if it has any information that explains the hang. Also, if IDEA becomes non responsive, it automatically logs thread dumps in the log directory. Those may have some information.
If you experience the issue again, you may want to disable any third-party plug-ins to see if that resolves it. If it happens frequently, you can take a CPU Snapshot as described in this document and submit it to the JetBrains.
Lastly, I recommend you tweak the following setting: File > Settings > [IDE Settings] > General > Save files automatically if application is idle for x sec." Set it to 15 or 30 seconds. (You don't want to go too low). This will help reduce any loss of work in the event of a hang (which after 10 years of daily IDEA use I can attest to as being very rare.)

Always Cleaning / Building Project on Debug

I have a rather large solution of about 20 projects, that I have worked with for about three years now. In recent weeks, I seemed to have lost the ability to just press "Run and Debug" on my toolbar. If I do this, I lose all ability to debug and use breakpoints. My breakpoints all get a little yellow exclamation point on them and never run. Below is an example.
To fix this so I can get debugging again I have to fully clean the project. If I try to run after cleaning, i get an error saying the file does not exist. So I have to then fully re-build the project before I can run. It works just once, and then I lose my ability to debug again. Below is the error if I don't manually build first:
This seems to be effecting several (maybe all) projects in my solution and is causing extremely large problems for me. Some of my projects I need to breakpoints to verify data before it runs, and if I forget to do this, it runs before verifying.
Any help in fixing this would be amazing. Under solution settings, my start up project i set to "Current Selection" if that helps.
UPDATE:
So far under solution settings -> configuration a bunch of my items had "Build" not selected for Debug. Not sure how that happened, but updating that for now seems to have solved it. If it goes to not building each time again I will re-update, but for now I think that solved the issue.

Eclipse IDE crashes after certain number of runs but runs fine with VALGRIND profiler

When I run a code in OMNeT++ (eclipse based IDE), the simulation crashes after certain number of events. So to check for a memory leak, I used VALGRIND. When I run the code using this valgrind profiler, my simulation runs perfectly fine. I don't know the reason for this peculiar behavior. Can someone explain the reason behind this ?
Probably a 'heisenbug". I.e. an issue that changes its behavior if you try to examine it. It could be an uninitialized variable or other obscure bug that did not surface if the program starts with a different memory layout (i.e. under valgrind).
I would still look into the valgring logs, even if the crash does not occur as the logs may cotain some hints.