Xfce4-screensaver (xscreensaver) segfaults when loading image

I have Fedora 38 x86_64 kernel 6.4.11-200 on several computers with different hardwares, running Xfce4.

When running a screensaver that loads an image, a segfault occurs. Some computers hang and some just chug along fine, although I’m not sure I want to continue using them after segfault. It doesn’t matter whether they use open source mesa amd driver or proprietary nvidia video driver.

Here is a log:

Aug 24 11:11:21 fedora kernel: xscreensaver-ge[5078]: segfault at 0
ip 00005641b33f9373 sp 00007ffe08a91650 error 4 in 
xscreensaver-getimage[5641b33f8000+7000] likely on CPU 2 (core 2, socket 0)

This is always reproduceable: Reboot or start the computer, from menu Applications → Settings → xfce screensaver, in the screensaver dialog, choose Carousel theme. While Loading Image appears, a segfault occurs.

One other issue I found is that when I press configure button (gear icon) for any theme, no popup dialog appears at all except for Blank theme.

For now, my workaround is to fix screensaver to Blank theme.

The questions are, is there some xfce screensaver configuration that is causing this issue, or is this a bug in screensaver or kernel, or wayland issue with Xfce4? Any potential solution I can use?

I took some time to analyze the error messages after running xscreensaver-settings and xfce4-screensaver-preferences, and found several issues.

  1. xfce4-screensaver-configure that xfce4-screensaver-settings call cannot access settings for any xscreensaver modules, it only works for its own screensavers
  2. if there is a circular symlink, any module that tries to search for images will recursively search the same directory repeatedly and eventually segfaults.

To workaround #1, I had to use xscreensaver-settings instead, but never kill gnome screensaver or launch xscreensaver

For #2, I made sure to temporarily remove circular symlink, then set image path of xscreensaver-settings Advanced, and image path of xfce4-screensaver-preferences for Slideshow to point to a sub-directory that does not have the circular symlinks. It looks like part of the blame is in xfce4-screensaver-configure and glib2, where GLib2 picture directory returns home directory instead of some Picture sub-directory.

I need symlink that points to the current directory for a specific reason, and screensavers shouldn’t be recursing all over my home directory to find images.

But anyhow, now I can run screensaver without segfault.

I don’t think you can reasonably expect software to cope with circular symlinks

… but this should be fixable. I assume it’s using g_get_user_special_dir(G_USER_DIRECTORY_PICTURES).

That’s controlled by XDG_PICTURES_DIR in ~/.config/user-dirs.dirs