Describe the bug
When copying ansi to clipboard, using copy_ansi_to_clipboard action, it segfaults.
I narrowed down to my starship prompt. it also happens in Ctrl+Shift+F6 menu
Steps to reproduce
- Make sure you have
copy_ansi_to_clipboard action bound to some shortcut (it's kitty_mod+alt+c in my case)
- press Ctrl+Shift+F6
- select everything in the terminal and use
copy_ansi_to_clipboard action
- ❌ See kitty crashing, if you have opened it from another terminal, you will see segmentation fault
Environment details
Environment details
kitty 0.42.1 created by Kovid Goyal
Linux wroclaw-main 6.14.8 #1-NixOS SMP PREEMPT_DYNAMIC Thu May 22 12:31:58 UTC 2025 x86_64
<<< Welcome to NixOS 25.05.git.55d1f923c480 (x86_64) - /dev/tty >>>
Run 'nixos-help' for the NixOS manual.
DISTRIB_CODENAME=warbler
DISTRIB_DESCRIPTION="NixOS 25.05 (Warbler)"
DISTRIB_ID=nixos
DISTRIB_RELEASE="25.05"
LSB_VERSION="25.05 (Warbler)"
Running under: Wayland (cosmic-comp 0.1.0 (git commit unknown)) missing: blur preferred_scale icon bell window-tag
OpenGL: '3.1.0 NVIDIA 575.51.02' Detected version: 3.1
Frozen: False
Fonts:
medium: DejaVuSansMono: /nix/store/46g6p6698lc50ypik6mgg0wf3q23gzqz-dejavu-fonts-2.37/share/fonts/truetype/DejaVuSansMono.ttf:0
Features: ()
bold: DejaVuSansMono-Bold: /nix/store/46g6p6698lc50ypik6mgg0wf3q23gzqz-dejavu-fonts-2.37/share/fonts/truetype/DejaVuSansMono-Bold.ttf:0
Features: ()
italic: DejaVuSansMono-Oblique: /nix/store/46g6p6698lc50ypik6mgg0wf3q23gzqz-dejavu-fonts-2.37/share/fonts/truetype/DejaVuSansMono-Oblique.ttf:0
Features: ()
bi: DejaVuSansMono-BoldOblique: /nix/store/46g6p6698lc50ypik6mgg0wf3q23gzqz-dejavu-fonts-2.37/share/fonts/truetype/DejaVuSansMono-BoldOblique.ttf:0
Features: ()
Paths:
kitty: /nix/store/i0wdql2s1qp0gs627645xhzkhvhq5sbs-kitty-0-unstable-2025-05-26/bin/kitty
base dir: /nix/store/i0wdql2s1qp0gs627645xhzkhvhq5sbs-kitty-0-unstable-2025-05-26/lib/kitty
extensions dir: /nix/store/i0wdql2s1qp0gs627645xhzkhvhq5sbs-kitty-0-unstable-2025-05-26/lib/kitty/kitty
system shell: /run/current-system/sw/bin/bash
System color scheme: dark. Applied color theme type: none
Loaded config files:
/etc/xdg/kitty/kitty.conf
/dev/stdin
Config options different from defaults:
Added shortcuts:
kitty_mod+alt+c → copy_ansi_to_clipboard
Important environment variables seen by the kitty process:
PATH /run/wrappers/bin:/home/wroclaw/.nix-profile/bin:/nix/profile/bin:/home/wroclaw/.local/state/nix/profile/bin:/etc/profiles/per-user/wroclaw/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/nix/store/n8sayk27r4dishnkw79l57f7hiskr47p-kitty-0.42.0/bin:/nix/store/z4jnh4k7lmydfp6zcin84qy2j2v4w19i-imagemagick-7.1.1-47/bin:/nix/store/myw381bc9yqd709hpray9lp7l98qmlm1-ncurses-6.5-dev/bin:/nix/store/i0wdql2s1qp0gs627645xhzkhvhq5sbs-kitty-0-unstable-2025-05-26/bin:/nix/store/z4jnh4k7lmydfp6zcin84qy2j2v4w19i-imagemagick-7.1.1-47/bin:/nix/store/myw381bc9yqd709hpray9lp7l98qmlm1-ncurses-6.5-dev/bin
LANG en_US.UTF-8
VISUAL /run/current-system/sw/bin/nvim
EDITOR /run/current-system/sw/bin/nvim
SHELL /run/current-system/sw/bin/bash
DISPLAY :1
WAYLAND_DISPLAY wayland-1
USER wroclaw
XCURSOR_SIZE 16
XDG_CONFIG_DIRS /etc/xdg:/home/wroclaw/.nix-profile/etc/xdg:/nix/profile/etc/xdg:/home/wroclaw/.local/state/nix/profile/etc/xdg:/etc/profiles/per-user/wroclaw/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg
LC_ADDRESS pl_PL.UTF-8
LC_NAME pl_PL.UTF-8
LC_MONETARY pl_PL.UTF-8
XDG_SEAT seat0
XDG_SESSION_DESKTOP COSMIC
XDG_SESSION_TYPE wayland
LC_PAPER pl_PL.UTF-8
XDG_CURRENT_DESKTOP COSMIC
LC_IDENTIFICATION pl_PL.UTF-8
LC_TELEPHONE pl_PL.UTF-8
LC_MEASUREMENT pl_PL.UTF-8
XDG_VTNR 1
XDG_SESSION_ID 155
XDG_RUNTIME_DIR /run/user/1000
LC_TIME pl_PL.UTF-8
XDG_DATA_DIRS /nix/store/a5zd01pr0fzjr7vm9pmrp2ha6as0assn-desktops/share:/home/wroclaw/.nix-profile/share:/nix/profile/share:/home/wroclaw/.local/state/nix/profile/share:/etc/profiles/per-user/wroclaw/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share:/nix/store/raycwkg0i9yc6ppqp2p5ykm8a33q27xi-cosmic-panel-1.0.0-alpha.7-unstable-2025-05-19/share:/nix/store/kjppk18qxq625rnliizqvhypv3z9q2m6-cosmic-settings-1.0.0-alpha.7-unstable-2025-05-23/share:/nix/store/3qyys4nfgy87cmdg7giz3w4wgnf06b77-cosmic-icons-1.0.0-alpha.7-unstable-2025-03-21/share:/nix/store/azlfi60h0pc7rd0nm38kwvl1ja3wbgcb-cosmic-applets-1.0.0-alpha.7-unstable-2025-05-23/share:/nix/store/kjppk18qxq625rnliizqvhypv3z9q2m6-cosmic-settings-1.0.0-alpha.7-unstable-2025-05-23/share:/nix/store/3qyys4nfgy87cmdg7giz3w4wgnf06b77-cosmic-icons-1.0.0-alpha.7-unstable-2025-03-21/share
LC_NUMERIC pl_PL.UTF-8
Additional context
kitty revision: 22b52bb
Describe the bug
When copying ansi to clipboard, using
copy_ansi_to_clipboardaction, it segfaults.I narrowed down to my
starshipprompt. it also happens inCtrl+Shift+F6menuSteps to reproduce
copy_ansi_to_clipboardaction bound to some shortcut (it'skitty_mod+alt+cin my case)copy_ansi_to_clipboardactionEnvironment details
Environment details
Additional context
kitty revision: 22b52bb