Name: rmT116609 Date: 12/09/2002
FULL PRODUCT VERSION :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
FULL OPERATING SYSTEM VERSION :Windows 2000 WorkStation, SP2
ADDITIONAL OPERATING SYSTEMS :
Windows NT SP6 (server & Workstation), Windows XP Pro
A DESCRIPTION OF THE PROBLEM :
Start a java app that uses Clipboard.getContents() Using MicroSoft Excel and selecting 30 rows.
or go to www.cnn.com and select and copy the content
Set focus on the java app now Do a Clipboard.getContents()
Memory usage shoots way up and the app seems to hang - especially on XP or NT.
If I select data (huge Chunks say from a word document or a text file, no such problems.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start a java app that uses Clipboard.getContents() Using MicroSoft Excel and selecting 30 rows.
Set focus on the java app now Do a Clipboard.getContents()
Memory usage shoots way up and the app seems to hang - especially on XP or NT.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected: System should not appear to hang
Actual : On NT & XP, took about 2 minutes before the java app responded.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.datatransfer.Clipboard;
import java.awt.Toolkit;
import java.lang.System;
import java.awt.datatransfer.Transferable;
import javax.swing.JOptionPane;
public class test {
public test() {
}
public static void main(String[] args) throws Exception {
Clipboard cp = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable newData = cp.getContents(cp);
JOptionPane.showMessageDialog(null, "Press here to continue");
newData = cp.getContents(null);
newData = null;
cp = null;
JOptionPane.showMessageDialog(null, "Press here to exit");
System.exit(0);
}
}
---------- END SOURCE ----------
(Review ID: 178739)
======================================================================