Memory usage in console in 12.1

I started getting consistent out of memory exceptions in the IDE after updating to 12.1 today, running with the same code and data that was working fine on 12.0.4 yesterday.  I traced it back to some fairly extensive logging I had turned on that generated some 500,000 lines of output to the IDEA console during its execution.  Under 12.0.4, this program could run to completion with full logging with 768MB of heap configured for the IDE's VM, but under 12.1 it can't handle the logging even with 1536MB of heap configured.  It's not a huge hardship in this case as I can dial back the log level, but I was hoping this was maybe just a simple regression in the 12.1 release.  If not a bug, are there any settings I can use to limit the scrollback history?

5 comments

Hi Jeremy,

There must be a dedicated setting which controls console buffer size. It's located at $IDEA_HOME/bin/idea.properties and looks like 'idea.cycle.buffer.size=1024'

Will check the use-case you described later today.

Denis

0

Checked that default console buffer size is still 1024 Kb and that the console releases old text as expected.

Questions:

  1. Do you use the console which appears on running/debugging regular java application? (not, say, groovy or scala console)
  2. Does it help if you set 'idea.cycle.buffer.size' to a small value (e.g. 10) at $IDEA_HOME/bin/idea.properties?

Denis

0

Thanks for looking into it.

Yes, I'm just using the standard Java console.  I verified that idea.cycle.buffer.size was originally set to the default 1024, then changed it to 10 to test again.  At the smaller buffer size, I couldn't reproduce the issue.

To be safe, I also reverted my VM options to the defaults by copying from $IDEA_HOME/bin/idea.vmoptions to ~/Library/Preferences/IntelliJIdea12/ (I probably should have mentioned I'm on OS X 10.8.3).

Just to ensure that there's nothing specific to my application code, I can reliably reproduce the out of memory condition with this code:

public class ConsoleTest

{

    public static void main(String[] args)

    {

        for (int i = 0; i < 10000000; ++i)

        {

            System.out.println(i + ": TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST");

        }


        System.out.println("done.");

    }

}

Attached a screenshot as well in case there are any potential clues there.



Attachment(s):
Screen Shot 2013-04-04 at 9.10.29 AM.png
0

Just run your example at CE 12.1 and got no OME. I think it's better to create a separate ticket at the tracker and provide a link to your memory snapshot there. There is a number of possible reasons why do you have the problem at local environment, e.g. a third-party plugin or specific ide configuration might make the console to leak but it's hard to be sure without additional information.

Denis

0

Please sign in to leave a comment.