Dear Maintainer,
I have tried to reproduce these segfaults and received them
when redshift-gtk is installed and lightdm is used as login manager.
It looks like redshift-gtk installs a systemd user unit,
which is executed also for the lightdm login screen.
But it looks like the 'systemd --user' processes for
user lightdm does not receive which DISPLAY and XAUTHORITY
environments it should deliver to the redshift-gtk process.
Therefore redshift fails to connect to the xserver which
leads to the segfault.
So I am not sure if redshift is supposed to run at the login
screen in the first place.
If yes, it looks like "someone" has to tell the 'systemd --user'
process by something like this:
systemctl --user import-environment DISPLAY XAUTHORITY
Unfortunately I did not find any obvious place for that,
or how it is delivered for a regular logged in
'systemd --user' process.
Kind regards,
Bernhard
[ 6.829265] redshift-gtk[692]: segfault at 18 ip 00007fc62e9db690 sp
00007ffdaacafbc8 error 4 in libgtk-3.so.0.2404.20[7fc62e780000+374000]
[ 6.829275] Code: da ff 48 8b 44 24 08 64 48 2b 04 25 28 00 00 00 75 0f 48 83 c4
18 5b 5d 41 5c 41 5d 41 5e 41 5f c3 e8 54 96 da ff 0f 1f 40 00 <48> 8b 47 18 48
8b 40 10 c3 0f 1f 80 00 00 00 00 53 48 8b 5f 18 48
(gdb) bt
#0 _gtk_settings_get_screen (settings=0x0) at
../../../../gtk/gtksettings.c:3359
#1 0x00007fc62e87c2c4 in gtk_css_value_icon_theme_compute (icon_theme=<optimized out>,
property_id=<optimized out>, provider=<optimized out>, style=<optimized out>,
parent_style=<optimized out>) at ../../../../gtk/gtkcssiconthemevalue.c:84
#2 0x00007fc62e89dad8 in gtk_css_static_style_compute_value (style=0x213c040,
provider=0x0, parent_style=<optimized out>, id=3, specified=0x7fc62eea4e20
<inherit>, section=0x0) at ../../../../gtk/gtkcssstaticstyle.c:237
#3 0x00007fc62e88821a in _gtk_css_lookup_resolve
(lookup=lookup@entry=0x213a320, provider=provider@entry=0x0,
style=style@entry=0x213c040, parent_style=parent_style@entry=0x0) at
../../../../gtk/gtkcsslookup.c:122
#4 0x00007fc62e89d9a8 in gtk_css_static_style_new_compute (parent=0x0,
matcher=0x0, provider=0x0) at ../../../../gtk/gtkcssstaticstyle.c:195
#5 gtk_css_static_style_get_default () at
../../../../gtk/gtkcssstaticstyle.c:164
#6 0x00007fc62e888b62 in gtk_css_node_init (cssnode=0x21352c0) at
../../../../gtk/gtkcssnode.c:667
#7 0x00007fc6306a3357 in g_type_create_instance (type=<optimized out>) at
../../../gobject/gtype.c:1862
...
(gdb) py-bt
Traceback (most recent call first):
File "/usr/lib/python3/dist-packages/redshift_gtk/statusicon.py", line 326,
in __init__
File "/usr/lib/python3/dist-packages/redshift_gtk/statusicon.py", line 879, in run
File "/usr/bin/redshift-gtk", line 27, in <module>
run()
https://github.com/jonls/redshift/issues/265
https://gitlab.gnome.org/GNOME/gtk/-/issues/3310
https://superuser.com/questions/759759/writing-a-service-that-depends-on-xorg