[GH-ISSUE #137] Focused widget crashes whole bar when no icon present in desktop file #71

Closed
opened 2026-05-22 21:51:03 +01:00 by JakeStanger · 5 comments
Owner

Originally created by @ferrreo on GitHub (May 3, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/137

Describe the bug
I accidentally forgot to add an icon to my kitty.desktop file and when using the focused widget in ironbar and opening an instance of kitty the whole bar crashes

To Reproduce
Steps to reproduce the behaviour:

  1. Install kitty
  2. Setup ironbar with focused widget enabled in config
  3. Remove the icon line from kitty.desktop file if present
  4. Open and focus an instance of kitty
  5. Ironbar crashes

Expected behaviour
It should just not show an icon if there isn't one and just use the window title and not crash

System information:

  • Distro: Ubuntu 22.10/PikaOS
  • Compositor: Hyprland
  • Ironbar version: 0.11.0

Configuration
Nothing special just add focused widget with icons turned on

Additional context
Nothing in the logs or tty when it crashes it just disappears

Screenshots
N/A

Originally created by @ferrreo on GitHub (May 3, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/137 **Describe the bug** I accidentally forgot to add an icon to my kitty.desktop file and when using the focused widget in ironbar and opening an instance of kitty the whole bar crashes **To Reproduce** Steps to reproduce the behaviour: 1. Install kitty 2. Setup ironbar with focused widget enabled in config 3. Remove the icon line from kitty.desktop file if present 4. Open and focus an instance of kitty 5. Ironbar crashes **Expected behaviour** It should just not show an icon if there isn't one and just use the window title and not crash **System information:** - Distro: Ubuntu 22.10/PikaOS - Compositor: Hyprland - Ironbar version: 0.11.0 **Configuration** Nothing special just add focused widget with icons turned on **Additional context** Nothing in the logs or tty when it crashes it just disappears **Screenshots** N/A
Author
Owner

@JakeStanger commented on GitHub (May 3, 2023):

Hey, would you mind sharing the .desktop file please so that I have an exact replica? Could you also let me know what icon theme you are using, and try running ironbar without explicitly setting one? I've not been able to replicate this myself.

This seems odd behaviour since plenty of icon themes have a dedicated Kitty icon (both Adwaita and Paper at least), so it will use that before ever hitting the desktop file. If it does get as far as reading the desktop file, Ironbar should just silently continue or log an error if an icon entry can't be found. I wonder if it's coming from GTK, hence the hard crash.

<!-- gh-comment-id:1533739091 --> @JakeStanger commented on GitHub (May 3, 2023): Hey, would you mind sharing the .desktop file please so that I have an exact replica? Could you also let me know what icon theme you are using, and try running ironbar without explicitly setting one? I've not been able to replicate this myself. This seems odd behaviour since plenty of icon themes have a dedicated Kitty icon (both Adwaita and Paper at least), so it will use that before ever hitting the desktop file. If it does get as far as reading the desktop file, Ironbar should just silently continue or log an error if an icon entry can't be found. I wonder if it's coming from GTK, hence the hard crash.
Author
Owner

@ferrreo commented on GitHub (May 9, 2023):

[Desktop Entry]
Version=1.0
Type=Application
Name=kitty
GenericName=Terminal emulator
Comment=Fast, feature-rich, GPU based terminal
TryExec=kitty
Exec=kitty
Icon=kitty
Categories=System;TerminalEmulator;

This is a default kitty desktop file that causes the issue. To fix I put a full path to the icon provided alongside kitty.

<!-- gh-comment-id:1540131977 --> @ferrreo commented on GitHub (May 9, 2023): [Desktop Entry] Version=1.0 Type=Application Name=kitty GenericName=Terminal emulator Comment=Fast, feature-rich, GPU based terminal TryExec=kitty Exec=kitty Icon=kitty Categories=System;TerminalEmulator; This is a default kitty desktop file that causes the issue. To fix I put a full path to the icon provided alongside kitty.
Author
Owner

@JakeStanger commented on GitHub (May 9, 2023):

That file works fine for me.

Could you also let me know what icon theme you are using, and try running ironbar without explicitly setting one?

I also merged a change to some of the icon/image handling earlier today. It might be worth trying to update to the latest commit and see if the issue still occurs / if it produces any output?

<!-- gh-comment-id:1540848424 --> @JakeStanger commented on GitHub (May 9, 2023): That file works fine for me. > Could you also let me know what icon theme you are using, and try running ironbar without explicitly setting one? I also merged a change to some of the icon/image handling earlier today. It might be worth trying to update to the latest commit and see if the issue still occurs / if it produces any output?
Author
Owner

@ferrreo commented on GitHub (May 11, 2023):

I can't replicate it now even on older builds, so I guess we should put it down to gtk doing something super weird at the time.

<!-- gh-comment-id:1544378215 --> @ferrreo commented on GitHub (May 11, 2023): I can't replicate it now even on older builds, so I guess we should put it down to gtk doing something super weird at the time.
Author
Owner

@JakeStanger commented on GitHub (May 15, 2023):

Okay cool, thanks for confirming. I'll close this for now but if you do encounter it again please let me know and I'll reopen.

<!-- gh-comment-id:1548363699 --> @JakeStanger commented on GitHub (May 15, 2023): Okay cool, thanks for confirming. I'll close this for now but if you do encounter it again please let me know and I'll reopen.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#71
No description provided.