Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317655 - Eclipse hangs (100% cpu) on selecting text in CSS editor
Summary: Eclipse hangs (100% cpu) on selecting text in CSS editor
Status: RESOLVED WORKSFORME
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.css (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: wst.css CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-06-23 03:12 EDT by Martin Visser CLA
Modified: 2012-02-29 10:03 EST (History)
3 users (show)

See Also:


Attachments
CSS file I had problems with (66.80 KB, text/plain)
2010-07-02 02:16 EDT, Martin Visser CLA
no flags Details
Selected text when Eclipse hung (138.94 KB, image/png)
2010-10-25 04:20 EDT, Pere CLA
no flags Details
Selecting text in CSS editor makes Eclipse hang (90.42 KB, image/png)
2010-10-27 04:21 EDT, Pere CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Visser CLA 2010-06-23 03:12:22 EDT
Build Identifier: Helios Release: 20100610-0636

When I selected a number of characters in the CSS editor Eclipse hang with 100% CPU and didn't come out of the freeze. Earlier it did come out of the freeze, but only after a minute or so.
When I really try to reproduce I couldn't get it to fail.
I have no logging of the incident and also no recording of anything in the Event Viewer in Windows.

BTW: I use Eclipse IDE for Java EE Developers.

Reproducible: Sometimes

Steps to Reproduce:
1. Open css file in CSS editor
2. Select (with keyboard) some text
Comment 1 Prakash Rangaraj CLA 2010-06-23 05:00:01 EDT
Moving to WTP
Comment 2 Rakesh CLA 2010-07-01 10:12:36 EDT
Could you attach sample file and provide some more detail on how to reproduce it?
Comment 3 Martin Visser CLA 2010-07-01 10:40:45 EDT
Well, that's the problem. If I could reprocude it I definitely would attach a file and explain it in more detail, but I can't do it on purpose. When I try to reproduce the problem Eclipse won't freeze.
I remember a freeze a couple of days ago when I selected (shift+end) on a line which looked like this:
div.scroll-document p {font-size: 1em; line-height:1.2; padding-left: 10px; width:auto;}
I started my selection just before a semicolon and pressed shift+end.
Comment 4 Martin Visser CLA 2010-07-02 02:16:38 EDT
Created attachment 173269 [details]
CSS file I had problems with

This is the file I had eclipse freeze on several times.
Comment 5 Rakesh CLA 2010-07-23 09:11:09 EDT
I tried to reproduce it many times, on file you have provided, but failed to get hang.Did you face this problem again?We can resolve it for now, feel free to reopen if you face similar issue again.
Comment 6 Martin Visser CLA 2010-07-23 09:24:31 EDT
I haven't been able to reproduce it in at least a couple of weeks. I seem to remember a freeze just after I downloaded and installed to final release of Helios, but that happened only once.
Let's call it resolved :-)
Comment 7 Nick Sandonato CLA 2010-07-26 11:14:49 EDT
Thanks for your help with this, Martin and Rakesh. Resolving based on their findings.
Comment 8 Pere CLA 2010-10-25 04:18:53 EDT
This bug is not resolved for sure.

It keeps happening to me since I updated to Helios. I use Eclipse at work for web development and it has become unusable: it hangs 4 or 5 times a day.

It's very easy to reproduce: you only have to select some text in CSS editor; it eventually will hang. 

I tried updating to last nightly build (Version: Helios Release
Build id: 20100617-1415) but no luck.

I am including a capture of the open file and the selected text of one of those hangings.

This is rendering Eclipse unusable for me. Never happened with previous version.
Comment 9 Pere CLA 2010-10-25 04:20:21 EDT
Created attachment 181615 [details]
Selected text when Eclipse hung
Comment 10 Martin Visser CLA 2010-10-25 04:23:03 EDT
(In reply to comment #8)
> This bug is not resolved for sure.

I worked for weeks without the problem, but last week it did happen to me once. Eclipse hang as I selected maybe 10 characters. The only option I had was to kill the process.
Comment 11 Rakesh CLA 2010-10-25 05:59:57 EDT
Still not able to reproduce :(. I see that in the capture that file is dirty. Were you trying to move the selected portion? In that case it appears similar to Bug 326411.A stacktrace or steps to reproduce would be very helpful.
Comment 12 Pere CLA 2010-10-27 04:20:21 EDT
(In reply to comment #11)
> Still not able to reproduce :(. I see that in the capture that file is dirty.
> Were you trying to move the selected portion? In that case it appears similar
> to Bug 326411.A stacktrace or steps to reproduce would be very helpful.

I've had a couple of hungs in a couple of hours. I'm attaching another capture of the last one. This time it was selecting the text of a comment. Yeah, the code is "dirty"; they make me write the tags uppercase, maybe it has something to do.

By the way, I select text with mouse, not with keyboard.

How can I send a "stacktrace"?

Reproducing it is very simple: just select some text :(
Comment 13 Pere CLA 2010-10-27 04:21:16 EDT
Created attachment 181806 [details]
Selecting text in CSS editor makes Eclipse hang
Comment 14 Nitin Dahyabhai CLA 2010-10-29 17:07:42 EDT
(In reply to comment #12)
> How can I send a "stacktrace"?

http://wiki.eclipse.org/How_to_report_a_deadlock

Whether it's a deadlock or just obnoxiously slow, a stack trace helps us understand what's taking so long.
Comment 15 Nick Sandonato CLA 2012-02-24 15:20:42 EST
(In reply to comment #14)
> (In reply to comment #12)
> > How can I send a "stacktrace"?
> 
> http://wiki.eclipse.org/How_to_report_a_deadlock
> 
> Whether it's a deadlock or just obnoxiously slow, a stack trace helps us
> understand what's taking so long.

Pere or Martin,

I know it's been quite some time, but have you been able to use this wiki article to report a stack trace? Or are you still seeing this problem?
Comment 16 Martin Visser CLA 2012-02-25 12:13:05 EST
(In reply to comment #15)
> Pere or Martin,
> 
> I know it's been quite some time, but have you been able to use this wiki
> article to report a stack trace? Or are you still seeing this problem?

Personally I haven't seen this problem in the newest version of Eclipse. I have been using Indigo for some time now and have never seen this problem again.
Comment 17 Nick Sandonato CLA 2012-02-29 10:03:47 EST
Thanks for getting back to us, Martin. This possibly was solved indirectly. If it hasn't been, following the instructions in comment 14 to get a stacktrace would be invaluable.