brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.11k stars 613 forks source link

[Bug]: Problem when I change font in Conky #1694

Open neecride opened 8 months ago

neecride commented 8 months ago

What happened?

Hello, I'm trying to build a nice desktop but I have this error which prevents Conky from refreshing and I don't understand Linux enough to correct the problem

/usr/include/c++/13.2.1/bits/stl_vector.h:1125: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = x_font_list;
_Alloc = std::allocator<x_font_list>;
reference = x_font_list&;
size_type = long unsigned int]: Assertion '__n < this->size()' failed.

Version

1.18.1-2

Which OS/distro are you seeing the problem on?

Arch Linux (Archcraft)

Conky config

conky.config = {
    background = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_transparent = false,
    own_window_type = 'desktop',
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    own_window_argb_visual = true,
    own_window_argb_value = 0,
    double_buffer = true,
    no_buffers = true,
    use_spacer = 'none',
    use_xft = true,
    xftalpha = 1,
    font = 'Sans:size=14',
    update_interval = 1,
    uppercase = false,
    override_utf8_locale = true,
    stippled_borders = 1,
    border_width = 5,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    show_graph_scale = true,
    show_graph_range = true,
    alignment = 'top_left',
    gap_x = 10,
    gap_y = 20,
    net_avg_samples = 1,
    cpu_avg_samples = 6,
    short_units = true,
    pad_percents = 2,
    text_buffer_size = 2048,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
}
conky.text = [[
#${image /home/wysiwyg/.conky/myconky/bg.png -n -p 100x100 -s 100x100}
${font Sans:size=30}${color 41e7d0}${time %k:}${color 9babba}${time %M}
${font Sans:size=14}${time %A,} ${color 41e7d0}${time %d}${color 9babba} ${time %B}
]]

Stack trace

No response

Relevant log output

No response

vEnhance commented 8 months ago

This seems to be the same error message as in https://github.com/brndnmtthws/conky/issues/1538#issuecomment-1565390136. (Using version 1.19.4+ may fix the issue according to some comments there; Arch's main repo seems to be behind and is still on 1.18.1.)

Caellian commented 4 months ago

Issue likely in font command. Index out of bounds error. Definitely a bug because conky shouldn't crash, even if you use non-existant font.