From 6cd684d5d3b2a83c9966b6c5ba239d36fbd937a9 Mon Sep 17 00:00:00 2001 From: Daniel Kinzler Date: Fri, 28 Aug 2026 14:25:33 +0200 Subject: [PATCH 1/4] gtk: fix stale pointers to property bindings Previously, the property binding created in `Surface.bindIsSplit` would get freed automatically when the source object (the SplitTree widget) got finalized. A subsequent call to `bindIsSplit` could then cause a crash by using the stale pointer to the binding. This bug could e.g. be triggered by dragging the surface from a single-surface tab to another tab. We now create an extra reference to the binding object so that Surface essentially owns the binding and is responsible for freeing it. Updated the binding in `SurfaceScrolledWindow` to use the same pattern. That one was probably fine, because the binding is only created once, but let's be safe. --- src/apprt/gtk/class/surface.zig | 20 +++++++++++++++++-- .../gtk/class/surface_scrolled_window.zig | 12 ++++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/apprt/gtk/class/surface.zig b/src/apprt/gtk/class/surface.zig index e6cfe5c50..59d8ed0f7 100644 --- a/src/apprt/gtk/class/surface.zig +++ b/src/apprt/gtk/class/surface.zig @@ -853,14 +853,24 @@ pub const Surface = extern struct { pub fn bindIsSplit(self: *Self, tree: *SplitTree) void { const priv = self.private(); - if (priv.is_split_binding) |bind| bind.unbind(); + if (priv.is_split_binding) |binding| { + binding.unbind(); + binding.unref(); + priv.is_split_binding = null; + } - priv.is_split_binding = tree.as(gobject.Object).bindProperty( + const binding = tree.as(gobject.Object).bindProperty( "is-split", self.as(gobject.Object), "is-split", .{ .sync_create = true }, ); + // The ref created by bindProperty is owned by the binding itself. + // We need another ref to prevent the binding object from being + // freed if the source object (SplitTree) is finalized. Otherwise + // our pointer to the binding could become stale. + binding.ref(); + priv.is_split_binding = binding; } /// Callback used to determine whether unfocused-split-fill / unfocused-split-opacity @@ -1881,6 +1891,12 @@ pub const Surface = extern struct { priv.config = null; } + if (priv.is_split_binding) |binding| { + binding.unbind(); + binding.unref(); + priv.is_split_binding = null; + } + if (priv.vadj_signal_group) |group| { group.setTarget(null); group.as(gobject.Object).unref(); diff --git a/src/apprt/gtk/class/surface_scrolled_window.zig b/src/apprt/gtk/class/surface_scrolled_window.zig index 6ccb0a0d2..ad9a4cc7e 100644 --- a/src/apprt/gtk/class/surface_scrolled_window.zig +++ b/src/apprt/gtk/class/surface_scrolled_window.zig @@ -89,7 +89,8 @@ pub const SurfaceScrolledWindow = extern struct { const priv = self.private(); if (priv.config_binding) |binding| { - binding.as(gobject.Object).unref(); + binding.unbind(); + binding.unref(); priv.config_binding = null; } @@ -168,18 +169,23 @@ pub const SurfaceScrolledWindow = extern struct { // Unbind old config binding if it exists if (priv.config_binding) |binding| { - binding.as(gobject.Object).unref(); + binding.unbind(); + binding.unref(); priv.config_binding = null; } // Bind config from surface to our config property if (priv.surface) |surface| { - priv.config_binding = surface.as(gobject.Object).bindProperty( + const binding = surface.as(gobject.Object).bindProperty( properties.config.name, self.as(gobject.Object), properties.config.name, .{ .sync_create = true }, ); + // Keep another ref, otherwise the binding would be freed and + // our pointer become stale if the surface gets finalized. + binding.ref(); + priv.config_binding = binding; } } From caf48a41ee5c3861c786270d64bac950f2513012 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Sat, 29 Aug 2026 09:20:11 -0500 Subject: [PATCH 2/4] main: fix inverted allow_stack_tracing condition The Zig 0.16.0 update dropped the negation from the std default (!strip_debug_info), disabling stack traces in every unstripped build. AI disclosure: Claude Fable was used to diagnose the problem and find the fix. Commit message was written by me. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QfzQME46DQXwMWa43bQaa3 --- src/main_ghostty.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main_ghostty.zig b/src/main_ghostty.zig index 86e779899..f4fa74133 100644 --- a/src/main_ghostty.zig +++ b/src/main_ghostty.zig @@ -228,7 +228,7 @@ pub const std_options: std.Options = .{ .allow_stack_tracing = if (builtin.target.os.tag.isDarwin() and builtin.target.os.tag != .macos) false else - builtin.strip_debug_info, + !builtin.strip_debug_info, }; test { From 7b47213f94058c3715205ce8fa73f7ae581a652c Mon Sep 17 00:00:00 2001 From: "ghostty-vouch[bot]" <262049992+ghostty-vouch[bot]@users.noreply.github.com> Date: Sat, 29 Aug 2026 15:59:43 +0000 Subject: [PATCH 3/4] Update VOUCHED list (#14074) Triggered by [comment](https://github.com/ghostty-org/ghostty/issues/14072#issuecomment-5463405035) from @bo2themax. Vouch: @Svector-anu Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/VOUCHED.td | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/VOUCHED.td b/.github/VOUCHED.td index b6ff45196..423517a15 100644 --- a/.github/VOUCHED.td +++ b/.github/VOUCHED.td @@ -301,6 +301,7 @@ simonbcn slsrepo steven-tk sunshine-syz +svector-anu svmhdvn tacherasasi -tangivis From 094d175efa506f87c296fd8a51371c68eea191b9 Mon Sep 17 00:00:00 2001 From: mitchellh <1299+mitchellh@users.noreply.github.com> Date: Sun, 30 Aug 2026 00:22:34 +0000 Subject: [PATCH 4/4] deps: Update iTerm2 color schemes --- build.zig.zon | 4 ++-- build.zig.zon.json | 6 +++--- build.zig.zon.nix | 6 +++--- build.zig.zon.txt | 2 +- flatpak/zig-packages.json | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 96cda01a0..e30650519 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -125,8 +125,8 @@ .apple_sdk = .{ .path = "./pkg/apple-sdk" }, .android_ndk = .{ .path = "./pkg/android-ndk" }, .iterm2_themes = .{ - .url = "https://deps.files.ghostty.org/ghostty-themes-release-20260810-152212-0173c3c.tgz", - .hash = "N-V-__8AAPpcBAD4_75xLBbLiYqdojOwQP74eoWmpL3jPrBl", + .url = "https://deps.files.ghostty.org/ghostty-themes-release-20260824-153547-75c93ee.tgz", + .hash = "N-V-__8AAGZkBACH0haGC9R-hfNPYWxu16hr-ydEsolad9GV", .lazy = true, }, }, diff --git a/build.zig.zon.json b/build.zig.zon.json index 376ca05cb..e3d3b205a 100644 --- a/build.zig.zon.json +++ b/build.zig.zon.json @@ -59,10 +59,10 @@ "url": "https://deps.files.ghostty.org/N-V-__8AAEbOfQBnvcFcCX2W5z7tDaN8vaNZGamEQtNOe0UI.tar.gz", "hash": "sha256-yBbCDox18+Fa6Gc1DnmSVQLRpqhZOLsac7iSfl8x+cs=" }, - "N-V-__8AAPpcBAD4_75xLBbLiYqdojOwQP74eoWmpL3jPrBl": { + "N-V-__8AAGZkBACH0haGC9R-hfNPYWxu16hr-ydEsolad9GV": { "name": "iterm2_themes", - "url": "https://deps.files.ghostty.org/ghostty-themes-release-20260810-152212-0173c3c.tgz", - "hash": "sha256-6ph4RxQg7lsS5/L/SACZyVTqUOVzob34P0PhBcm+Y/A=" + "url": "https://deps.files.ghostty.org/ghostty-themes-release-20260824-153547-75c93ee.tgz", + "hash": "sha256-sf0fMQV/l8EnTbA8bORJYIN6GkH1InXLxkruLm40654=" }, "N-V-__8AAIC5lwAVPJJzxnCAahSvZTIlG-HhtOvnM1uh-66x": { "name": "jetbrains_mono", diff --git a/build.zig.zon.nix b/build.zig.zon.nix index e955d4dc4..58ce3fda6 100644 --- a/build.zig.zon.nix +++ b/build.zig.zon.nix @@ -206,11 +206,11 @@ in }; } { - name = "N-V-__8AAPpcBAD4_75xLBbLiYqdojOwQP74eoWmpL3jPrBl"; + name = "N-V-__8AAGZkBACH0haGC9R-hfNPYWxu16hr-ydEsolad9GV"; path = fetchZigArtifact { name = "iterm2_themes"; - url = "https://deps.files.ghostty.org/ghostty-themes-release-20260810-152212-0173c3c.tgz"; - hash = "sha256-6ph4RxQg7lsS5/L/SACZyVTqUOVzob34P0PhBcm+Y/A="; + url = "https://deps.files.ghostty.org/ghostty-themes-release-20260824-153547-75c93ee.tgz"; + hash = "sha256-sf0fMQV/l8EnTbA8bORJYIN6GkH1InXLxkruLm40654="; unpack = false; }; } diff --git a/build.zig.zon.txt b/build.zig.zon.txt index 82e00bd4b..77df51c0b 100644 --- a/build.zig.zon.txt +++ b/build.zig.zon.txt @@ -9,7 +9,7 @@ https://deps.files.ghostty.org/breakpad-b99f444ba5f6b98cac261cbb391d8766b34a5918 https://deps.files.ghostty.org/fontconfig-2.14.2.tar.gz https://deps.files.ghostty.org/freetype-1220b81f6ecfb3fd222f76cf9106fecfa6554ab07ec7fdc4124b9bb063ae2adf969d.tar.gz https://deps.files.ghostty.org/gettext-0.24.tar.gz -https://deps.files.ghostty.org/ghostty-themes-release-20260810-152212-0173c3c.tgz +https://deps.files.ghostty.org/ghostty-themes-release-20260824-153547-75c93ee.tgz https://deps.files.ghostty.org/glslang-12201278a1a05c0ce0b6eb6026c65cd3e9247aa041b1c260324bf29cee559dd23ba1.tar.gz https://deps.files.ghostty.org/gobject-2026-07-28-36-1.tar.zst https://deps.files.ghostty.org/gtk4-layer-shell-1.1.0.tar.gz diff --git a/flatpak/zig-packages.json b/flatpak/zig-packages.json index ad54aa752..4c9fb5cf8 100644 --- a/flatpak/zig-packages.json +++ b/flatpak/zig-packages.json @@ -73,9 +73,9 @@ }, { "type": "archive", - "url": "https://deps.files.ghostty.org/ghostty-themes-release-20260810-152212-0173c3c.tgz", - "dest": "vendor/p/N-V-__8AAPpcBAD4_75xLBbLiYqdojOwQP74eoWmpL3jPrBl", - "sha256": "ea9878471420ee5b12e7f2ff480099c954ea50e573a1bdf83f43e105c9be63f0" + "url": "https://deps.files.ghostty.org/ghostty-themes-release-20260824-153547-75c93ee.tgz", + "dest": "vendor/p/N-V-__8AAGZkBACH0haGC9R-hfNPYWxu16hr-ydEsolad9GV", + "sha256": "b1fd1f31057f97c1274db03c6ce44960837a1a41f52275cbc64aee2e6e34eb9e" }, { "type": "archive",