Bug 65060 OutOfMemory using Jobs Examples plug-in
build i0529-0105, Linux-Motif - I have the ui.jobs example plug-in loaded from HEAD - I am running a runtime workbench - I ran a couple of examples - then I clicked to create a job with the following stats: - duration 10 sec - 1 job - system job - fail The result was an OOM error. Not much info in the console but here it is. !SESSION Jun 01, 2004 12:52:25.171 --------------------------------------------- eclipse.buildId=unknown java.version=1.4.2_03 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=motif, NL=en_US !ENTRY org.eclipse.core.runtime 4 2 Jun 01, 2004 12:52:25.174 !MESSAGE An internal error occurred during: "Test job". !STACK 0 java.lang.OutOfMemoryError at org.eclipse.ui.examples.jobs.TestJob.run(TestJob.java:60) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66) !ENTRY org.eclipse.ui 4 4 Jun 01, 2004 12:52:25.180 !MESSAGE Unhandled event loop exception !ENTRY org.eclipse.ui 4 0 Jun 01, 2004 12:52:25.182 !MESSAGE java.lang.OutOfMemoryError !STACK 0 java.lang.OutOfMemoryError at org.eclipse.ui.examples.jobs.TestJob.run(TestJob.java:60) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66) Unhandled event loop exception Reason: java.lang.OutOfMemoryError
examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/TestJob.java
/**
	 * Whether the test job should fail.
	 */
	private boolean failure;
	/**
	 * Whether the job should report unknown progress.
	 */
	private boolean unknown;
	/**
	 * Creates a new test job
	 * @param duration Total time that the test job should sleep, in milliseconds.
	 * @param lock Whether the job should use a workspace scheduling rule
	 * @param failure Whether the job should fail
	 * @param indeterminate Whether the job should report indeterminate progress
	 */
	public TestJob(long duration, boolean lock, boolean failure, boolean indeterminate) {
		super("Test job"); 
		this.duration = duration;
		this.failure = failure;
		this.unknown = indeterminate;
		if (lock)
			setRule(ResourcesPlugin.getWorkspace().getRoot());
	}
	/* (non-Javadoc)
	 * @see org.eclipse.core.internal.jobs.InternalJob#belongsTo(java.lang.Object)
	 */
	public boolean belongsTo(Object family) {
		return family == FAMILY_TEST_JOB;
	}
	/* (non-Javadoc)