Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 18796 - OutOfMemory when flooding the console
Summary: OutOfMemory when flooding the console
Status: RESOLVED DUPLICATE of bug 1727
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: Other Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-03 12:41 EDT by Joe Szurszewski CLA
Modified: 2002-12-17 11:29 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Szurszewski CLA 2002-06-03 12:41:46 EDT
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?
Comment 1 Joe Szurszewski CLA 2002-06-03 12:42:27 EDT
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++);
		}
	}
}
Comment 2 Jared Burns CLA 2002-06-11 14:19:44 EDT
If Eclipse runs out of memory, I don't think there's anything we can do.
Comment 3 Darin Wright CLA 2002-06-11 15:36:55 EDT
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.
Comment 4 Jared Burns CLA 2002-08-28 21:41:13 EDT
Note that the "maximum buffer size" issue is addressed by Bug 1727.
Comment 5 Darin Wright CLA 2002-12-17 11:28:53 EST
This has been fixed.
Comment 6 Darin Wright CLA 2002-12-17 11:29:04 EST

*** This bug has been marked as a duplicate of 1727 ***