kovidgoyal / kitty

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

kitty hangs on macOS with `kitty --config *` #6056

Closed craigmac closed 1 year ago

craigmac commented 1 year ago

Describe the bug Yeah, it's probably stupid that I did that, but there's no way I could recover from it and had to force quit kitty. Reporting in case there's a way to prevent someone from making this mistake on your end. I tried kitty --config at first and seeing it required an argument then tried kitty --config <Tab> and for whatever reason, it's Friday?, I tried kitty --config * and hit Enter, freezing kitty. I let it go for over two minutes before force quitting, C-c,

To Reproduce Steps to reproduce the behavior:

  1. kitty --config *
  2. Press enter

Screenshots

Screen Shot 2023-02-24 at 12 34 00 PM

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

Environment details

kitty 0.27.1 () created by Kovid Goyal
Darwin mbp 21.6.0 Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64 x86_64
ProductName:    macOS ProductVersion:   12.6.3 BuildVersion:    21G419
Frozen: True
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: /bin/zsh
Loaded config files:
  /Users/cmaceach/.config/kitty/kitty.conf

Config options different from defaults:
allow_remote_control               yes
bold_font                          Iosevka Fixed Bold
bold_italic_font                   Iosevka Fixed Bold Italic
copy_on_select                     clipboard
disable_ligatures                  2
enable_audio_bell                  False
enabled_layouts                    ['tall', 'fat', 'stack']
font_family                        Iosevka Fixed
font_size                          24.0
italic_font                        Iosevka Fixed Italic
listen_on                          unix:/tmp/mykitty
macos_option_as_alt                3
macos_quit_when_last_window_closed True
mouse_hide_wait                    -1.0
shell_integration                  frozenset({'no-cursor'})
strip_trailing_spaces              smart
tab_bar_edge                       1
tab_bar_style                      slant
visual_bell_duration               0.5
Added shortcuts:
    ctrl+h →  kitten pass_keys.py neighboring_window left   ctrl+h
    ctrl+j →  kitten pass_keys.py neighboring_window bottom ctrl+j
    ctrl+k →  kitten pass_keys.py neighboring_window top    ctrl+k
    ctrl+l →  kitten pass_keys.py neighboring_window right  ctrl+l
Colors:
    background                         #292d3e   
    color0                             #434759   
    color1                             #f07178   
    color10                            #ddffa7   
    color11                            #ffe585   
    color12                            #9cc4ff   
    color13                            #e1acff   
    color14                            #a3f7ff   
    color15                            #fefefe   
    color2                             #c3e88d   
    color3                             #ffcb6b   
    color4                             #82aaff   
    color5                             #c792ea   
    color6                             #89ddff   
    color7                             #d0d0d0   
    color8                             #434758   
    color9                             #ff8b92   
    foreground                         #959dcb   
    selection_background               #607c8b   
    selection_foreground               #eceef0   
    url_color                          #82aaff   

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                               /bin/zsh
    DISPLAY                             /private/tmp/com.apple.launchd.A5yuOLCcOa/org.xquartz:0
    USER                                cmaceach
page-down commented 1 year ago

... prevent someone from making this mistake on your end ...

The asterisk will typically be expanded by your shell. This is not a problem that most general users will encounter. We can't stop people from doing meaningless things. And kitty will do whatever you tell it to do. So don't do that.

... no way I could recover from it ...

But I think we should address this issue.

https://sw.kovidgoyal.net/kitty/faq/#i-catted-a-binary-file-and-now-kitty-is-hung

I can reproduce this.

This is basically outputting binary data, which will cause the GUI main thread to lock up and become unresponsive under macOS, and executing Close Window, Quit will not be possible. So there is no chance to reset the terminal either.

I can execute kitty --config data.bin in other popular terminals under macOS long enough, and close it within a second by pressing Ctrl+C, closing the window, or quitting the app. But not in kitty.