[GTK3] Gdk-CRITICAL from gdk_threads_set_lock_functions when a second Display is created in the same JVM
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Java
- スター
- 202
- フォーク
- 206
- 平均マージ
- 16時間 56分
- マージ済み PR(30日)
- 110
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-platform/eclipse.platform.swt のほかの issue
-
`SWT_AWT.initFrame` takes `(long, String)` in Java; the GTK native declares no `className` and the Cocoa native types it `const char *`対応中かも @GreenFuze が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
eclipse-platform/eclipse.platform.swt#3665 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 75/100
eclipse-platform/eclipse.platform.swt#3336 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
eclipse-platform/eclipse.platform.swt#3718 ·
メンテナーはふだん 1 日以内に返信
eclipse-platform/eclipse.platform.swt の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
refinedmods/refinedstorage2#1421 ·
-
StepExamBenchmarkTest runs a loop and prints a timing but asserts nothing対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンjules
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
open-learning-exchange/myplanet#18199 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Scheme-less stream URLs throw NullPointerException instead of URISyntaxException対応中かも @blihio が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
pedroSG94/RootEncoder#2218 ·
メンテナーはふだん 3 日以内に返信
-
[Bug] The producer summary calls a multi-group client a duplicate対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/rocketmq-dashboard#6872 ·
メンテナーはふだん 3 日以内に返信