Community
Participate
Working Groups
Run the following program on IBM1.3.1. Notice that there are two distinct OutOfMemory errors reported. The first happens and is reported, but the target program keeps running. The second is reported sometime later and crashes the running program. There isn't much we can do about a user who sends huge amounts of data to the console, but could we catch the first OutOfMemory exception, suspend the program and show the user a dialog so that the program doesn't crash and potentially put Eclipse in an unstable state?
Here is program: public class ConsoleFlooder { public static void main(String[] args) { ConsoleFlooder flooder = new ConsoleFlooder(); flooder.goWithDelimiters(); } private void goWithDelimiters() { long i = 0; while (true) { System.out.println(i++); } } private void goSingleLine() { long i = 0; while (true) { System.out.print(i++); } } }
If Eclipse runs out of memory, I don't think there's anything we can do.
This requires a "maximum buffer size" feature for the console, such that we do not fill memory (i.e. currently the console is an unbounded cache). Do not intend to fix for 2.0.
Note that the "maximum buffer size" issue is addressed by Bug 1727.
This has been fixed.
*** This bug has been marked as a duplicate of 1727 ***