[GTK3] Gdk-CRITICAL from gdk_threads_set_lock_functions when a second Display is created in the same JVM
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start with the GTK3 Display initialization path and the call to gdk_threads_set_lock_functions() described in the issue. Reproduce the two-Display snippet on Linux/GTK3, then verify that creating and disposing a second Display no longer emits the Gdk-CRITICAL on stderr.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
On Linux/GTK3, SWT emits a Gdk-CRITICAL from gdk_threads_set_lock_functions:
(SWT:1664323): Gdk-CRITICAL **: 15:19:27.874: gdk_threads_set_lock_functions: assertion 'gdk_threads_lock == NULL && gdk_threads_unlock == NULL' failed
gdk_threads_set_lock_functions() has been deprecated since GTK 3.6, and its
implementation asserts that the lock functions have not already been installed. The
assertion therefore fails on any call after the first one in a process. This appears
to happen whenever a second Display is created in the same JVM.
Nothing fails as a result — the tests pass and the process does not crash — but the
CRITICAL is emitted on stderr on every affected run, which makes it noise in build
logs where a real GTK CRITICAL would matter.
Seen while running Tycho UI tests (org.eclipse.tycho.surefire.osgibooter.uitest),
where an Equinox workbench is provisioned per test module. The display is a normal
Xorg X11 session, not Xvfb and not headless.
To Reproduce
Run this on Linux/GTK3:
import org.eclipse.swt.widgets.Display;
public class Snippet {
public static void main(String[] args) {
Display d1 = new Display();
d1.dispose();
Display d2 = new Display(); // Gdk-CRITICAL is emitted here
d2.dispose();
}
}
Expected behavior
Creating a second Display in the same process should not emit a GTK CRITICAL. SWT
should either not call the deprecated gdk_threads_set_lock_functions() at all, or
call it only once per process.
Screenshots
Not applicable — the symptom is stderr output.
Environment:
- Select the platform(s) on which the behavior is seen:
-
- All OS
-
- Windows
-
- Linux
-
- macOS
-
Additional OS info (e.g. OS version, Linux Desktop, etc)
Ubuntu 24.04.4 LTS, aarch64, kernel 6.17.0-1031-nvidia.
GTK 3.24.41-4ubuntu1.3 (libgtk-3-0t64:arm64). No GTK4 package installed and
SWT_GTK4 is unset, so this is the GTK3 binding.
Real X session: XDG_SESSION_TYPE=x11, Xorg on vt2 under gdm, DISPLAY=:0.
Not headless, not Xvfb, not Xwayland.
NVIDIA GPU present (PCI 10de:2e12). -
JRE/JDK version
Eclipse Temurin 25.0.4.1+1 (OpenJDK 25.0.4.1 LTS), aarch64
Version since
Unknown. First observed with org.eclipse.swt.gtk.linux.aarch64 3.135.0 on the
Eclipse 2026-09 RC1 (4.41) target platform. Not checked against earlier versions,
so this is first-observed rather than a regression point.
Workaround (or) Additional context
No workaround known; the message is diagnostic only and nothing observable fails.
This is a pre-release target platform (2026-09 RC1), not a final release build.
SWT bundle qualifier:
Two further messages appear in the same runs. They are noted here only so they are
not mistaken for part of this issue:
(SWT:1664323): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -1 and height -1— a separate SWT/GTK issue, not reported here.pci id for fd 232: 10de:2e12, driver (null)— Mesa probing DRM file descriptors
for an NVIDIA device it has no driver mapping for. Not SWT.
- Lingua principale
- Java
- Stelle
- 202
- Fork
- 206
- Merge medio
- 14h 7m
- PR unite (30g)
- 103
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-platform/eclipse.platform.swt
-
`SWT_AWT.initFrame` takes `(long, String)` in Java; the GTK native declares no `className` and the Cocoa native types it `const char *`Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
eclipse-platform/eclipse.platform.swt#3665 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 75/100
eclipse-platform/eclipse.platform.swt#3336 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
eclipse-platform/eclipse.platform.swt#3718 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-platform/eclipse.platform.swt
Issue simili
-
[BUG] 增量 SSE 解析器未识别单独 CR 换行,导致事件无法及时交付Forse già presa @king-wwwhhh l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
langchain4j/langchain4j#6669 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenAPITools/openapi-generator#25237 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-area-label
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
quelea-projection/Quelea#711 ·
-
bug pdd
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 67/100
objectionary/eo#9450 ·
I maintainer di solito rispondono entro 1 giorno