12
167
Fork
You've already forked fnott
32

funky behaviors when you set max-icon-size to 0 #145

Closed
opened 2025年04月12日 13:03:46 +02:00 by bleh · 3 comments

to reproduce

icon=/path/to/icon
max-icon-size=0
min-width=200

then do notify-send "title" "something" and it would just be empty.
screenshot.png

And if you remove min-width, it will seg fault with

 err: shm.c:110: failed to mmap SHM backing memory file: Invalid argument
zsh: segmentation fault (core dumped) fnott
fnott version 1.7.1
to reproduce ```ini icon=/path/to/icon max-icon-size=0 min-width=200 ``` then do `notify-send "title" "something"` and it would just be empty. ![screenshot.png](/attachments/5905c468-4970-4e06-b55b-846a5e77469b) And if you remove `min-width`, it will seg fault with ``` err: shm.c:110: failed to mmap SHM backing memory file: Invalid argument zsh: segmentation fault (core dumped) fnott ``` ``` fnott version 1.7.1 ```
Contributor
Copy link

On my machine it works on the same version of fnott and the configuration you have given

On my machine it works on the same version of fnott and the configuration you have given
Owner
Copy link

Using a PNG, I do get

Program received signal SIGFPE, Arithmetic exception.
0x000055555556f142 in notif_set_image_internal (notif=0x5555555f9540, pix=0x5555555d0f40, custom=false)
 at ../../notification.c:746
746	 double scale_w = notif->image_width / max_size;
(gdb) bt
#0 0x000055555556f142 in notif_set_image_internal (notif=0x5555555f9540, pix=0x5555555d0f40, 
 custom=false) at ../../notification.c:746
#1 0x000055555556f4c8 in notif_reload_default_icon (notif=0x5555555f9540) at ../../notification.c:819
#2 0x000055555556de50 in notif_mgr_create_notif (mgr=0x5555555cd810, replaces_id=0, sync_tag=0x0)
 at ../../notification.c:474
#3 0x0000555555567f87 in notify (bus=0x555555666080, msg=0x555555665f10) at ../../dbus.c:455
#4 0x00005555555686e1 in dbus_handler (conn=0x555555650b50, msg=0x555555665f10, data=0x555555666080)
 at ../../dbus.c:663
#5 0x00007ffff7e66ce3 in dbus_connection_dispatch () from /usr/lib/libdbus-1.so.3
#6 0x0000555555568b74 in fdm_handler (fdm=0x55555564eea0, fd=6, events=1, data=0x555555666080)
 at ../../dbus.c:766
#7 0x0000555555569e63 in fdm_poll (fdm=0x55555564eea0) at ../../fdm.c:225
#8 0x0000555555560a86 in main (argc=1, argv=0x7fffffffd958) at ../../main.c:210
(gdb) 
Using a PNG, I do get ``` Program received signal SIGFPE, Arithmetic exception. 0x000055555556f142 in notif_set_image_internal (notif=0x5555555f9540, pix=0x5555555d0f40, custom=false) at ../../notification.c:746 746 double scale_w = notif->image_width / max_size; (gdb) bt #0 0x000055555556f142 in notif_set_image_internal (notif=0x5555555f9540, pix=0x5555555d0f40, custom=false) at ../../notification.c:746 #1 0x000055555556f4c8 in notif_reload_default_icon (notif=0x5555555f9540) at ../../notification.c:819 #2 0x000055555556de50 in notif_mgr_create_notif (mgr=0x5555555cd810, replaces_id=0, sync_tag=0x0) at ../../notification.c:474 #3 0x0000555555567f87 in notify (bus=0x555555666080, msg=0x555555665f10) at ../../dbus.c:455 #4 0x00005555555686e1 in dbus_handler (conn=0x555555650b50, msg=0x555555665f10, data=0x555555666080) at ../../dbus.c:663 #5 0x00007ffff7e66ce3 in dbus_connection_dispatch () from /usr/lib/libdbus-1.so.3 #6 0x0000555555568b74 in fdm_handler (fdm=0x55555564eea0, fd=6, events=1, data=0x555555666080) at ../../dbus.c:766 #7 0x0000555555569e63 in fdm_poll (fdm=0x55555564eea0) at ../../fdm.c:225 #8 0x0000555555560a86 in main (argc=1, argv=0x7fffffffd958) at ../../main.c:210 (gdb) ```
Owner
Copy link

We could either disallow max-icon-size=0, or special case it to mean "no icons at all".

We could either disallow `max-icon-size=0`, or special case it to mean "no icons at all".
Sign in to join this conversation.
No Branch/Tag specified
master
releases/1.8
releases/1.7
releases/1.6
releases/1.5
release/1.4
parse-font-apply-fontconfig-rules
releases/1.3
releases/1.2
releases/1.1
releases/1.0
1.8.0
1.7.1
1.7.0
1.6.0
1.5.0
1.4.1
1.4.0
1.3.0
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
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
dnkl/fnott#145
Reference in a new issue
dnkl/fnott
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?