wails/v2/internal/frontend/desktop/linux
Lea Anthony 7ee2b2d856
fix(v2/linux): fix crash on panic in JS-bound Go methods (#4855)
* fix(v2/linux): fix crash on panic in JS-bound Go methods

WebKit2GTK installs signal handlers after gtk_main() starts, overriding
our SA_ONSTACK fix. This causes Go panics (e.g., nil pointer dereference)
in JS-bound methods to crash with 'non-Go code set up signal handler
without SA_ONSTACK flag'.

Fix by deferring signal handler installation via g_idle_add() to run
after GTK main loop starts, ensuring we fix handlers AFTER WebKit
has installed its own.

Fixes #3965

* docs: add changelog entry for Linux signal handler fix

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 12:38:58 +11:00
..
browser.go [V2] add url validation for BrowserOpenURL (#4484) 2025-08-12 20:12:10 +10:00
calloc.go Releasetest/release workflow (#1869) 2022-09-18 08:55:21 +10:00
clipboard.go allow builds for webkit2gtk-4.1 (#3465) 2024-05-08 19:26:27 -05:00
dialog.go Support message dialog 2022-01-25 16:27:39 -06:00
frontend.go fix(v2/linux): fix crash on panic in JS-bound Go methods (#4855) 2026-01-25 12:38:58 +11:00
gtk.go allow builds for webkit2gtk-4.1 (#3465) 2024-05-08 19:26:27 -05:00
invoke.go [v2, linux] Improve switching to main thread for callbacks (#1392) 2022-05-31 20:28:37 +10:00
keys.go allow builds for webkit2gtk-4.1 (#3465) 2024-05-08 19:26:27 -05:00
menu.go fix panic when adding menuroles on linux (#4558) 2025-10-03 09:50:40 +10:00
screen.go allow builds for webkit2gtk-4.1 (#3465) 2024-05-08 19:26:27 -05:00
single_instance.go v2 [#3133] SingleInstanceData: Fill missing WD as is (#3154) 2024-01-04 05:26:24 +11:00
webkit2.go allow builds for webkit2gtk-4.1 (#3465) 2024-05-08 19:26:27 -05:00
window.c [V2] Add origin verification for bindings (#4480) 2025-08-13 08:50:23 +10:00
window.go Fix Drag & Drop JS runtime (#3516) 2024-06-10 15:15:28 +10:00
window.h Fix Drag & Drop JS runtime (#3516) 2024-06-10 15:15:28 +10:00