Eclipse takes 100% CPU with "New Wave" theme

Bug #334991 reported by Mathieu Marquer
30
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Eclipse
Invalid
Undecided
Unassigned
New Wave
Fix Released
High
Dilomo
eclipse (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: eclipse

Using Ubuntu Jaunty up-to-date, eclipse (java processus) takes 100% CPU as soon as eclipse is started, making eclipse unusable.

It happens on both a Samsung NC10 with Ubuntu 32 bits, and a Dell Vostro 1500 with Ubuntu 64 bits, so it doesn't seems to be related with architecture.

It also happens with Open JDK or Sun Java 6. Tried with Eclipse 3.4 .tar.gz, same bug.

As found later, this only happens with "New Wave" GNOME theme.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: eclipse 3.2.2-5ubuntu3
ProcEnviron:
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: eclipse
Uname: Linux 2.6.28-8-generic i686

Revision history for this message
Mathieu Marquer (slasher-fun) wrote :
Revision history for this message
Mathieu Marquer (slasher-fun) wrote :

Marking as confirmed since it happens on two different computers.

Changed in eclipse:
status: New → Confirmed
description: updated
Changed in eclipse:
status: Unknown → Confirmed
Revision history for this message
Lachezar Dobrev (lachezar) wrote :

I am using Eclipse stand-alone, not from package, but I am observing the same behaviour.
A quick test revealed, that the problem exists with the New Wave theme, but does not occur with the Human-Clearlooks theme. Haven't tried other themes.

To reproduce start Eclipse with the New Wave theme, Eclipse takes 100% CPU, use the control panel to switch to Human-clearlooks, and after a brief delay CPU usage falls down, then you can turn back to New Wave theme.
This behaviour tends to reoccur after the back-and-forth theme switching can't pinpoint the reason though.
I have an unconfirmed hunch, that this behaviour occurs when an unbound progress bar is displayed (the one that moves back-and-forth). Such a progress bar is available upon start-up, and also with CVS/SVN operations, possibly others.

Ubuntu 09.04 Jaunty, upgraded from 08.10: AMD64 (!!!)
Eclipse SDK, Version: 3.4.2, Build id: M20090211-1700

I am attaching a small file containing two stack traces: one from initially start-up Eclipse, and one after switching the theme.

description: updated
summary: - Eclipse takes 100% CPU
+ Eclipse takes 100% CPU with "New Wave" theme
Revision history for this message
Lachezar Dobrev (lachezar) wrote :

Contacted theme creator off-the-record.
He pointed out the Theme Project, so I linked the theme project to this bug.

Revision history for this message
Dilomo (ankere) wrote :

I have fixed this. See:
https://bugs.launchpad.net/anton/+bug/320097
https://bugs.launchpad.net/anton/+bug/318621

There might be a problem with the default jaunty installation of the theme but as everything else is themed and working I have no clue what this might be.

Revision history for this message
Daanemanz (daanemanz) wrote :

I can confirm this. The same problem arises with the Lotus Notes client for Linux. I experienced this a while ago, but reverting to the standard Human theme fixed the problem. Not surprising though; Lotus Notes client is built on Eclipse.

Revision history for this message
Dilomo (ankere) wrote :

I can't confirm the problem on my computer with Jaunty and eclipse 3.2.2-5ubuntu3. See attached screenshot (and the CPU applet at the top right). Btw can you test if the theme provided here is causing this bug:

http://gnome-look.org/content/show.php/New+Wave?content=87134

If no the we should search the problem in the Ubuntu intsallation of the theme.

Revision history for this message
Lachezar Dobrev (lachezar) wrote :

Hmmm... After reading Dilomo's notes I checked #320097 and #318621.
While reading https://bugs.launchpad.net/anton/+bug/320097/comments/7 and below I realized, that the problem arises due to my using a specially crafted supplemental gtk-rc file used to compact the UI in eclipse, since the default look (on all GTK themes) is very sparse and clunky.
The compacter gtk-rc works fine with the Human-Clearlooks (and Dust Sand for that matter) theme, but when used in combination with the New Wave theme exhibits 100% CPU.
Running Eclipse without the compacter gtk-rc does not raise CPU usage with the New Wave theme.

Daanemanz: Can you please check if Lotus Notes Client does not come with a supplemental GTK RC?

If I comment-out the GtkToolbar::internal-padding = 0 line in my gtk-rc CPU usage drops, but the interface becomes clunky, pity.
However the GtkToolbar::internal-padding = 1 'fix' did not work for me, I had to use GtkToolbar::internal-padding = 2, which is utterly strange.

I am still wondering if this has something to do with the fact, that there is a progress bar in a tool bar in Eclipse, very small, just a couple of notches. I am eager to test away, because I like the theme, but I am not going to sacrifice usability for viewing pleasure.
I am willing to post my compacter gtk-rc, or screen shots if needed.

Revision history for this message
Dilomo (ankere) wrote :

As a conclusion I have to say that maybe the problem is in Eclipse not being able to interpret certain values from the gtkrc file.

Lacho: I may help you out make a more compact version of the theme. As a start have a look a the New Wave Dark menus provided with the theme package in the gnome-look link. It has inherited the base new wave gtkrc file and modified certain values in order to make the menus look dark. Probably the same approach could be taken in order to make smaller New Wave theme.

Revision history for this message
Nikolai Ugelvik (nikko-u-deactivatedaccount) wrote :

I can confirm this. I used human-clearlooks with deviant metacity theme, and a custom "Windows" color and the bug kept occurring every 5 minutes or so. I changed back to the default human-clearlooks and it now works.

Revision history for this message
MankyGitt (dnadruff) wrote :

I can confirm that the Lotus Notes 8.5 for linux release does not incorporate any supplemental GTKRC files.

It does however have a concept of themes which is managed (I think) by stylesheet. I've experimented using Notes with each inbuilt theme setting with no difference in performance. In all cases, when using the Ubuntu NewWave theme, Notes hangs after launching. As commented by other users in other threads, the initial switch of theme to NewWave results in application unresponsiveness after a period of time, but subsequent attempts to launch the application are affected immediately.

It makes no difference whether the OS has been up for one or more attempts.

For now I've resolved to use the tried and true original themes in order to be productive. I look forward to playing with new themes in future releases. A little "fresh paint" goes a long way when you spend 40 hrs/week working in your desktop.

Revision history for this message
EclipseAgent (ben-kevan) wrote :

I think I just entered a duplicate of this bug..

I was having an issue with Lotus Notes (which runs on eclipse) and using the New Wave theme .. was taking 100% of the CPU on a single processor when doing tasks within Lotus Notes..

For the hell of it I changed the theme, and it started working and then.. a search brought me to this bug.. (after I entered mine)..

I think the importance of this should def be raised.

Revision history for this message
Dilomo (ankere) wrote :

I'm wiling to fix this for the next version of New Wave but I don't know what is causing the bug. If any developer can give me a clue I'll try to fix it. As a start I want to know where I should download the right version you are using (maybe trial)?

Revision history for this message
EclipseAgent (ben-kevan) wrote :

Dilomo,

I'm guessing a sudo apt-get install eclipse will give you the required packages to duplicate the bug.
If you're looking for a Lotus Notes trial you can find it on IBM's site, and I am using Lotus Notes 8.5.
But it's an eclipse bug and not directly related to Lotus Notes (since it runs on top of Eclipse).

Revision history for this message
Dilomo (ankere) wrote :

Well as I have said there is no problem with eclipse because it is a Lotus bug. I attach video to verify this.

Revision history for this message
Dilomo (ankere) wrote :

Well let's revisit the bug:
 - eclipse does not work with compact setting
 - Notes does not work with these settings too.

So we might try to not apply the compact styles used in New Wave and see what happens. Here's how we do it:

1. Find the line in your New Wave gtkrc file (~/.themes/ or /usr/share/themes/):
widget "*swt*toolbar*" style:highest "newwave-toolbar-noimage-small"

2. Comment it out like that:
# widget "*swt*toolbar*" style:highest "newwave-toolbar-noimage-small"

3.Save the gtkrc ile and reset the theme from the Appearance manager

Is there any difference? Maybe the match "*swt*toolbar*" is not correct. Try to remove the star at the end to apply to the toolbar only not the widgets in it: "*swt*toolbar" . Any other results?

Revision history for this message
javs (javierous) wrote :

I've managed to get Notes and the theme without having the cpu jumping to 100%.

The problem I was having was not actually related to eclipse or an eclipse platform app, as it turns out Lachezar Dobrev's hunch was right: it was the small progress bar that both Notes and eclipse have.

I've attached a small python app that only creates the same little progress bar, which should reproduce the bug. When you "pulse" the progress bar (i.e. make it move), my cpu jumps to 100% for a while. If you do this repeatedly (just like Notes or eclipse would do) you have a frozen app :)

I've been testing around with the theme's gtkrc and found that the overlays placed in the progress bar are making things slow. Comparing to other themes like Human, they dont use pixmap for rendering progress bars, so this is why only this theme was having the issue. I've also noticed that those overlays might be a little big (considering this might get redraw and resized very fast in a few seconds).

As a workaround, I cropped both over-progressbar-horiz.png and over-progressbar-vert.png and placed them in "/usr/share/themes/New\ Wave/gtk-2.0/Images/ProgressBar/". Also you need to edit the gtkrc and change one of the overlays to stretch in line 1053 (not sure how this was working without it, but with the smaller images some bars were not being displayed correctly). I don't see any noticeable difference between the theme with large or small overlays.

So far the problem seems to be gone (in both the test app and Notes, but haven't tested eclipse yet).

I'm attaching the test app, the cropped images and the gtkrc I'm using.

Revision history for this message
javs (javierous) wrote :
Revision history for this message
javs (javierous) wrote :
Revision history for this message
javs (javierous) wrote :
Revision history for this message
Dilomo (ankere) wrote :

Good work javs! Can somebody else confirm the problem is fixed?

As for the progressbar: this is the only place in the theme I used such a big images because they gave much sharper look than if they were stretched. But I will try to achieve the same result with smaller stretched images. Javs can you try to make the overlay_stretch to FALSE and see if that fixes the problem too (with large images)?

Dilomo (ankere)
Changed in anton:
status: New → Triaged
importance: Undecided → High
Revision history for this message
javs (javierous) wrote :

I reverted the theme and disabled overlay_stretch, the cpu problem is fixed as well but another problem is seen (see screenshot, note the largest progress bar).

On a side note, I also noticed that using pixmap for drawing pulsing progress might be an expensive operation. With cropped overlays, stretching off, or with no overlays at all, even though it doesn't lock up the app, cpu gets a little high (~50% on my pc with a bar as large as the one in the screenshot) comparing to what a theme like Human uses (which in turn climbs up to ~10-15% with the same kind of bar).

Revision history for this message
Dilomo (ankere) wrote :

OK. I guess I'll have to think of a way to make a sharp progressbar with a small stretched image in order to allow you to work with eclipse and notes. I realize 50% of CPU power is a bit more for drawing but the pixmap engine is getting old and it could further be optimized for less CPU usage and even GPU usage only. But let's hope that happens in Gnome 3.0 :)

Revision history for this message
EclipseAgent (ben-kevan) wrote :

I have confirmed that this indeed fixes the issue.

Dilomo (ankere)
Changed in anton:
assignee: nobody → Dilomo (ankere)
status: Triaged → In Progress
Revision history for this message
Dilomo (ankere) wrote :

In this pack you'll find the newest themes that has to fix this issue. I'd like to have someone confirm that they work. Also if you have time and desire you could test the brand new (tested only by me) Configurator that would let you easily manage the installed New Wave themes.

Revision history for this message
Dilomo (ankere) wrote :

I tested it and everything seems normal. I need one confirmation and I'll upload it for general use.

P.S. If you find the package structure difficult to understand you may need to read this first:
http://gnome-look.org/content/show.php/New+Wave?content=87134
(here is only the older version yet)

Revision history for this message
javs (javierous) wrote :

I tested that last theme, Notes works fine, no freeze.

Revision history for this message
Dilomo (ankere) wrote :

I released the pack on Gnome-look.

Changed in anton:
status: In Progress → Fix Released
Revision history for this message
DSHR (s-heuer) wrote :

Seems not to happen on karmic.

Revision history for this message
Dilomo (ankere) wrote :

DSHR: Is it related to Eclipse or to Lotus notes? Please specify the exact version you tested it with? Can somebody else confirm that?

Revision history for this message
EclipseAgent (ben-kevan) wrote :

I think DSHR is trying to say the issue isn't there anymore (guessing the fix was applied).

The underline problem was triggered with Eclipse, which Lotus Notes is built on.. But again, I believe the issue has been resolved according to comment #28 by Dilomo

Revision history for this message
Dilomo (ankere) wrote :

Hmm if that is the case - then everything is normal now :)

Revision history for this message
Lachezar Dobrev (lachezar) wrote :

Sorry about the delay, I was trying to test the new theme without much impact on my system.

The theme provided in comment #25 works for me with Eclipse 3.5 with the 'Compact' theme supplement.

Version at testing (Eclipse was updated while waiting for theme fix):

Ubuntu 09.04 Jaunty, upgraded from 08.10: AMD64 (!!!)
Eclipse SDK, Version: 3.5.0, Build id: I20090611-1540

Revision history for this message
Dilomo (ankere) wrote :

Thanks Lacho, for testing the new version and for giving the initial clue to main problem. I'm very happy that it works even with the compact theme.

Revision history for this message
Niels Thykier (niels-thykier) wrote :

Hi

Based on the latest posts in this report I have closed this bug as invalid in eclipse (and notified upstream eclipse that we are closing this bug).

I used invalid as status because the bug appeared to have been in New Wave and no changes were done in eclipse to fix this (at least not in any Ubuntu/Debian packed version of eclipse).

~Niels

Changed in eclipse (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Ismail S Khan (khan-ismail) wrote :

Hello All, I am seeing this problem on all the themes i am using. I have been trying to work around the same looking at all possible threads but no use. The solution mentioned here doesnt seem to work as well.

The tiny progress bar on notes 8.5 moves really fast and cpu utilization goes 100% causing the system to get heated up and finally crash..

Thanks,
Ismail

Revision history for this message
Cristiana D'Amore (cdamore) wrote :

I have the same problem, with all themes - any solution available?
Thanks, Cristiana

Revision history for this message
Onno (ostraaten) wrote :

Same problem, I'm done with the Eclipse IDE, I am calling it quits.

I have had problems with Eclipse before in the past. With workspaces. They were incredible easy to get into a state where they would render Eclipse a useless piece of software. In the end they fixed that I think. For about a year I worked with Eclipse without major problems.

And now this 100% CPU problem. I'm fed up with Eclipse. I have spend more than 4 hours today working on this problem. Things were fine yesterday. I have rebooted my laptop several times, I have killed and restarted Eclipse several times. I have tried a new workspace. Closed projects, opened projects and so forth. Same result everywhere: 100% CPU.

Probably this whole plugin/platform idea of Eclipse is fundamentally flawed. It is probably more like a recipe for disaster.

I'm switching to a more simple tool like vimmate.

At least on Ubuntu I think Eclipse is crap software. Don't use it unless you get paid for using it, by the hour.

Neal McBurnett (nealmcb)
Changed in eclipse:
importance: Unknown → Undecided
status: Confirmed → New
status: New → Invalid
Revision history for this message
Neal McBurnett (nealmcb) wrote :

The Eclipse bug tracker for this https://bugs.eclipse.org/bugs/show_bug.cgi?id=264376 was resolved im 2010 as "RESOLVED NOT_ECLIPSE".
Since Launchpad said it couldn't pull the status from the eclipse bug tracker, I've marked it here manually as "invalid".

I'm not seeing this problem on Maverick either. I'm using the "Ambiance" theme (System/Preferences/Appearance/Themes)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.