kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.49k stars 979 forks source link

kitty crashes when trying to use Hack Nerd Font. #7843

Closed ingenarel closed 1 month ago

ingenarel commented 1 month ago

Describe the bug kitty says Segmentation fault (core dumped) everytime i try to use hack nerd font.

To Reproduce There are two ways that we can reproduce this: way 1:

  1. set Hack Nerd Font or it's variations in the config
  2. Segmentation fault (core dumped)

way 2:

  1. use the command kitten choose-fonts
  2. go to hack nerd font.
  3. the font chooser crashes instantly saying Segmentation fault (core dumped)

Environment details

kitty 0.36.2 created by Kovid Goyal
Linux ARCH 6.10.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 09 Sep 2024 02:38:45 +0000 x86_64
Arch Linux 6.10.9-arch1-1 (/dev/tty)

Running under: Wayland (Hyprland v0.43.0,) missing: single_pixel_buffer
OpenGL: '4.6 (Core Profile) Mesa 24.2.2-arch1.1' Detected version: 4.6
Frozen: False
Fonts:
  medium: NotoSansMono-Regular: /usr/share/fonts/noto/NotoSansMono-Regular.ttf:0
          Features: ()
    bold: NotoSansMono-Bold: /usr/share/fonts/noto/NotoSansMono-Bold.ttf:0
          Features: ()
  italic: NotoSansMono-Regular: /usr/share/fonts/noto/NotoSansMono-Regular.ttf:0
          Features: ()
      bi: NotoSansMono-Bold: /usr/share/fonts/noto/NotoSansMono-Bold.ttf:0
          Features: ()
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/bash
Loaded config files:
  /home/ingenarel/.config/kitty/kitty.conf

Config options different from defaults:
allow_remote_control yes
background_opacity   0.8
enable_audio_bell    False
font_size            8.0

Important environment variables seen by the kitty process:
    PATH                                /home/ingenarel/.cargo/bin:/home/ingenarel/.local/share/pnpm:/home/ingenarel/.local/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin
    LANG                                en_US.UTF-8
    EDITOR                              nvim
    SHELL                               /usr/bin/bash
    DISPLAY                             :0
    WAYLAND_DISPLAY                     wayland-1
    USER                                ingenarel
    XCURSOR_SIZE                        24
    XDG_BACKEND                         wayland
    XDG_SEAT                            seat0
    XDG_SESSION_DESKTOP                 hyprland
    XDG_SESSION_TYPE                    wayland
    XDG_CURRENT_DESKTOP                 
    XDG_SESSION_CLASS                   user
    XDG_VTNR                            2
    XDG_SESSION_ID                      5
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_DATA_DIRS                       /var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/

Additional context this happens with the minimal config too, when trying to set the font using kitten choose-fonts

kovidgoyal commented 1 month ago

That's not kitty crashing, that's the choose fonts kitten crashing. Doesn't reproduce for me. Post a link to the exact font you used.

And generally speaking, dont use NERD patched fonts in kitty there is no need for it, NERD symbols are builtin. And patching destroys fonts in various ways. https://sw.kovidgoyal.net/kitty/faq/

If you can generate a backtrace for the crash please attach it and I will investigate further, but without that or a reproducer there is not much I can do.