#14886

Ghostty crashes on image preview with `rmpc` inside `tmux` (kitty graphics)

Openjcollieopened 3d ago

Discussed in https://github.com/ghostty-org/ghostty/discussions/11944

Originally posted by babymastodon March 28, 2026

Issue Description

When running rmpc from within tmux, ghostty crashes with the same symptoms as #4266. Opening new issue per suggestion of @jcollie

Gdk: Error flushing display: Resource temporarily unavailable

It does not crash when running rmpc without tmux. Note, based on the discussion in #4266, it seems like the issue has been mostly fixed for rendering images with yazi, and I can confirm no crashes occur with yazi+tmux after rebuilding and running ghostty off of master (as of today). Also, rendering an image directly with kitten (kitten icat ...) does not trigger crash.

However, the crash is still 100% reproducible when running rmpc at full screen in tmux. Is it possible that rmpc does more frequent redraws than yazi, and this is triggering something to overflow and crash.

I did a bit of experimentation, and I believe that the issue is correlated with the size of the image. When I shrink the terminal window to 1/4 the size (presumably 1/4 the image data rate), the crash no longer takes place. But it crashes immediately once the terminal window is maximized to full screen. I've attached a video showing the crash taking place in ghostty, but the same tmux session working in kitty

https://github.com/user-attachments/assets/5dfd0cfc-a7d3-4470-945d-6f12acba3a68

Expected Behavior

Ghostty should not crash, and ideally show the album art. Kitty works in this situation.

Actual Behavior

Crash with info(glib): MESSAGE: Gdk: Error flushing display: Resource temporarily unavailable

Reproduction Steps

  1. Install mpd and rmpc (v0.11.0) - cargo install rmpc, dnf install mpd
  2. Install tmux (currently using tmux 3.5a)
  3. Start ghostty
  4. Run rmpc - confirm album art loads. Exit
  5. Run tmux (with empty config)
  6. Run rmpc inside the tmux pane, confirm crash

https://github.com/user-attachments/assets/998491e1-51e5-44e3-bca8-35c6da8235e0

Ghostty Logs

babymastodon@thinkpad:~/code/ghostty ( main)$ /home/babymastodon/code/ghostty/zig-out/bin/ghostty
info: ghostty version=1.3.2-main+baad0aa66
info: ghostty build optimize=ReleaseFast
info: runtime=.gtk
info: font_backend=.fontconfig_freetype
info: dependency harfbuzz=11.0.0
info: dependency fontconfig=21402
info: renderer=renderer.generic.Renderer(renderer.OpenGL)
info: libxev default backend=io_uring
info(os_locale): setlocale from env result=en_US.UTF-8
info(gtk): GTK version build=4.20.3 runtime=4.20.3
info(gtk): libadwaita version build=1.8.3 runtime=1.8.3
info: reading configuration file path=/home/babymastodon/.config/ghostty/config
info(config): default shell source=env value=/bin/bash
warning(gtk_ghostty_application): setting GDK_DEBUG=
warning(gtk_ghostty_application): setting GDK_DISABLE=gles-api,vulkan
info(config): default shell source=env value=/bin/bash
info(opengl): loaded OpenGL 4.6
info(io_exec): found Ghostty resources dir: /home/babymastodon/code/ghostty/zig-out/share/ghostty
info(io_exec): shell integration automatically injected shell=.bash
warning(gtk_ghostty_application): unimplemented action=.cell_size
info(io_exec): started subcommand path=/bin/sh pid=267092
warning(stream): unimplemented mode: 7727
warning(stream): unimplemented mode: 7727
warning(stream): unimplemented mode: 7727
warning(kitty_gfx): failed to read decompressed data: error.InvalidCode
warning(kitty_gfx): erroneous kitty graphics response: EINVAL: decompression failed
info(page_list): adjusting page capacity=.{ .cols = 130, .rows = 356, .styles = 128, .hyperlink_bytes = 192, .grapheme_bytes = 16384, .string_bytes = 2048 }
info(page_list): adjusting page capacity=.{ .cols = 130, .rows = 356, .styles = 128, .hyperlink_bytes = 192, .grapheme_bytes = 32768, .string_bytes = 2048 }
info(glib): MESSAGE: Gdk: Error flushing display: Resource temporarily unavailable


Note, the `warning(kitty_gfx)` warnings do not always show up in the crash logs, so it's unclear if they are related

Ghostty Version

Ghostty 1.3.2-main+baad0aa66

Version
  - version: 1.3.2-main+baad0aa66
  - channel: tip
Build Config
  - Zig version   : 0.15.2
  - build mode    : .ReleaseFast
  - app runtime   : .gtk
  - font engine   : .fontconfig_freetype
  - renderer      : renderer.generic.Renderer(renderer.OpenGL)
  - libxev        : io_uring
  - kernel version: 6.18.5-200.fc43.x86_64
  - desktop env   : gnome
  - GTK version   :
    build         : 4.20.3
    runtime       : 4.20.3
  - libadwaita    : enabled
    build         : 1.8.3
    runtime       : 1.8.3
  - libX11        : enabled
  - libwayland    : enabled

OS Version Information

Fedora 43, linux 6.18.5-200.fc43.x86_64

(Linux only) Display Server

Wayland

(Linux only) Desktop Environment/Window Manager

Gnome 49.2

Minimal Ghostty Configuration

Able to reproduce with empty ghostty config (though the above video has some themes applied)

Additional Relevant Configuration

Able to reproduce with empty tmux.conf (though the above video has some themes applied)

RMPC config provided below. Note the crash can be prevented by setting max_size_px to 120 (instead of 1200)

#![enable(implicit_some)]
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
    address: "127.0.0.1:6600",
    password: None,
    theme: None,
    cache_dir: None,
    on_song_change: None,
    volume_step: 5,
    max_fps: 30,
    scrolloff: 0,
    wrap_navigation: false,
    enable_mouse: true,
    enable_config_hot_reload: true,
    status_update_interval_ms: 1000,
    rewind_to_start_sec: None,
    reflect_changes_to_playlist: false,
    select_current_song_on_change: false,
    browser_song_sort: [Disc, Track, Artist, Title],
    directories_sort: SortFormat(group_by_type: true, reverse: false),
    album_art: (
        method: Auto,
        max_size_px: (width: 1200, height: 1200),
        disabled_protocols: ["http://", "https://"],
        vertical_align: Center,
        horizontal_align: Center,
    ),
    keybinds: (
        global: {
            ":":       CommandMode,
            ",":       VolumeDown,
            "s":       Stop,
            ".":       VolumeUp,
            "<Tab>":   NextTab,
            "<S-Tab>": PreviousTab,
            "1":       SwitchToTab("Queue"),
            "2":       SwitchToTab("Directories"),
            "3":       SwitchToTab("Albums"),
            "4":       SwitchToTab("Playlists"),
            "q":       Quit,
            ">":       NextTrack,
            "p":       TogglePause,
            "<":       PreviousTrack,
            "f":       SeekForward,
            "z":       ToggleRepeat,
            "x":       ToggleRandom,
            "c":       ToggleConsume,
            "v":       ToggleSingle,
            "b":       SeekBack,
            "~":       ShowHelp,
            "?":       ShowHelp,
            "u":       Update,
            "U":       Rescan,
            "I":       ShowCurrentSongInfo,
            "O":       ShowOutputs,
            "P":       ShowDecoders,
            "R":       AddRandom,
        },
        navigation: {
            "k":         Up,
            "j":         Down,
            "h":         Left,
            "l":         Right,
            "<Up>":      Up,
            "<Down>":    Down,
            "<Left>":    Left,
            "<Right>":   Right,
            "<C-k>":     PaneUp,
            "<C-j>":     PaneDown,
            "<C-h>":     PaneLeft,
            "<C-l>":     PaneRight,
            "<C-u>":     UpHalf,
            "N":         PreviousResult,
            "a":         Add,
            "A":         AddAll,
            "r":         Rename,
            "n":         NextResult,
            "g":         Top,
            "<Space>":   Select,
            "<C-Space>": InvertSelection,
            "G":         Bottom,
            "<CR>":      Confirm,
            "i":         FocusInput,
            "J":         MoveDown,
            "<C-d>":     DownHalf,
            "/":         EnterSearch,
            "<C-c>":     Close,
            "<Esc>":     Close,
            "K":         MoveUp,
            "D":         Delete,
            "B":         ShowInfo,
        },
        queue: {
            "D":       DeleteAll,
            "<CR>":    Play,
            "<C-s>":   Save,
            "a":       AddToPlaylist,
            "d":       Delete,
            "C":       JumpToCurrent,
            "X":       Shuffle,
        },
    ),
    search: (
        case_sensitive: false,
        mode: Contains,
        tags: [
            (value: "any",         label: "Any Tag"),
            (value: "artist",      label: "Artist"),
            (value: "album",       label: "Album"),
            (value: "albumartist", label: "Album Artist"),
            (value: "title",       label: "Title"),
            (value: "filename",    label: "Filename"),
            (value: "genre",       label: "Genre"),
        ],
    ),
    artists: (
        album_display_mode: SplitByDate,
        album_sort_by: Date,
    ),
    tabs: [
        (
            name: "Queue",
            pane: Split(
                direction: Horizontal,
                panes: [(size: "40%", pane: Pane(AlbumArt)), (size: "60%", pane: Pane(Queue))],
            ),
        ),
        (
            name: "Directories",
            pane: Pane(Directories),
        ),
        (
            name: "Albums",
            pane: Pane(Albums),
        ),
        (
            name: "Playlists",
            pane: Pane(Playlists),
        ),
    ],
)

I acknowledge that:

  • I have reviewed the FAQ and confirm that my issue is NOT among them.
  • I have searched the Ghostty repository (both open and closed Discussions and Issues) and confirm this is not a duplicate of an existing issue or discussion.
  • I have checked the "Preview" tab on all text fields to ensure that everything looks right, and have wrapped all configuration and code in code blocks with a group of three backticks (```) on separate lines.

Activity

0

No activity yet.