Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 526357

Summary: [GTK] Cursor lookup failure causes "No more handles"
Product: [Eclipse Project] Platform Reporter: ms fc <eclipse.org>
Component: SWTAssignee: Nikita Nemkin <nikita>
Status: VERIFIED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: alex.wreschnig, browseria, ericwill, jan.public, jonatan.jonsson+eclipse, Lars.Vogel, lmontecchi, m, nikita
Version: 4.8Keywords: triaged
Target Milestone: 4.15 M3   
Hardware: PC   
OS: Linux   
See Also: https://launchpad.net/bugs/1725958
https://git.eclipse.org/r/156446
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=023d007f7773a264857e5cc9500e6d35a52a2ae1
Whiteboard:

Description ms fc CLA 2017-10-23 04:42:22 EDT
See https://bugs.launchpad.net/eclipse/+bug/1725958 for details.

Happens in both the Eclipse provided in the Ubuntu distribution (which is Neon) and in Oxygen downloaded from eclipse.org.

I don't know if this is an Eclipse issue or an Ubuntu issue hence tickets filed in both places.
Comment 1 ms fc CLA 2017-10-25 06:29:36 EDT
Following a power-off, reboot and update to the Gnome Desktop Manager, Eclipse no longer hangs it just fairly quickly fails with the "Too many handles" error. So I have updated the subject. See https://bugs.launchpad.net/eclipse/+bug/1725958 for further details.
Comment 2 ms fc CLA 2017-10-26 20:31:27 EDT
I'm not alone in suffering this critical problem:

https://www.reddit.com/r/Ubuntu/comments/76yovr/1710_eclipsecdt_broken/

As I've reported here it, Oxygen also fails so the comment at Reddit about the Ubuntu included Eclipse being old is not relevant.

Somebody please help.
Comment 3 Mirosław Romaniuk CLA 2017-10-27 21:44:10 EDT
Hi,
As a workaround use Unity as desktop manager.
At the login page (Ubuntu)  choose Unity as the desktop manager (click the gear).
Regards.
Comment 4 ms fc CLA 2017-10-30 07:05:44 EDT
Re: comment #3, thanks. I independently discovered that Eclipse works not only under Unity but also Ubuntu X.org. So the problem is related to Wayland.

I had to make some corrections to the original bug report over in Ubuntu land. Here I will summarize the problems for ease of reference.

Both Eclipse Neon and Oxygen fail on Ubuntu 17.10 when running on the "Ubuntu" platform, i.e Wayland. The Ubuntu-included Eclipse, which is 3.8 (Juno?), works.

All 3 versions work if logged in under either Ubuntu X.org or Unity platforms.

Both failing versions print out

    Gdk-Message: Unable to load hand2 from the cursor theme

on the console. After that Neon hangs (with only the splash screen visible) and Oxygen exits, raising a message box reporting an error and telling you to look at a log file for details. The log file shows the error

    org.eclipse.swt.SWTError: No more handles

The full log file is attached to https://bugs.launchpad.net/eclipse/+bug/1725958.

Additionally their splash screens are drawn in the upper left of the screen and Neon's splash screen changes to a zoomed-in view of its upper left corner at some point during loading.

Note: the failure happens while loading the workspace.
Comment 5 Lars Vogel CLA 2019-02-28 06:23:05 EST
Works for me on Ubuntu 18.04 und 18.10 with latest Eclipse 2018-12 release. Please reopen if you still an reproduce with a recent Ubuntu and Eclipse release
Comment 6 Jonatan Jönsson CLA 2019-12-10 04:18:35 EST
This happens for me again on Ubuntu with Wayland. I'm using Eclipse 2019-09.

"Unable to load hand2 from the cursor theme"
Comment 7 Lars Vogel CLA 2019-12-10 04:34:29 EST
Eric, please have a look.
Comment 8 Eric Williams CLA 2019-12-10 08:09:59 EST
What is your GTK3 theme? Sounds like some cursor is missing.
Comment 9 Jan Vlug CLA 2019-12-22 14:47:51 EST
I'm confirming this on Fedora 31, fully up to data. Also running GNOME Wayland.

From the log file:

eclipse.buildId=4.13.0.I20190916-1045
java.version=1.8.0_232
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product -clean

!ENTRY org.eclipse.osgi 4 0 2019-12-22 20:42:53.499
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles
Comment 10 Leonardo Montecchi CLA 2020-01-03 21:45:48 EST
Hello,

I can also confirm this on Debian 10 (Buster), just installed. This happens when using cursor themes different from Adwaita (the Gnome default one).

Apparently, in those themes some cursors are missing (?). I don't really know how cursor themes work, but Eclipse is the only application crashing because of this.

It is worth mentioning that the theme I was using (Breeze) comes with Debian packages (i.e., it is not some fancy theme I installed from somewhere). I also tried with another theme different from Adwaita, and I got the same result (crash).
Comment 11 Nikita Nemkin CLA 2020-01-23 08:53:16 EST
Everyone with a missing hand2, please share the details of your environment. In particular X11 or Wayland and which cursor theme do you use exactly (which distro and package). I'd expect hand2 to be present in every cursor theme.

Anyway, I can reproduce the problem with Breeze cursors on Ubuntu and Fedora when loading SWT.CURSOR_SIZENS ("double_arrow") and SWT.CURSOR_UPARROW ("sb_up_arrow"). Neither of them is available in Breeze, despite being classic X cursors. On X11 GTK falls back on legacy XFont cursor, on Wayland there seems to be no fallback, hence NO_MORE_HANDLES.

I guess SWT should use better cursor names (like "sb_v_double_arrow" for CURSOR_SIZENS) and load the arrow cursor as a last resort, instead of crashing.
Comment 12 Leonardo Montecchi CLA 2020-01-23 10:14:58 EST
I am using Gnome 3.30.2 in Debian 10 (Buster) under Wayland 1.20.4. It seems to be a problem related to Wayland, it became the default in this release as far as I know.

The issue can be reproduced the cursor themes Breeze (breeze-cursor-theme) and Chameleon (chameleon-cursor-theme). The same occurs with themes downloaded from "gnome-look.org".

I noticed that also in other applications some cursors do not show up properly, for example the "loading" cursor. Perhaps something important has changed or is broken in Wayland.
Comment 13 Nikita Nemkin CLA 2020-01-23 10:33:04 EST
(In reply to Leonardo Montecchi from comment #12)
> I am using Gnome 3.30.2 in Debian 10 (Buster) under Wayland 1.20.4. It seems
> to be a problem related to Wayland, it became the default in this release as
> far as I know.
> 
> The issue can be reproduced the cursor themes Breeze (breeze-cursor-theme)
> and Chameleon (chameleon-cursor-theme). The same occurs with themes
> downloaded from "gnome-look.org".
> 
> I noticed that also in other applications some cursors do not show up
> properly, for example the "loading" cursor. Perhaps something important has
> changed or is broken in Wayland.

Just to be clear: are you getting "Gdk-Message: Unable to load hand2 from the cursor theme" message? Or some other cursor name? Does this cursor exist in /usr/share/icons/breeze_cursors/cursors/ ?
Comment 14 Leonardo Montecchi CLA 2020-01-23 10:46:11 EST
> Just to be clear: are you getting "Gdk-Message: Unable to load hand2 from
> the cursor theme" message? Or some other cursor name?

Yes, exactly:

Gdk-Message: 16:43:03.981: Unable to load double_arrow from the cursor theme

> Does this cursor exist
> in /usr/share/icons/breeze_cursors/cursors/ ?

The cursor "double_arrow" does not exist
Comment 15 Eclipse Genie CLA 2020-01-23 11:34:07 EST
New Gerrit change created: https://git.eclipse.org/r/156446
Comment 17 Nikita Nemkin CLA 2020-01-25 07:03:43 EST
SWT.CURSOR_SIZENS now uses sb_v_double_arrow (instead of double_arrow), which is present in every cursor theme I've checked.

Also, SWT will always fall back to the default pointer cursor. ERROR_NO_HANDLES is only possible if the default cursor itself has failed to load.
This is a guard against mysterious errors like missing hand2.