Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Rofi core dump error when changing nwg-look theme #2109

Closed
2 tasks done
Grassism1d opened this issue Mar 3, 2025 · 18 comments
Closed
2 tasks done

[BUG] Rofi core dump error when changing nwg-look theme #2109

Grassism1d opened this issue Mar 3, 2025 · 18 comments
Labels

Comments

@Grassism1d
Copy link

Grassism1d commented Mar 3, 2025

Rofi version (rofi -v)

Version: 1.7.8-dirty

Configuration

https://gist.github.com/Grassism1d/4695f0d75417d59ee44baa3ba42ba22d

Theme

https://gist.github.com/Grassism1d/8851f005dae5f6f18c77ca01ff922ae6

Timing report

no idea how to do that, sorry

Launch command

rofi -show drun

Step to reproduce

*step 1 - change the theme in nwg look, in "Prefrences" and "files to export" make sure the ~/.icons/default/index.theme is toggled on, then save

Expected behavior

when typing rofi -show drun it should open the rofi menu as usual

Actual behavior

If you were using a hotkey to open rofi, nothing happens. if you type rofi -show drun or any other various command in the terminal, this is the output (4 numbers) segmentation fault (core dumped) This is somewhat similar to when the command output. Please read below why I could'nt give the exact info [Update] here is what it actually looks like:

mid% rofi [1] 1408 segmentation fault (core dumped) rofi mid% rofi -show drun [1] 1432 segmentation fault (core dumped) rofi -show drun mid%

Additional information

[Update] after rebooting, the error appeared again.

when trying to recreate this error, I fixed it by maunally deleting the index.theme file from ~/.icons/default/, and now it works with no errors. even if I renable the index theme in nwg-look. Im confident someone could reproduce the error though since i saw multiple posts on reddit/github having the same type of error such as this one Sorry if this makes it harder to find the root cause of the problem, again, did not expect to fix it doing this

INFO:
WM - hyprland (wayland)
Disrto - Arch Linux

Using wayland display server protocol

  • No, I don't use the wayland display server protocol

I've checked if the issue exists in the latest stable release

  • Yes, I have checked the problem exists in the latest stable version
@Grassism1d Grassism1d added the bug label Mar 3, 2025
@lbonn
Copy link
Collaborator

lbonn commented Mar 3, 2025

@Grassism1d so, I suppose you are changing the icon theme? Which theme is working and which one is causing the crash?

If you'd be able to collect a backtrace (see https://github.com/davatorium/rofi/blob/next/INSTALL.md#get-a-backtrace), it would be very helpful

btw you've checked the box that you are not running rofi under wayland but two lines above you write that you user hyprland (wayland)

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Mar 3, 2025

Can you post your original theme files? I see something went wrong with `-dump-theme'

try to see if it crashes with?

rofi -no-config -show-icons -show drun

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Mar 3, 2025

#708 seems to be completely unrelated. That code does not exist anymore. It is also an issue from 2017.

@balduinofernando
Copy link

balduinofernando commented Mar 3, 2025

snipped the large copied text.


I had the same problem and followed your tips.

I was writing a theme switcher for light and dark mode.

I tried using nwg-look and I started having the segmentation fault (core dumped)

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Mar 3, 2025

@balduinofernando can you link the nwg-look 'thing' you use?

(and if possible a backtrace)

@DaveDavenport
Copy link
Collaborator

I've installed nwg-look and tried it, for me I cannot reproduce any crash.
Please provide a backtrace and the local modifications made to your version. (given its listed as 1.7.8-dirty).

@teddybear
Copy link

teddybear commented Mar 6, 2025

Confirm same segfault, also after nwg-look usage
Archlinux, 6.13.5-zen, dwm

> nwg-look -v
nwg-look version 1.0.2
> rofi -no-config -show-icons -show drun
Segmentation fault (core dumped)

rofi 1.7.8-dirty, rofi theme (rasi) is Arc-dark, from distribution

sorry, never used coredumpctl before, let me know if I should take some more steps, here's last backtrace from coredumpctl info rofi:

Message: Process 65784 (rofi) of user 1000 dumped core.

                Stack trace of thread 65784:
                #0  0x00007f6f2fa998d5 n/a (libc.so.6 + 0xae8d5)
                #1  0x00007f6f2fa7760d _IO_file_fopen (libc.so.6 + 0x8c60d)
                #2  0x00007f6f2fa6b4e8 n/a (libc.so.6 + 0x804e8)
                #3  0x00007f6f2fc78559 n/a (libxcb-cursor.so.0 + 0x2559)
                #4  0x00007f6f2fc7882a n/a (libxcb-cursor.so.0 + 0x282a)
                #5  0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #6  0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #7  0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #8  0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #9  0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #10 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #11 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #12 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #13 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #14 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #15 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #16 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #17 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #18 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #19 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #20 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #21 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #22 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #23 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #24 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #25 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #26 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #27 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #28 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #29 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #30 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #31 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #32 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #33 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #34 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #35 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #36 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #37 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #38 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #39 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #40 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #41 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #42 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #43 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #44 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #45 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #46 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #47 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #48 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #49 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #50 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #51 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #52 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #53 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #54 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #55 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #56 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #57 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #58 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #59 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #60 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #61 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #62 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)
                #63 0x00007f6f2fc78975 n/a (libxcb-cursor.so.0 + 0x2975)

                Stack trace of thread 65785:
                #0  0x00007f6f2fb0288d syscall (libc.so.6 + 0x11788d)
                #1  0x00007f6f3030cf90 g_cond_wait (libglib-2.0.so.0 + 0x8ef90)
                #2  0x00007f6f302a3d0c n/a (libglib-2.0.so.0 + 0x25d0c)
                #3  0x00007f6f303135b7 n/a (libglib-2.0.so.0 + 0x955b7)
                #4  0x00007f6f30310f66 n/a (libglib-2.0.so.0 + 0x92f66)
                #5  0x00007f6f2fa8070a n/a (libc.so.6 + 0x9570a)
                #6  0x00007f6f2fb04aac n/a (libc.so.6 + 0x119aac)

                Stack trace of thread 65786:
                #0  0x00007f6f2fa88be2 n/a (libc.so.6 + 0x9dbe2)
                #1  0x00007f6f2fa7ce33 n/a (libc.so.6 + 0x91e33)
                #2  0x00007f6f2fa7ce74 n/a (libc.so.6 + 0x91e74)
                #3  0x00007f6f2faf7a06 ppoll (libc.so.6 + 0x10ca06)
                #4  0x00007f6f3033e6a7 n/a (libglib-2.0.so.0 + 0xc06a7)
                #5  0x00007f6f302dae15 g_main_context_iteration (libglib-2.0.so.0 + 0x5ce15)
                #6  0x00007f6f302dae72 n/a (libglib-2.0.so.0 + 0x5ce72)
                #7  0x00007f6f30310f66 n/a (libglib-2.0.so.0 + 0x92f66)
                #8  0x00007f6f2fa8070a n/a (libc.so.6 + 0x9570a)
                #9  0x00007f6f2fb04aac n/a (libc.so.6 + 0x119aac)

                Stack trace of thread 65787:
                #0  0x00007f6f2fa88be2 n/a (libc.so.6 + 0x9dbe2)
                #1  0x00007f6f2fa7ce33 n/a (libc.so.6 + 0x91e33)
                #2  0x00007f6f2fa7ce74 n/a (libc.so.6 + 0x91e74)
                #3  0x00007f6f2faf7a06 ppoll (libc.so.6 + 0x10ca06)
                #4  0x00007f6f3033e6a7 n/a (libglib-2.0.so.0 + 0xc06a7)
                #5  0x00007f6f302dc647 g_main_loop_run (libglib-2.0.so.0 + 0x5e647)
                #6  0x00007f6f30084fc4 n/a (libgio-2.0.so.0 + 0x113fc4)
                #7  0x00007f6f30310f66 n/a (libglib-2.0.so.0 + 0x92f66)
                #8  0x00007f6f2fa8070a n/a (libc.so.6 + 0x9570a)
                #9  0x00007f6f2fb04aac n/a (libc.so.6 + 0x119aac)
                ELF object binary architecture: AMD x86-64

can confirm, removal of index.theme file fixes issue, here's contents:

cat ~/.icons/default/index.theme
# This file is written by nwg-look. Do not edit.
[Icon Theme]
Name=Default
Comment=Default Cursor Theme
Inherits=default

@DaveDavenport
Copy link
Collaborator

This looks like it might be a bug in libxcb-cursor.. It looks like it is getting stuck in a recursive loop.

@DaveDavenport
Copy link
Collaborator

# This file is written by nwg-look. Do not edit.
[Icon Theme]
Name=Default
Comment=Default Cursor Theme
Inherits=default

It looks like the Inherits=default entry causes the recursive loop, removing that stops libxcb-cursor from crashing.

@nwg-piotr
Copy link

It looks like the Inherits=default entry causes the recursive loop, removing that stops libxcb-cursor from crashing.

I wonder where the default value comes from. It should point to the actually selected cursor theme (Adwaita in my case), read from getGsettingsValue("org.gnome.desktop.interface", "cursor-theme"). Does OP have any icon themes installed?

@lbonn
Copy link
Collaborator

lbonn commented Mar 6, 2025

Isn't it just that this default resolves to Default (or the opposite?) which causes the theme to inherit itself and causes the infinite loop there?

https://gitlab.freedesktop.org/xorg/lib/libxcb-cursor/-/blob/4929f6051658ba5424b41703a1fb63f9db896065/cursor/load_cursor.c#L178

@DaveDavenport
Copy link
Collaborator

IMHO libxcb-cursor should try to catch loops in its inheritance 'tree'. I need to see if I can get a working account there to report the issue.

@nwg-piotr
Copy link

Does the crash happen when some cursor theme is installed and set in nwg-look?

@DaveDavenport
Copy link
Collaborator

I could only reproduce the crash when copy/pasting the above generated theme.
Hopefully any of the reporters can answer this.

@nwg-piotr
Copy link

nwg-piotr commented Mar 6, 2025

Possibly nwg-look should not export this line at all when gsettings get org.gnome.desktop.interface cursor-theme returns 'default'.

@DaveDavenport
Copy link
Collaborator

https://gitlab.freedesktop.org/xorg/lib/libxcb-cursor/-/issues/13

@teddybear
Copy link

I've also noticed that there were like no cursors in list neither in nwg nor in lxappearance, I mean, position somehow became empty by name:

Image

@DaveDavenport
Copy link
Collaborator

Closing, its been reported upstream.

@DaveDavenport DaveDavenport closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants