Skip to content

Crashing When Reading Random Bytes With Cat #8067

@0x62797465

Description

@0x62797465

Describe the bug
I read /dev/random as a test at times, when I tried to do it with kitty it resulted in a crash. I used split and vim in order to cut down a file that reproduces the bug.

To Reproduce
Steps to reproduce the behavior:

  1. Open kitty
  2. Read the provided file with cat
    o3.txt
  3. kitty closes

Environment details

kitty 0.37.0 created by Kovid Goyal
Linux DESKTOP-TH1NKC3 6.11.7 #1-NixOS SMP PREEMPT_DYNAMIC Fri Nov  8 15:31:04 UTC 2024 x86_64

<<< Welcome to NixOS 24.11beta708443.057f63b6dc1a (x86_64) - /dev/tty >>>

Run 'nixos-help' for the NixOS manual.

DISTRIB_CODENAME=vicuna
DISTRIB_DESCRIPTION="NixOS 24.11 (Vicuna)"
DISTRIB_ID=nixos
DISTRIB_RELEASE="24.11"
LSB_VERSION="24.11 (Vicuna)"
Running under: Wayland (sway version 1.10) missing: blur
OpenGL: '4.6 (Core Profile) Mesa 24.2.6' Detected version: 4.6
Frozen: False
Fonts:
  medium: FiraCodeRoman-Regular: /nix/store/x1v8d4qdh7ca616vdi4cmqhwl63v3h0v-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:131072
          Features: ()
    bold: FiraCodeRoman-SemiBold: /nix/store/x1v8d4qdh7ca616vdi4cmqhwl63v3h0v-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:262144
          Features: ()
  italic: FiraCodeRoman-Regular: /nix/store/x1v8d4qdh7ca616vdi4cmqhwl63v3h0v-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:131072
          Features: ()
      bi: FiraCodeRoman-SemiBold: /nix/store/x1v8d4qdh7ca616vdi4cmqhwl63v3h0v-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:262144
          Features: ()
Paths:
  kitty: /nix/store/rsl5pj2xkhbrpfw60w8asz6ln27lv5fc-kitty-0.37.0/bin/kitty
  base dir: /nix/store/rsl5pj2xkhbrpfw60w8asz6ln27lv5fc-kitty-0.37.0/lib/kitty
  extensions dir: /nix/store/rsl5pj2xkhbrpfw60w8asz6ln27lv5fc-kitty-0.37.0/lib/kitty/kitty
  system shell: /run/current-system/sw/bin/bash
Loaded config files:
  /home/h/.config/kitty/kitty.conf

Config options different from defaults:
cursor_beam_thickness      0.155
cursor_blink_interval      (0.75, kitty.options.utils.EasingFunction(), kitty.options.utils.EasingFunction())
cursor_shape               2
cursor_stop_blinking_after 5.0
font_family                family="Fira Code"
font_size                  10.0
initial_window_height      (24, 'cells')
initial_window_width       (82, 'cells')
remember_window_size       False
scrollback_lines           100000
selection_foreground       None
shell                      fish
term                       xterm-256color
window_padding_width       FloatEdges(left=9.0, top=9.0, right=9.0, bottom=9.0)
Colors:
	background                 #2e3440   
	color0                     #32363d   
	color1                     #e06b74   
	color10                    #ffffff   
	color11                    #efca84   
	color12                    #6cb8f9   
	color13                    #d282e7   
	color14                    #5fc0cc   
	color15                    #b5bcc9   
	color2                     #ffffff   
	color3                     #e5c07a   
	color4                     #62aeef   
	color5                     #c778dd   
	color6                     #55b6c2   
	color7                     #abb2bf   
	color8                     #50545b   
	color9                     #ea757e   
	cursor                     #ffffff   
	cursor_text_color          #3f3f3f   
	foreground                 #ffffff   
	selection_background       #adbdc8   

Important environment variables seen by the kitty process:
	PATH                                /nix/store/rsl5pj2xkhbrpfw60w8asz6ln27lv5fc-kitty-0.37.0/bin:/nix/store/ym0d0c1hpxinxvr2qrfg1d1b9wnz6i71-imagemagick-7.1.1-40/bin:/nix/store/inpspwqhgpld2zdk89hra7xjh3nxll2x-ncurses-6.4.20221231-dev/bin:/run/wrappers/bin:/home/h/.nix-profile/bin:/nix/profile/bin:/home/h/.local/state/nix/profile/bin:/etc/profiles/per-user/h/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
	LANG                                en_US.UTF-8
	VISUAL                              vim
	EDITOR                              vim
	SHELL                               /run/current-system/sw/bin/bash
	DISPLAY                             :0
	WAYLAND_DISPLAY                     wayland-1
	USER                                h
	XCURSOR_SIZE                        24
	LC_IDENTIFICATION                   en_US.UTF-8
	LC_MEASUREMENT                      en_US.UTF-8
	LC_MONETARY                         en_US.UTF-8
	LC_PAPER                            en_US.UTF-8
	LC_ADDRESS                          en_US.UTF-8
	LC_TELEPHONE                        en_US.UTF-8
	LC_TIME                             en_US.UTF-8
	XDG_SESSION_ID                      2
	XDG_RUNTIME_DIR                     /run/user/1000
	XDG_DATA_DIRS                       /nix/store/mp4h27zqsqz4r9pqcdxir0xap7bihfpj-sway-1.10/share:/nix/store/p5nz6gdblng41fiqqb7z88l119dc9v56-gsettings-desktop-schemas-47.1/share/gsettings-schemas/gsettings-desktop-schemas-47.1:/nix/store/vbw9c3pvwli5iidik8dddgz423wr1h18-gtk+3-3.24.43/share/gsettings-schemas/gtk+3-3.24.43:/nix/store/mmi7lm1jd4dgghw4f6jwvraa2rqnsha7-desktops/share:/home/h/.nix-profile/share:/nix/profile/share:/home/h/.local/state/nix/profile/share:/etc/profiles/per-user/h/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
	XDG_CURRENT_DESKTOP                 sway
	XDG_CONFIG_DIRS                     /etc/xdg:/home/h/.nix-profile/etc/xdg:/nix/profile/etc/xdg:/home/h/.local/state/nix/profile/etc/xdg:/etc/profiles/per-user/h/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg
	XDG_VTNR                            2
	XDG_SEAT_PATH                       /org/freedesktop/DisplayManager/Seat0
	XDG_SESSION_TYPE                    wayland
	XDG_SESSION_DESKTOP                 
	XDG_SESSION_PATH                    /org/freedesktop/DisplayManager/Session1
	XDG_SEAT                            seat0
	XDG_SESSION_CLASS                   user
	LC_NUMERIC                          en_US.UTF-8
	LC_NAME                             en_US.UTF-8

Additional context
Crashes with no config with the following errors (from the terminal that launched it):

xdg_toplevel#34: error -1: xdg_toplevel title is not valid UTF-8
[6.153] [glfw error 65544]: Wayland: fatal display error: Protocol error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions