Same for me with Xtightvnc server under Xubuntu jammy.
I recompiled xiccd in debug version and could track the crash I
experienced down to (inline) function setup_events(), where member dpy
of argument conn was null :
(gdb) bt
#0 0x00005650eb1cc6cf in setup_events (conn=0x565116b89400) at
src/randr-conn-private.c:358
#1 0x00005650eb1cc732 in randr_conn_private_start (conn=0x565116b89400) at
src/randr-conn-private.c:374
#2 0x00005650eb1cb82b in randr_conn_start (conn=0x565116b89430) at
src/randr-conn.c:111
#3 0x00005650eb1ca162 in cd_connect_cb (src=0x565116b8a420,
res=0x565116b8e820, user_data=0x7ffe19846ba0) at src/xiccd.c:577
#4 0x00007f38de68be39 in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#5 0x00007f38de68c05b in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#6 0x00007f38de7c7729 in () at /lib/x86_64-linux-gnu/libcolord.so.2
#7 0x00007f38de68be39 in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#8 0x00007f38de68c05b in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#9 0x00007f38de6f563d in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#10 0x00007f38de68be39 in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#11 0x00007f38de68c05b in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#12 0x00007f38de6f7518 in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#13 0x00007f38de68be39 in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#14 0x00007f38de68c05b in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#15 0x00007f38de6ed73f in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#16 0x00007f38de68be39 in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#17 0x00007f38de68be7d in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#18 0x00007f38de9a8c44 in g_main_context_dispatch () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007f38de9fe2b8 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007f38de9a82b3 in g_main_loop_run () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00005650eb1ca31a in main (argc=1, argv=0x7ffe19846ce8) at src/xiccd.c:617
(gdb) print conn
$1 = (struct randr_conn *) 0x565116b89400
(gdb) print conn->dpy
$2 = (Display *) 0x0
(gdb)
Function setup_events() has the following code:
static inline void
setup_events (struct randr_conn *conn)
{
int s;
for (s = 0; s < ScreenCount (conn->dpy); ++s) {
Window w = RootWindow (conn->dpy, s);
XRRSelectInput (conn->dpy, w,
RRScreenChangeNotifyMask |
RRCrtcChangeNotifyMask |
RROutputChangeNotifyMask);
}
GSource *src = randr_source_new (conn);
g_source_attach (src, NULL);
g_source_unref (src);
}
Macro ScreenCount() is defined as follows in /usr/include/X11/Xlib.h:
#define ScreenCount(dpy) (((_XPrivDisplay)(dpy))->nscreens)
Therefore, using ScreenCount (conn->dpy) results in a null-pointer
dereferencing.
Now for the cause: AFAICS, it seems that despite xiccd is already
running on the target system, a new instance of xiccd is launched
everytime VNC server is killed/restarted, and this new instance is the
one which crashes. This may result from the custom version of
$HOME/.vnc/Xstartup which is necessary to run Xtightvnc server on
Xubuntu. Mine is as follows:
#!/bin/sh
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP
Desktop" &
# Fix to make GNOME and GTK stuff work
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
# exec /etc/X11/xinit/xinitrc
xrdb $HOME/.Xresources
xsetroot -solid grey
xfce4-session &
# before Ubuntu 18.04:
# gnome-settings-daemon &
# Ubuntu 18.04 and later:
/usr/lib/gnome-settings-daemon/gsd-xsettings &
Hope everything above makes sense, last time I performed some debugging
is a long time ago...
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1965531
Title:
xiccd crashed with SIGSEGV in update_device_cb()
To manage notifications about this bug go to:
https://bugs.launchpad.net/xiccd/+bug/1965531/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs