Bug 290395 - [Widgets] [GTK2.18] Update problem in the Eclipse's "Install new software" dialog.
Summary: [Widgets] [GTK2.18] Update problem in the Eclipse's "Install new software" di...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux-GTK
: P3 normal with 3 votes (vote)
Target Milestone: 3.5.2   Edit
Assignee: Bogdan Gheorghe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 290647 293666 294961 295006 295411 297156 298686 298716 299901 303435 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-24 08:05 EDT by Osmo Antero CLA
Modified: 2012-04-16 17:11 EDT (History)
27 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Osmo Antero CLA 2009-09-24 08:05:47 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090915 Ubuntu/9.10 (karmic) Firefox/3.5.3
Build Identifier: Linux karmic64 2.6.31-10-generic #35-Ubuntu SMP Tue Sep 22 17:33:14 UTC 2009 x86_64 GNU/Linux

Hello,

I am installing the Google's Android plugin in the Eclipse IDE. The Help -> "Install new Software" dialog does not update the values correctly. I have to resize the dialog or adjust the pane divider, then it updates and shows the values for the installed plugin. Here is a link to a video that demonstrates this bug.

Video: http://www.edbl.no/tmp/linux-install-new-software-in-eclipse.ogv

Notice that this happens with the latest Eclipse IDE (Galileo Eclipse 3.5) on Ubuntu Linux 9.10 (aka: Karmic Koala). But it works right on Ubuntu 9.04 stable.

System details are:
$ uname -a 
Linux karmic64 2.6.31-10-generic #35-Ubuntu SMP Tue Sep 22 17:33:14 UTC 2009 
x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu karmic (development branch)
Release:	9.10
Codename:	karmic

$ java -version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02, mixed mode)
----

Here is a complete installation guide for Android-development on Ubuntu Linux. It's valid for both Ubuntu 9.04 and 9.10. 
http://www.futuredesktop.org/developing_android_apps_on_ubuntu.html
Android is Google's Linux + Java-based mobile phone framework and Eclipse is its preferred IDE.



Reproducible: Always

Steps to Reproduce:
1. Install Ubuntu 9.10 (karmic Koala). This is the development version of Ubuntu to be released in the end of october 2009. Afraid this bug will stay there.

2. Download and install the latest Eclipse IDE. Do not use the Ubuntu's Eclipse package, but download "Eclipse IDE for Java EE Developers (188 MB)" from http://.eclipse.org. This bug appears on both 32 and 64 bits Ubuntu 9.10.

3. Install Google's Android-plugin via the Eclipse's Help -> "Install New Software" menu.  
The location should be: https://dl-ssl.google.com/android/eclipse/

Follow this guide, steps 1 - 7.
http://www.futuredesktop.org/developing_android_apps_on_ubuntu.html
Note that this guide was written for Ubuntu 9.04, but it is equally valid for Ubuntu 9.10. AFAIK, this bug is the only difference.
Comment 1 Remy Suen CLA 2009-09-24 09:29:29 EDT
What is your GTK+ version? I presume it is GTK+ 2.17.x.

Do you have colleagues that use Karmic? Do they have the same problem?
Comment 2 Susan McCourt CLA 2009-09-24 11:59:49 EDT
Hmmm...
Some delay in filling up the contents is expected, because the content must be retrieved from the site (Note the "Fetching children..." progress reported in the status bar at the bottom).  However, one should see a "Pending..." node while this happens, and of course the content should refresh afterward.

This really sounds like an SWT-level issue, reminiscent of bug 142965 and its various duplicates.

I'm going to move this to SWT since it only presents in a very specific version of Ubuntu and seems like the "blank sash" problem.

SWT-ers - In case this helps, the client code is fetching the content in a job and upon the fetch being done, is updating the list with set redraw false, and then setting redraw to true.  It behaves as if the damage from turning redraw on never happened until the sash is resized.  If you need more detail, let me know.  The class involved is DelayedFilterCheckboxTree (in p2.ui).

Osmo - it would be interesting to know if you see any similar problems in other windows that have sashes (run configurations, prefs, etc.), or more generally any other repaint problems.
Comment 3 Osmo Antero CLA 2009-09-25 15:23:53 EDT
@Remy Suen,
The GTK and GDK versions in Ubuntu Linux 9.10 (alpha6) are 2.18.0.

$ pkg-config --modversion  gtk+-2.0 gdk-2.0
2.18.0
2.18.0
------

This error happens on all of my laptops/PCs.
I especially re-installed a new Ubuntu 9.10 (alpha6) on a laptop and this bug occured there too. The two tested systems (a PC and laptop) have totally different graphic cards/drivers (I was thinking Xorg failure).
------

@Susan F. McCourt,
The "Pending..." label never shows up. The text area stays white till the sash is resized (moved up a bit). It does not help to resize the dialog.

I tried to create a small app that uses DelayedFilterCheckboxTree, but my Java/Eclipse knowledge did not suffice.

But I managed to install several examples via the Eclipse's  File -> Import -> CVS -> "Project from CVS" dialog, with import from anonymous@dev.eclipse.com/.
By the way, the CVS import dialog seems to use the DelayedFilterCheckboxTree class/functionality, and it works 100% right.

I also compiled/ran the Snippet107.java refrerred by the bug 142965, and it works also correct. It's just a simple sash (pane divider) test which does not use the DelayedFilterCheckboxTree class.

I have also checked some other dialogs with ordinary sash and everything works right and well. The "Install New Software" dialog is the only sinner so far.
------
I want to remind you that the final Ubuntu 9.10 release will be on 29th October, 2009.
Ref. https://wiki.ubuntu.com/KarmicReleaseSchedule
But I still think we'll need to monitor this bug carefully.

Daily builds are available from http://cdimage.ubuntu.com/daily/current/

And the Eclipse build is 
Eclipse Java EE IDE for Web Developers. 
Build id: 20090621-0832
Comment 4 Francis Upton IV CLA 2009-09-28 05:11:27 EDT
*** Bug 290647 has been marked as a duplicate of this bug. ***
Comment 5 Bogdan Gheorghe CLA 2009-10-13 11:50:25 EDT
Set the following env var in a terminal shell:

export GDK_NATIVE_WINDOWS=true

and then start eclipse from that terminal shell and see if that helps things.
Comment 6 Osmo Antero CLA 2009-10-25 05:51:08 EDT
Thank you very much. After setting the environment variable, Eclipse works very well in Ubuntu 9.10 (Karmic Koala).
$ GDK_NATIVE_WINDOWS=true $HOME/eclipse/eclipse

This also fixes the error with click-events.
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/460269
Comment 7 Andrew Overholt CLA 2009-10-29 09:51:08 EDT
*** Bug 293666 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Overholt CLA 2009-10-29 09:52:56 EDT
Bogdan, should we do some sort of patching to make GDK_NATIVE_WINDOWS=true default in our Fedora 12 packages?  I've also added the GTK 2.18 tag but if that's incorrect, feel free to remove it.
Comment 9 Bogdan Gheorghe CLA 2009-10-29 13:25:12 EDT
If Fedora 12 is shipping with 3.5.1 and GTK 2.18, that might be a good idea. You can bet lots of people will run into some issue with this.
Comment 10 Andrew Overholt CLA 2009-10-29 13:41:12 EDT
(In reply to comment #9)
> If Fedora 12 is shipping with 3.5.1 and GTK 2.18, that might be a good idea.

Do you know of a way to do it in SWT code?  We don't have a wrapper script for Eclipse.
Comment 11 Bogdan Gheorghe CLA 2009-10-29 14:36:20 EDT
Unfortunately, the only place to set environment variables is in the launcher (the launcher does it on occasion) but there is no API in place for us to set any env vars (there are bugs open for this - 215689 and 286463). 

Is a wrapper script out of the question?
Comment 12 Andrew Overholt CLA 2009-10-29 14:47:35 EDT
(In reply to comment #11)
> Unfortunately, the only place to set environment variables is in the launcher
> (the launcher does it on occasion) but there is no API in place for us to set
> any env vars (there are bugs open for this - 215689 and 286463). 

Hmm, maybe I'll look into patching the launcher to set this (just until 3.5.2 or whenever this gets fixed).  Thanks.

> Is a wrapper script out of the question?

It's not, but it changes /usr/bin/eclipse to be a shell script instead of a symlink to the actual launcher binary and wrapper scripts are kind of ugly :)
Comment 13 Bogdan Gheorghe CLA 2009-10-29 14:58:46 EDT
Understood. The launcher sets the path in eclipseNix.c/adjustLibraryPath which is called if loading a vm in-process using libjvm.so.

It can be found on dev.eclipse.org here:
/cvsroot/rt
org.eclipse.equinox/framework/bundles/org.eclipse.equinox.executable
Comment 14 Andrew Overholt CLA 2009-10-29 15:10:17 EDT
(In reply to comment #13)
> Understood. The launcher sets the path in eclipseNix.c/adjustLibraryPath which
> is called if loading a vm in-process using libjvm.so.

Thanks!  I was just looking there :)  Unfortunately that's not going to work for x86_64 which doesn't use libjvm's invocation API.
Comment 15 Earle Nietzel CLA 2009-11-01 01:05:27 EST
Would also like to add that I ran into this same issue using Fedora 12 Beta when trying to add any additional software via "Install New Software".

Setting 

export GDK_NATIVE_WINDOWS=true

Solved all issues.
Comment 16 Hugo A. Garcia CLA 2009-11-05 11:04:55 EST
(In reply to comment #15)
> Would also like to add that I ran into this same issue using Fedora 12 Beta
> when trying to add any additional software via "Install New Software".
> 
> Setting 
> 
> export GDK_NATIVE_WINDOWS=true
> 
> Solved all issues.

*** I would like to suggest a important NOTE in big friendly red letters be placed within the download links for the GTK version of Eclipse until an update is available ***

A lot of people are going to run into the following:

I have installed both the latest realeas of SuSE (11.2R2) and Ubuntu (9.10) and
then download the GTK version of Eclipse Classic 3.5.1 and 3.6M3. I go into
install software to add CDT (as an example use case) from the on-line
repositories for Galileo and Helios and I get one of the following results:

1) The tree seem to be populated but is not visible.
2) The tree is never populated and there seem to be no update indicator
informing us what is going on (aka Fetching this, updating that) on the bottom.
3) It just hangs.
4) https://bugs.eclipse.org/bugs/show_bug.cgi?id=290801
5 4) and then after a while it the tree populates.
6) Sometimes in 3.6M3 if you click on the drop down selector for the update
site twice then the package tree is populate and visible.

Everything works in windows and as far as I know in the previous distros of both
SuSE and Ubuntu.

-H
Comment 17 Remy Suen CLA 2009-11-12 07:14:56 EST
*** Bug 294961 has been marked as a duplicate of this bug. ***
Comment 18 Ulrich Hobelmann CLA 2009-11-12 15:39:05 EST
*** Bug 295006 has been marked as a duplicate of this bug. ***
Comment 19 Lee CLA 2009-11-14 02:11:13 EST
Is this the same as bug #291257?  Just trying to close the loop.
Comment 20 Jonathan Gossage CLA 2009-11-14 10:51:43 EST
This problem arises because the GTK folks have made significant changes in the way windows are managed. See http://library.gnome.org/devel/gtk/unstable/gtk-migrating-ClientSideWindows.html for details. The bottom line is that setting the environment variable GDK_NATIVE_WINDOWS will cause GTK to behave as before in most cases (but not all) but the long term solution is to review SWT and make it conform with the GTK approach.
Comment 21 Susan McCourt CLA 2009-11-18 11:10:40 EST
To expand upon my comment 2...
Since "normal" filtered trees don't exhibit the problem, I think it has something to do with use of setRedraw.  I have a subclass of the FilteredTree which triggers a job to do some filtering, and follows up with a set redraw that happens in an asyncExec.

The client code (triggered by a job done event)

display.asyncExec(new Runnable() {
  public void run() {
    if (checkboxViewer.getTree().isDisposed())
      return;
    checkboxViewer.getTree().setRedraw(false);
    // remember things expanded by the filter
    rememberExpansions();
    restoreLeafCheckState();
    // now restore expansions because we may have
    // had others
    restoreExpansions();
    checkboxViewer.getTree().setRedraw(true);
  }
}); 

The link in comment 20 indicates that expose events have been optimized.
I don't know how SWT handles setRedraw on GTK, but my hunch is that the redraw is the issue (or the use of redraw in an async..?)
Comment 22 Ian Bull CLA 2009-11-18 11:41:02 EST
*** Bug 295411 has been marked as a duplicate of this bug. ***
Comment 23 Peter Odéus CLA 2009-11-23 04:29:17 EST
Regarding the workaround:

Although "export GDK_NATIVE_WINDOWS=true" worked OK, the problem came back when
the eclipse restarted to apply my installation changes. It seemed that the
restart was fired in another env, so I had to quit and restart eclipse manually
again.

Would it affect other applications if I export the GDK_NATIVE_WINDOWS env
variable globally, hence always getting applied however eclipse is started?

/Peter Odéus
Comment 24 Hugo A. Garcia CLA 2009-11-23 08:15:22 EST
(In reply to comment #23)
> Regarding the workaround:
> 
> Although "export GDK_NATIVE_WINDOWS=true" worked OK, the problem came back when
> the eclipse restarted to apply my installation changes. It seemed that the
> restart was fired in another env, so I had to quit and restart eclipse manually
> again.
> 
> Would it affect other applications if I export the GDK_NATIVE_WINDOWS env
> variable globally, hence always getting applied however eclipse is started?
> 
> /Peter Od�us

 I have 'setenv GDK_NATIVE_WINDOWS=true' in my .bashrc and it doesn't fix your observation.

-H
Comment 25 CLA 2009-11-25 13:20:25 EST
A polite enquiry - will this be fixed for 3.5.2 and 3.6?
Comment 26 Bogdan Gheorghe CLA 2009-12-02 10:41:29 EST
OK - we released a fix for this to HEAD which made it into the nightly build
(N20091201-2000). Please give this build a try and let me know if this works on
your distro. Thanks!

Fixed in HEAD > 20091201
Comment 27 CLA 2009-12-02 11:12:44 EST
Does "nightly build" include 3.5.2 M builds?
Comment 28 Remy Suen CLA 2009-12-02 12:35:35 EST
(In reply to comment #27)
> Does "nightly build" include 3.5.2 M builds?

Not in this context, no. HEAD would be referring to the current development stream, that is, 3.6.
http://download.eclipse.org/eclipse/downloads/
Comment 29 CLA 2009-12-02 13:18:21 EST
(In reply to comment #28)
> (In reply to comment #27)
> > Does "nightly build" include 3.5.2 M builds?
> 
> Not in this context, no. HEAD would be referring to the current development
> stream, that is, 3.6.
> http://download.eclipse.org/eclipse/downloads/

I guess my real question then is "will the fix be put in for 3.5.2"?
Comment 30 Andrew Overholt CLA 2009-12-02 13:47:50 EST
(In reply to comment #26)
> Please give this build a try and let me know if this works on
> your distro. Thanks!

N20091201-2000 solves this problem for me on Fedora 12 (gtk2-2.18.3-19.fc12.x86_64).

(In case anyone wonders, I wasn't running with GDK_NATIVE_WINDOWS=true.)
Comment 31 Bogdan Gheorghe CLA 2009-12-02 17:06:03 EST
Andrew, thanks for checking it out. For anyone else testing: please do *not* set the env var GDK_NATIVE_WINDOWS=true - just run as you would normally.

Phillip - if this fix works for everyone (the more feedback, the better), it will get in for 3.5.2.
Comment 32 Daniel Le Berre CLA 2009-12-03 16:34:45 EST
Version: 3.6.0
Build id: N20091202-2000

Fixed for me on Mandriva 2010.
Comment 33 Stephan Herrmann CLA 2009-12-06 16:11:54 EST
(In reply to comment #26)
> OK - we released a fix for this to HEAD which made it into the nightly build
> (N20091201-2000). Please give this build a try and let me know if this works on
> your distro. Thanks!
> 
> Fixed in HEAD > 20091201

A bit late, but I confirm that this fixes the bug on Kubuntu 9.10, too.
Comment 34 Susan McCourt CLA 2009-12-08 11:26:46 EST
*** Bug 297156 has been marked as a duplicate of this bug. ***
Comment 35 Remy Suen CLA 2009-12-31 22:23:53 EST
*** Bug 298686 has been marked as a duplicate of this bug. ***
Comment 36 Ralf Ebert CLA 2010-01-03 12:45:05 EST
The latest 3.5.2 Stream Build M20091216-0800 still shows this problem. Any plans to backport the fix?
Comment 37 Remy Suen CLA 2010-01-03 15:27:25 EST
*** Bug 298716 has been marked as a duplicate of this bug. ***
Comment 38 Bogdan Gheorghe CLA 2010-01-12 17:33:52 EST
Ported to 3.5.2 > 20100112
Comment 39 Remy Suen CLA 2010-01-12 18:15:51 EST
(In reply to comment #38)
> Ported to 3.5.2 > 20100112

Thank you Bogdan and the rest of the SWT team!
Comment 40 tux CLA 2010-01-18 08:35:10 EST
*** Bug 299901 has been marked as a duplicate of this bug. ***
Comment 41 tux CLA 2010-01-18 08:38:06 EST
I have a similar problem on Kubuntu Karmic 32 bit.  One fix for this seems to either twiddle with the window size as demonstrated in this bug's video or to disable compiz like effects.  (In KDE Disabling Desktopn effects fixed the problem for me).
Comment 42 Bogdan Gheorghe CLA 2010-01-18 14:30:12 EST
@tux: Make sure you are running a recent build to pick up the fix.
Comment 43 tux CLA 2010-01-18 14:41:05 EST
the gtk environment variable fixed my issue.  

setting:  export GDK_NATIVE_WINDOWS=true fixes it.

I'm running Karmic Ubuntu, and was running the latest release version from the website, I tried the Eclipse 3.6M4 as well.  

I would still call this a bug though, you shouldn't have to edit your .bashrc in order to get the expected behavior out of eclipse.  

this fixed my issue.  I was mainly commenting to inform anyone concerned that the issue is present in KDE on karmic if that is useful info at all.

--
Tux :)
Comment 44 martin CLA 2010-02-21 12:04:35 EST
*** Bug 303435 has been marked as a duplicate of this bug. ***
Comment 45 Martin Fleurke CLA 2012-01-23 12:11:01 EST
export GDK_NATIVE_WINDOWS=true causes eclipse under ubuntu unity to lose its scrollbars. (LIBOVERLAY_SCROLLBARS).
Comment 46 Pablo Condoleo CLA 2012-04-16 10:13:57 EDT
Hi, I use Ubuntu 11.10 with Eclipse Ganymede and this fix it works for me with the scrollbar issue.

# work around for LP #769277
export UBUNTU_MENUPROXY=0
export LIBOVERLAY_SCROLLBAR=0
# end work around

Cheers.