Skip to content

test(linux): run the file dialog test without GL - #2664

Merged
houko merged 1 commit into
nsgo-dev:mainfrom
Laotree:test/gtk-file-dialog-without-gl
Nov 28, 2026
Merged

houko merged 1 commit into
nsgo-dev:mainfrom
Laotree:test/gtk-file-dialog-without-gl

Conversation

@Laotree

@Laotree Laotree commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Summary

test-suite (core) crashes intermittently in TestFileDialogsReachGTK, and while it does the required check stays red for every pull request that draws the crash. Four runs failed this way today, on three branches:

run created branch host
12:16 #2592 depot-gd829tdlqd
13:26 #2596 depot-p23r06ct0q
13:34 fix-ios-full-rate-slides depot-mqkh1pqgwc
13:54 fix-ios-full-rate-slides depot-1p8t7kxk39

Every one of them has the same signature: libEGL warning: DRI3 error: Could not get DRI3 device, then SIGSEGV during cgo, with the stack at (*window).run → gMainContextIteration (internal/platform/linux/linux.go:800). The crash is inside GTK's main loop, not in this repository's Go code, and the runs on other hosts that day pass without the DRI3 warning.

The test already starts a process of its own to keep GTK away from the desktop's portal, through GDK_DEBUG=no-portals. That process now passes gl-disable as well, so GDK opens no GL context and never reaches EGL on a host without DRI3. A file dialog needs no GL context.

Targets

  • Linux

Screenshots

None.

Verification

  • gofmt -l internal/platform/linux/system_native_test.go — no output.
  • go tool nsgo check — exit 0, all targets vetted.
  • GTK 4.14, the version Ubuntu 24.04 installs for test.yml, accepts gl-disable in its GDK_DEBUG flag list (gdk/gdk.c).
  • The crash needs a Linux host whose EGL has no DRI3 device, and this machine runs macOS, so the test itself cannot run here. test.yml runs it on every pull request; the check is whether test-suite (core) stays green over the next runs.

Risk

Newer GDK versions drop gl-disable for GDK_DISABLE=gl and warn about the unknown value, so this targets the version test.yml runs. If GTK ignores the flag, the change is a no-op and the crash stays. The test drives the same dialogs either way; only GDK's GL path changes.

Checklist

  • The title is a Conventional Commit, such as fix(linux): keep the caret after a paste; a squash merge uses it as the commit subject.
  • Docs whose facts change are updated. None change.
  • No new third-party code, assets or dependencies.

🤖 Generated with Claude Code

The file dialog test takes SIGSEGV inside GTK's main loop on a host
whose EGL has no DRI3 device: libEGL warns, then the process dies in
gMainContextIteration. The test's own process now passes gl-disable to
GDK, so GTK opens no GL context for a dialog that needs none.
@houko
houko merged commit 76e8d97 into nsgo-dev:main Nov 28, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants