Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355233 - high memory usage when copy and paste
Summary: high memory usage when copy and paste
Status: RESOLVED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 11:45 EDT by Michael Martin CLA
Modified: 2011-08-19 14:05 EDT (History)
1 user (show)

See Also:


Attachments
Eclipse configuration information (554.07 KB, text/plain)
2011-08-19 11:48 EDT, Michael Martin CLA
no flags Details
Log file (854.89 KB, text/x-log)
2011-08-19 11:57 EDT, Michael Martin CLA
no flags Details
Latest log (117.58 KB, text/x-log)
2011-08-19 12:08 EDT, Michael Martin CLA
no flags Details
thread dump (42.75 KB, text/x-log)
2011-08-19 12:45 EDT, Michael Martin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Martin CLA 2011-08-19 11:45:21 EDT
Build Identifier: 20110615-0604

When doing a copy and paste operation, Eclipse grabs all of the available heap and hangs. 

Reproducible: Always

Steps to Reproduce:
1. Open a file in the editor.
2. Highlight some text.
3. Ctrl-C to copy the text.
4. Observe memory usage in jconsole go out the roof.
Comment 1 Michael Martin CLA 2011-08-19 11:48:27 EDT
Created attachment 201803 [details]
Eclipse configuration information

This is the complete configuration information from Eclipse Indigo.
Comment 2 Remy Suen CLA 2011-08-19 11:52:15 EDT
(In reply to comment #0)
> 1. Open a file in the editor.

What editor? A text editor? A Java editor? Does it happen if you copy text from a text field in some dialog window?

> 2. Highlight some text.

How many characters? Does it seem to matter?
Comment 3 Michael Martin CLA 2011-08-19 11:54:54 EDT
By 'editor' I mean editing some code in eclipse. The default editor. I've turned off auto-completion, as I saw some references (old ones) to problems with that. It made no difference. 

I can highlight as little as three or four bytes, do Ctrl-C, and the heap usage just goes berserk.


    The only way out of this is to kill eclipse:

    JVM terminated. Exit code=1
    /usr/bin/java
    -XX:MaxPermSize=256m
    -jar /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    -os linux
    -ws gtk
    -arch x86_64
    -showsplash
    -launcher /opt/eclipse/eclipse
    -name Eclipse
    --launcher.library
    /opt/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505/eclipse_1407.so
    -startup /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    --launcher.overrideVmargs
    -exitdata 1158019
    -product org.eclipse.epp.package.java.product
    -vmargs -Djava.library.path=/usr/lib/jni
    -Dosgi.requiredJavaVersion=1.5
    -XX:MaxPermSize=256m
    -Xms2048m
    -Xmx3072m
    -vm /usr/bin/java
    -vmargs
    -XX:MaxPermSize=256m
    -jar /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
Comment 4 Michael Martin CLA 2011-08-19 11:57:45 EDT
Created attachment 201806 [details]
Log file

Here's a log file from the latest crash.
Comment 5 Remy Suen CLA 2011-08-19 11:59:21 EDT
(In reply to comment #3)
> I can highlight as little as three or four bytes, do Ctrl-C, and the heap usage
> just goes berserk.
> 
> 
>     The only way out of this is to kill eclipse:

So it sounds like the memory usage goes up and Eclipse is actually stuck. Please attach a thread dump to this bug when Eclipse is hung.
http://wiki.eclipse.org/index.php/How_to_report_a_deadlock

Does the problem only occur for Python files?
Comment 6 Michael Martin CLA 2011-08-19 12:08:36 EDT
Created attachment 201810 [details]
Latest log
Comment 7 Michael Martin CLA 2011-08-19 12:09:19 EDT
yes, it appears to be pydev related. I opened an existing java project, and experienced no problems with copy and paste.
Comment 8 Michael Martin CLA 2011-08-19 12:15:09 EDT
After the last crash, eclipse would not start at all. The splash screen was displayed, and the progress bar made it about 80%, then hung loading the workbench. I was able to restart by deleting the .metadata directory. I'm in the process of installing the plugins I need now.
Comment 9 Michael Martin CLA 2011-08-19 12:45:31 EDT
Created attachment 201815 [details]
thread dump
Comment 10 Michael Martin CLA 2011-08-19 12:48:42 EDT
Narrowing it down a little further, neither highlighting text nor doing Ctrl-C on highlighted text cause the problem. Heap memory usage spikes when Ctrl-V is used to actually paste the copied text.
Comment 11 Remy Suen CLA 2011-08-19 14:05:49 EDT
Please open a bug with the developers of PyDev.

PyDev is not hosted here at Eclipse.org.