[Bug] Crash on connect - invalid VTE signal "size-changed" #17

Closed
opened 2026-09-07 16:02:48 +00:00 by x3 · 0 comments
Owner

Bug: App crashes with a segfault when connecting to any SSH server.

Log output:

[18:00:00] [INFO] connect_to_server: homead@10.10.0.83:22 (key=none, saved_pw=yes)
(x3-ssh:204670): GLib-GObject-CRITICAL **: 18:00:00.012: ../glib-2.88.2/gobject/gsignal.c:2572: signal 'size-changed' is invalid for instance '0x55e254faeb10' of type 'VteTerminal'
[18:00:00] [INFO] Connecting to 10.10.0.83:22 as homead ...
Speicherzugriffsfehler     x3-ssh

Root cause: g_signal_connect(terminal_, "size-changed", ...) uses a signal that does not exist in VTE 2.91. This causes a GLib critical warning followed by a segfault when the IO thread attempts to use the terminal.

Fix: Replaced the VTE size-changed signal with GTK's size-allocate signal on the terminal widget:

// Before (broken):
g_signal_connect(terminal_, "size-changed", G_CALLBACK(on_size_changed), this);

// After (fixed):
g_signal_connect(terminal_, "size-allocate", G_CALLBACK(on_size_changed), this);

The callback was also updated to extract columns/rows from the terminal using vte_terminal_get_column_count() / vte_terminal_get_row_count() instead of receiving them as signal parameters.

Status: Fixed in commit d857260

**Bug:** App crashes with a segfault when connecting to any SSH server. **Log output:** ``` [18:00:00] [INFO] connect_to_server: homead@10.10.0.83:22 (key=none, saved_pw=yes) (x3-ssh:204670): GLib-GObject-CRITICAL **: 18:00:00.012: ../glib-2.88.2/gobject/gsignal.c:2572: signal 'size-changed' is invalid for instance '0x55e254faeb10' of type 'VteTerminal' [18:00:00] [INFO] Connecting to 10.10.0.83:22 as homead ... Speicherzugriffsfehler x3-ssh ``` **Root cause:** `g_signal_connect(terminal_, "size-changed", ...)` uses a signal that does not exist in VTE 2.91. This causes a GLib critical warning followed by a segfault when the IO thread attempts to use the terminal. **Fix:** Replaced the VTE `size-changed` signal with GTK's `size-allocate` signal on the terminal widget: ```cpp // Before (broken): g_signal_connect(terminal_, "size-changed", G_CALLBACK(on_size_changed), this); // After (fixed): g_signal_connect(terminal_, "size-allocate", G_CALLBACK(on_size_changed), this); ``` The callback was also updated to extract columns/rows from the terminal using `vte_terminal_get_column_count()` / `vte_terminal_get_row_count()` instead of receiving them as signal parameters. **Status:** Fixed in commit d857260
x3 closed this issue 2026-09-07 16:58:14 +00:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: x3/x3-ssh#17