Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitty crashes when switching background color often, if wayland_titlebar_color=background #5562

Closed
Thesola10 opened this issue Oct 7, 2022 · 8 comments
Labels

Comments

@Thesola10
Copy link

Thesola10 commented Oct 7, 2022

Describe the bug
When changing background color of the whole window, either through a kitten or a RPC call, the kitty window can end up crashing.

This only occurs when wayland_titlebar_color=background

To Reproduce
Steps to reproduce the behavior:

Option 1:

  1. Run kitty +kitten themes
  2. Scroll through the themes
  3. Window dies

Option 2:

  1. Run kitty @set-colors background=something
  2. Run it again in the next 4~5 seconds
  3. Window dies

Screenshots
I doubt a screenshot of the absence of a window could help, but here's the error message:

wl_display@1: error 1: invalid arguments for wl_surface@36.attach
[280 10:10:19.221771] [glfw error 65544]: Wayland: fatal display error: Invalid argument

Environment details

kitty 0.26.3 created by Kovid Goyal
Linux SolaXBook 5.19.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 20 Sep 2022 15:17:59 +0000 x86_64
Arch Linux 5.19.10-arch1-1 (/dev/tty)

DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Arch Linux Atomic"
Running under: Wayland
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /bin/zsh
Loaded config files:
  /home/karim/.config/kitty/kitty.conf

Config options different from defaults:
allow_remote_control       yes
background_opacity         0.7
bold_italic_font           Comic Code Ligatures Bold Italic
click_interval             0.5
cursor_blink_interval      0.5
dynamic_background_opacity True
font_family                Fira Code
font_size                  9.0
initial_window_height      (365, 'px')
initial_window_width       (615, 'px')
italic_font                Comic Code Ligatures Italic
listen_on                  unix:@kitty
remember_window_size       False
resize_debounce_time       0.2
resize_draw_strategy       3
scrollback_pager           ['less', '+G', '-R']
select_by_word_characters  :@-./_~?&=%+#
symbol_map:
	U+3000 - U+30ff → Noto Sans CJK JP
	U+4e00 - U+9fff → Noto Sans CJK JP
	U+e000 - U+faff → Hack Nerd Font
	U+ff00 - U+ffef → Noto Sans CJK JP
touch_scroll_multiplier    5.0
wayland_titlebar_color     1
window_border_width        (0, 'pt')
Added mouse actions:
	ctrl+shift+left click grabbed →  mouse_handle_click link
	ctrl+shift+left click ungrabbed →  mouse_handle_click link
Changed mouse actions:
	left click ungrabbed →  mouse_handle_click selection prompt
Changed shortcuts:
	kitty_mod+- →  decrease_font_size
	kitty_mod+= →  increase_font_size
	kitty_mod+backspace →  restore_font_size
Colors:
	background                 #c3d4ee   
	color0                     #073642   
	color1                     #ac122f   
	color10                    #586e75   
	color11                    #657b83   
	color12                    #839496   
	color13                    #6c71c4   
	color14                    #93a1a1   
	color15                    #808080   
	color2                     #356900   
	color3                     #b58900   
	color4                     #265ba2   
	color5                     #a31652   
	color6                     #1a7158   
	color7                     #606060   
	color8                     #002b36   
	color9                     #bb3b16   
	cursor                     #ffffff   
	foreground                 #000000   
	selection_background       #c0d0e6   
	selection_foreground       #303030   

Important environment variables seen by the kitty process:
	PATH                                /home/karim/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/karim/.local/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/home/karim/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
	LANG                                fr_FR.UTF-8
	SHELL                               /bin/zsh
	GLFW_IM_MODULE                      ibus
	DISPLAY                             :0
	WAYLAND_DISPLAY                     wayland-0
	USER                                karim
	XDG_DATA_DIRS                       /home/karim/.nix-profile/share:/home/karim/.local/share:/home/karim/.local/share/flatpak/exports/share:/run/media/karim/Mothership/Flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/
	XDG_RUNTIME_DIR                     /run/user/60403
	XDG_CURRENT_DESKTOP                 GNOME
	XDG_MENU_PREFIX                     gnome-
	XDG_SESSION_CLASS                   user
	XDG_SESSION_DESKTOP                 gnome
	XDG_SESSION_TYPE                    wayland

Additional context
Minimal kitty.conf

linux_display_server wayland
wayland_titlebar_color background
@dmig
Copy link

dmig commented Nov 19, 2023

Experiencing same behavior both with system and background values.

kitty 0.31.0 (b247fda672) created by Kovid Goyal
Linux dmig-office 6.5.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 13 13:49:38 UTC 2023 x86_64
Ubuntu 23.10 dmig-office /dev/tty

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=23.10
DISTRIB_CODENAME=mantic
DISTRIB_DESCRIPTION="Ubuntu 23.10"
Running under: Wayland
Frozen: True
Paths:
  kitty: /home/temporaryadmin/.local/kitty.app/bin/kitty
  base dir: /home/temporaryadmin/.local/kitty.app/lib/kitty
  extensions dir: /home/temporaryadmin/.local/kitty.app/lib/kitty-extensions
  system shell: /usr/bin/fish
Loaded config files:
  /home/temporaryadmin/.config/kitty/kitty.conf

Config options different from defaults:
allow_remote_control yes
background_opacity   0.75
font_family          Fira Code
tab_bar_style        slant
Changed shortcuts:
	kitty_mod+f →  launch --allow-remote-control kitty +kitten kitty_search/search.py @active-kitty-window-id
	kitty_mod+t →  new_tab_with_cwd

Important environment variables seen by the kitty process:
	PATH                                /home/temporaryadmin/.pyenv/bin:/home/temporaryadmin/.google-cloud-sdk/bin:/home/temporaryadmin/bin:/home/temporaryadmin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
	LANG                                en_IE.UTF-8
	SHELL                               /usr/bin/fish
	DISPLAY                             :0
	WAYLAND_DISPLAY                     wayland-0
	USER                                temporaryadmin
	LC_ADDRESS                          en_IE.UTF-8
	LC_IDENTIFICATION                   en_IE.UTF-8
	LC_MEASUREMENT                      en_IE.UTF-8
	LC_MONETARY                         en_IE.UTF-8
	LC_NAME                             en_IE.UTF-8
	LC_NUMERIC                          en_IE.UTF-8
	LC_PAPER                            en_IE.UTF-8
	LC_TELEPHONE                        en_IE.UTF-8
	LC_TIME                             en_IE.UTF-8
	XDG_RUNTIME_DIR                     /run/user/1001
	XDG_CURRENT_DESKTOP                 ubuntu:GNOME
	XDG_MENU_PREFIX                     gnome-
	XDG_SESSION_CLASS                   user
	XDG_SESSION_DESKTOP                 ubuntu
	XDG_SESSION_TYPE                    wayland

Config-reload shortcut causes this debug output, otherwise the parameter has no effect.

@kovidgoyal
Copy link
Owner

If you are experiencing a crash then post a backtrace. Or a way to
reproduce.

@dmig
Copy link

dmig commented Nov 20, 2023

Not sure if it's a real crash, but looks like some handled exception.
Reproduced easily:

  1. uncomment wayland_titlebar_color in config and set it to background or system
  2. reload config using Ctrl-Shift-F5

@kovidgoyal
Copy link
Owner

That does not reproduce for me in GNOME under wayland.
No matter how many times I set comment/uncomment wayland_titlebar_color
background and reload config, kitty does not crash.

@dmig
Copy link

dmig commented Nov 20, 2023

Maybe an ubuntu-specific problem. Any debug logs I can provide?

@kovidgoyal
Copy link
Owner

A backtrace for the crash

@dmig
Copy link

dmig commented Nov 22, 2023

False alert, it started working. Probably was a gnome glitch.
The only weird this is this option gets commented out regularly.

@kovidgoyal
Copy link
Owner

All color related options are commented out when you change themes
using the themes kitten. Either put it in a separate conf file and
include it or use --config-file-name with the themes kitten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants