Bug 542675 - [GTK3] "No more handles"
Summary: [GTK3] "No more handles"
Status: CLOSED DUPLICATE of bug 517671
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.10   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-12-11 10:58 EST by Thomas Singer CLA
Modified: 2020-03-25 06:47 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2018-12-11 10:58:57 EST
A couple of SmartGit 18.2 users reported following exception:

org.eclipse.swt.SWTError: No more handles
	at org.eclipse.swt.SWT.error(SWT.java:4621)
	at org.eclipse.swt.SWT.error(SWT.java:4510)
	at org.eclipse.swt.SWT.error(SWT.java:4481)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:522)
	at org.eclipse.swt.widgets.Control.drawBackground(Control.java:207)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:6118)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5821)
	at org.eclipse.swt.internal.gtk.GTK._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.GTK.gtk_main_do_event(GTK.java:3743)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1366)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1576)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4411)

For they it is 100% reproducible, e.g. on CentOS 7.6 (3.10.0-957.1.3.el7.x86_64)
org.eclipse.swt.accessibility.UseIA2      : "false"
org.eclipse.swt.internal.deviceZoom       : "100"
org.eclipse.swt.internal.gtk.cairoGraphics: "false"
org.eclipse.swt.internal.gtk.theme        : "Adwaita"
org.eclipse.swt.internal.gtk.version      : "3.22.30"

but not for me, so I'm not able to provide a snippet.
Comment 1 Thomas Singer CLA 2018-12-11 11:11:57 EST
Forgot to mention: SmartGit 18.2 uses SWT v4922r22 (Git commit c76db3d311a).

Another user has the problem on Ubuntu MATE.
Comment 2 Eric Williams CLA 2018-12-11 11:13:17 EST
(In reply to Thomas Singer from comment #0)
> org.eclipse.swt.internal.gtk.cairoGraphics: "false"

Does this mean they are not using Cairo at all?
Comment 3 Thomas Singer CLA 2018-12-12 07:03:31 EST
(In reply to Eric Williams from comment #2)
> Does this mean they are not using Cairo at all?

We've disabled Cairo a long time ago after <https://stackoverflow.com/questions/26676870/java-hotspottm-64-bit-server-vm-warning-centos-smartgit-smartsvn>. Should we try without this option?
Comment 4 Alexander Kurtakov CLA 2018-12-12 07:24:05 EST
non-Cairo rendering is gone for some time now so org.eclipse.swt.internal.gtk.cairoGraphics: "false" is simply no-op.
Comment 5 Alexander Kurtakov CLA 2018-12-12 07:25:00 EST
To be more precious - non-cairo drawing was an option only up to GTK 2.18 IIRC .
Comment 6 Dani Megert CLA 2018-12-14 10:12:29 EST
(In reply to Thomas Singer from comment #1)
> Forgot to mention: SmartGit 18.2 uses SWT v4922r22 (Git commit c76db3d311a).

You marked the version as 4.9 but R4_9 is v4919. So, it's probably some 4.10 build that's used.

Is it a regression, i.e. does it work with a previous release?
Comment 7 Thomas Singer CLA 2018-12-20 11:28:00 EST
(In reply to Dani Megert from comment #6)
> (In reply to Thomas Singer from comment #1)
> > Forgot to mention: SmartGit 18.2 uses SWT v4922r22 (Git commit c76db3d311a).
> 
> You marked the version as 4.9 but R4_9 is v4919. So, it's probably some 4.10
> build that's used.

OK

> Is it a regression, i.e. does it work with a previous release?

Well, the users say that with SmartGit 18.1 which used an older SWT jar with SWT_GTK3 set to 0 the problem did not occur.

We've got this report now from a LOT of users on different systems. I've tried a LOT of systems in VirtualBox or on a real machine using a live image (same GTK version, same GTK theme), but never was able to reproduce (while for them it is 100% reproducible).

What do you recommend I (or the users) should try to better understand the bug? Our only work-around so far is to downgrade the SWT jar to the one from SmartGit 18.1 and force SWT_GTK3=0.
Comment 8 Andrey Loskutov CLA 2018-12-20 23:01:37 EST
If I remember it right, Yourkit offers SWT widgets leak inspection. It could be useful to see which code leaks which handles.
Comment 9 Thomas Singer CLA 2018-12-21 03:08:27 EST
A user found out that setting the environment variable GTK_IM_MODULE to ibus works around this problem.
Comment 10 Cay Horstmann CLA 2018-12-29 01:30:08 EST
I have the same problem with Ubuntu 18.04 and Eclipse 2018-12. Eclipse Oxygen 3.A works fine.

I use the XIM input method to configure the Compose key sequences (https://help.ubuntu.com/community/ComposeKey#XIM, https://userbase.kde.org/Tutorials/ComposeKey). 

Starting Eclipse 2018-12 with 

GTK_IM_MODULE=ibus

or

GTK_IM_MODULE=

works, as does

GTK_IM_MODULE_FILE=/usr/lib/gtk-3.0/3.0.0/immodules.cache

(see https://wiki.archlinux.org/index.php/IBus)
Comment 11 Eric Williams CLA 2019-01-02 10:02:02 EST
There are issues with using GTK_IM_MODULE=xim, in fact it was the cause of bug 517671 as well.

4.10 has a warning on startup if GTK_IM_MODULE=xim is defined -- the solution is to use ibus or something else.
Comment 12 Hendrik Coetzee CLA 2019-01-23 03:43:53 EST
Eclipse 2018.12
Ubuntu 18.04.1 LTS
OpenJDK  Zulu11.29+3-CA (build 11.0.2+7-LTS)

Same issue experienced.

Can confirm, starting Eclipse with GTK_IM_MODULE=ibus solved the problem for me.

I created a little wrapper script that just does "export GTK_IM_MODULE=ibus" before launching eclipse.
Comment 13 Eric Williams CLA 2019-01-23 10:32:40 EST

*** This bug has been marked as a duplicate of bug 517671 ***
Comment 14 Alex Vasconcelos CLA 2019-04-15 17:51:49 EDT
It's possible use the .xprofile file in your home to handle this...

actually, you should export the same variable in .profile and .xprofile, for both uses (command-line and shell)...

export GTK_IM_MODULE="ibus"