kovidgoyal / kitty

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

Segmentation fault when running kitty +list-fonts in Kitty 0.36.3 #7892

Closed infogrind closed 2 weeks ago

infogrind commented 2 weeks ago

Describe the bug After updating Kitty to 0.36.3, when running kitty +list-fonts, the screen clears and at the top "Scanning system for fonts, please wait..." is shown. But then I am immediately back to the prompt, with a "Segmentation fault" message.

❯ kitty +list-fonts
Error: signal: segmentation fault

To Reproduce Steps to reproduce the behavior:

  1. Install Kitty 0.36.3
  2. Run kitty +list-fonts

Screenshots If applicable, add screenshots to help explain your problem.

Environment details

kitty 0.36.3 (44039baa39) created by Kovid Goyal
Darwin absalom.local 20.6.0 Darwin Kernel Version 20.6.0: Thu Jul  6 22:12:47 PDT 2023; root:xnu-7195.141.49.702.12~1/RELEASE_X86_64 x86_64
ProductName:    macOS ProductVersion:   11.7.10 BuildVersion:   20G1427
OpenGL: '4.1 INTEL-16.5.14' Detected version: 4.1
Frozen: True
Fonts:
  medium: MonaspaceNeonVar-Bold: /Users/******/Library/Fonts/MonaspaceNeonVarVF[wght,wdth,slnt].ttf
          Features: ('ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08', 'calt')
    bold: MonaspaceNeonVar-Bold: /Users/******/Library/Fonts/MonaspaceNeonVarVF[wght,wdth,slnt].ttf
          Features: ('ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08', 'calt')
  italic: MonaspaceRadonVar-Italic: /Users/******/Library/Fonts/MonaspaceRadonVarVF[wght,wdth,slnt].ttf
          Features: ('ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08', 'calt')
      bi: MonaspaceRadonVar-BoldItalic: /Users/******/Library/Fonts/MonaspaceRadonVarVF[wght,wdth,slnt].ttf
          Features: ('ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08', 'calt')
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /usr/local/bin/fish
Loaded config files:
  /Users/*****/.config/kitty/kitty.conf

Config options different from defaults:
allow_remote_control          yes
bold_font                     Monaspace Neon Var Bold
bold_italic_font              Monaspace Radon Var Bold Italic
enabled_layouts               ['fat', 'tall', 'grid', 'stack', 'horizontal', 'vertical']
font_family                   Monaspace Neon Var
font_features:
{'MonaspaceNeonVar-Bold': ('ss01',
                           'ss02',
                           'ss03',
                           'ss04',
                           'ss05',
                           'ss06',
                           'ss07',
                           'ss08',
                           'calt'),
 'MonaspaceNeonVar-Regular': ('ss01',
                              'ss02',
                              'ss03',
                              'ss04',
                              'ss05',
                              'ss06',
                              'ss07',
                              'ss08',
                              'calt'),
 'MonaspaceRadonVar-BoldItalic': ('ss01',
                                  'ss02',
                                  'ss03',
                                  'ss04',
                                  'ss05',
                                  'ss06',
                                  'ss07',
                                  'ss08',
                                  'calt'),
 'MonaspaceRadonVar-Italic': ('ss01',
                              'ss02',
                              'ss03',
                              'ss04',
                              'ss05',
                              'ss06',
                              'ss07',
                              'ss08',
                              'calt')}
font_size                     13.0
italic_font                   Monaspace Radon Var Italic
modify_font:
    baseline -3
scrollback_pager              ['nvim', '-c', 'silent write! /tmp/kitty_scrollback_buffer | te cat /tmp/kitty_scrollback_buffer - ']
scrollback_pager_history_size 5242880
selection_background          None
selection_foreground          None
symbol_map:
    U+e348 - U+e348 → JetBrainsMono Nerd Font Mono
tab_bar_style                 powerline
url_excluded_characters       ">"
window_border_width           (1.0, 'pt')
window_margin_width           FloatEdges(left=2.5, top=2.5, right=2.5, bottom=2.5)
window_padding_width          FloatEdges(left=5.0, top=5.0, right=5.0, bottom=5.0)
Added shortcuts:
    ctrl+opt+z →  toggle_layout stack
    ctrl+p →  nth_window -1
    shift+cmd+down →  resize_window shorter
    shift+cmd+left →  resize_window narrower
    shift+cmd+right →  resize_window wider
    shift+cmd+up →  resize_window taller
    shift+opt+cmd+h →  resize_window reset
Changed shortcuts:
    cmd+enter →  new_window_with_cwd
    cmd+k →  clear_terminal_and_scrollback
    ctrl+cmd+, →  reload_config
    kitty_mod+enter →  new_window_with_cwd
    opt+cmd+r →  reset_terminal
    shift+cmd+/ →  open_kitty_website
    shift+cmd+[ →  previous_window
    shift+cmd+] →  next_window
Colors:
    background                    #0d0f18   
    color0                        #222222   
    color1                        #ff000f   
    color10                       #abe05a   
    color11                       #ffd141   
    color12                       #0092ff   
    color13                       #9a5feb   
    color14                       #67ffef   
    color2                        #8ce00a   
    color3                        #ffb900   
    color4                        #008df8   
    color5                        #6c43a5   
    color6                        #00d7eb   
    color7                        #ffffff   
    color8                        #444444   
    color9                        #ff273f   
    cursor                        #ff0017   
    foreground                    #fffaf3   

Important environment variables seen by the kitty process:
    PATH                                /Applications/kitty.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin
    LANG                                en_US.UTF-8
    SHELL                               /usr/local/bin/fish
    DISPLAY                             /private/tmp/com.apple.launchd.LqD64efZ0f/org.macosforge.xquartz:0
    USER                                *******

Additional context Try to reproduce the problem with kitty --config NONE if you cannot then post a minimal kitty.conf that reproduces the problem. If the problem involves interaction with some other terminal program post a minimal config for that program to reproduce the problem as well.

The problem still occurs with kitty --config NONE.

kovidgoyal commented 2 weeks ago

Note that the fix is speculative as I cannot reproduce it on my Apple silicon mac even running with arch -x86_64 and I dont have any intel macs to test on, so please try the next kitty nightly build.

rudylee commented 1 week ago

I can confirm the latest nightly build doesn't have the segmentation fault issue. Thanks for quick fix.

infogrind commented 1 week ago

Thanks a lot Kovid for the speedy fix 👏