Compiling class or package always causes OutOfMemoryError

This may be a bug but because it's so hard to reproduce outside of my environment I was curious to see what other people thought.

I use IntelliJ for a fairly project at work; lots of packages, classes, external libraries, etc. I've tried from the beginning to compile but the same thing always happens: as it starts loading files and classes, the class count suddenly stops, and memory consumption steadily grows until it dies with an OutOfMemoryError. I tried excluding all folders from compile except the source folder. I also tried increasing both IntelliJ's and the compiler's heap size, with no results.

One thing I thought might be causing this is as part of the project structure, there are some recursive symbolic links, e.g. a subfolder with links that point to their parent. IntelliJ doesn't seem to like those, but I have excluded all those folders and links from the project and also from compilation.

Any ideas? Has anyone had this happen to them before?


1 comment
Comment actions Permalink

I just found out that the class or classes are actually compiled; it looks as if only after they are compiled the memory usage shoots up until it takes up the whole heap. So I'm not sure quite what could be going on.

BTW, the build folder were I am compiling to is also used when I compile classes externally; it is not part of my project classpath though.


Please sign in to leave a comment.