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

wf-panel crashes after playing a song on spotify #283

Closed
dxcy47 opened this issue Dec 13, 2024 · 11 comments · Fixed by #284
Closed

wf-panel crashes after playing a song on spotify #283

dxcy47 opened this issue Dec 13, 2024 · 11 comments · Fixed by #284
Labels
bug Something isn't working

Comments

@dxcy47
Copy link

dxcy47 commented Dec 13, 2024

Describe the bug
whenever i open spotify and play a song, wf-panel crashes

To Reproduce
Steps to reproduce the behavior:

  1. open spotify
  2. play a song
  3. wf-panel crashes
    (note: it only crashes after playing a song. if i keep spotify open without playing anything it still works fine)

Expected behavior
expected wf-panel to work as normal without crashing after opening spotify

Screenshots or stacktrace

II 13-12-24 16:56:27.275 - [subprojects/wf-config/src/file.cpp:579] Reading XML configuration options from directory /opt/wayfire/share/wayfire/metadata/wf-shell
II 13-12-24 16:56:27.275 - [subprojects/wf-config/src/file.cpp:529] Reading XML configuration options from file /opt/wayfire/share/wayfire/metadata/wf-shell/background.xml
II 13-12-24 16:56:27.275 - [subprojects/wf-config/src/file.cpp:529] Reading XML configuration options from file /opt/wayfire/share/wayfire/metadata/wf-shell/dock.xml
II 13-12-24 16:56:27.275 - [subprojects/wf-config/src/file.cpp:529] Reading XML configuration options from file /opt/wayfire/share/wayfire/metadata/wf-shell/panel.xml
EE 13-12-24 16:56:27.276 - [subprojects/wf-config/src/file.cpp:341] Error in file /home/decoy/.config/wf-shell.ini:100, invalid option value!
EE 13-12-24 16:56:27.276 - [subprojects/wf-config/src/file.cpp:341] Error in file /home/decoy/.config/wf-shell.ini:100, invalid option value!
Error loading file: /usr/share/icons/gnome/48x48/categories/preferences-system.png
target button 508
set width 192

** (wf-panel:2594): ERROR **: 16:56:36.190:
unhandled exception (type std::exception) in signal handler:
what: map::at

fish: Job 1, 'wf-panel' terminated by signal SIGTRAP (Trace or breakpoint trap)


this is the whole log from starting wf-panel to it crashing

Wayfire version
wayfire-git 0.9.0 installed with wf-install

@dxcy47 dxcy47 added the bug Something isn't working label Dec 13, 2024
@NamorNiradnug
Copy link
Collaborator

NamorNiradnug commented Jan 1, 2025

Hi! Could you please run wf-panel under gdb and report the stacktrace of the thrown exception? I am pretty sure this is a problem about notifications widget.

Also this issue should be transferred to wf-shell repo.

@bell07
Copy link

bell07 commented Jan 9, 2025

Same issue on my site.
Recompiled the wayfire and wf-panel (both in version 0.9.0) with CFLAGS="-ggdb3" and splitdebug (Gentoo way):

$ gdb wf-panel 
GNU gdb (Gentoo 15.2 vanilla) 15.2
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from wf-panel...
Reading symbols from /usr/lib/debug//usr/bin/wf-panel.debug...
(gdb) run
Starting program: /usr/bin/wf-panel 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
[New Thread 0x7ffff2bb76c0 (LWP 6939)]
[New Thread 0x7ffff23b66c0 (LWP 6940)]
[New Thread 0x7ffff1bb56c0 (LWP 6941)]
[New Thread 0x7ffff138d6c0 (LWP 6942)]
[New Thread 0x7ffff0b126c0 (LWP 6943)]
II 09-01-25 08:59:27.591 - [wf-config-0.9.0/src/file.cpp:579] Reading XML configuration options from directory /usr/share/wayfire/metadata/wf-shell
II 09-01-25 08:59:27.591 - [wf-config-0.9.0/src/file.cpp:529] Reading XML configuration options from file /usr/share/wayfire/metadata/wf-shell/dock.xml
II 09-01-25 08:59:27.591 - [wf-config-0.9.0/src/file.cpp:529] Reading XML configuration options from file /usr/share/wayfire/metadata/wf-shell/panel.xml
II 09-01-25 08:59:27.591 - [wf-config-0.9.0/src/file.cpp:529] Reading XML configuration options from file /usr/share/wayfire/metadata/wf-shell/background.xml
[New Thread 0x7fffdbfff6c0 (LWP 6944)]
[New Thread 0x7fffda7ff6c0 (LWP 6945)]
Error loading file: notifications
Error loading file: notifications
target button 1973
set width 256
[Thread 0x7fffda7ff6c0 (LWP 6945) exited]

(wf-panel:6936): Gtk-WARNING **: 08:59:34.611: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
[Detaching after fork from child process 6954]
[New Thread 0x7fffda7ff6c0 (LWP 6956)]
Neither gnome-integration-spotify nor spotify-tray are installed.
Launching spotify without systray integration.
[Thread 0x7fffda7ff6c0 (LWP 6956) exited]

** (wf-panel:6936): ERROR **: 08:59:43.714: 
unhandled exception (type std::exception) in signal handler:
what: map::at

Thread 1 "wf-panel" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff68a88e7 in g_log_structured_array () from /usr/lib64/libglib-2.0.so.0
(gdb) backtrace
#0  0x00007ffff68a88e7 in g_log_structured_array () at /usr/lib64/libglib-2.0.so.0
WayfireWM/wayfire#1  0x00007ffff68a8d47 in g_log_default_handler () at /usr/lib64/libglib-2.0.so.0
WayfireWM/wayfire#2  0x00007ffff68a9071 in g_logv () at /usr/lib64/libglib-2.0.so.0
WayfireWM/wayfire#3  0x00007ffff68a93db in g_log () at /usr/lib64/libglib-2.0.so.0
WayfireWM/wayfire#4  0x00007ffff6b7839a in ??? () at /usr/lib64/libglibmm-2.4.so.1
WayfireWM/wayfire#5  0x00007ffff74e5ede in ??? () at /usr/lib64/libgiomm-2.4.so.1
WayfireWM/wayfire#6  0x00007ffff7725aca in ??? () at /usr/lib64/libgio-2.0.so.0
WayfireWM/wayfire#7  0x00007ffff689d267 in ??? () at /usr/lib64/libglib-2.0.so.0
WayfireWM/wayfire#8  0x00007ffff68a05f7 in ??? () at /usr/lib64/libglib-2.0.so.0
WayfireWM/wayfire#9  0x00007ffff68a0c20 in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
WayfireWM/wayfire#10 0x00007ffff76f8ff5 in g_application_run () at /usr/lib64/libgio-2.0.so.0
WayfireWM/wayfire#11 0x000055555559810d in main ()
(gdb) exit
A debugging session is active.

	Inferior 1 [process 6936] will be killed.

Quit anyway? (y or n) y

EDIT: If I disable the "Show desktop notifications for sound changes" (translated), the issue does not appear.

@ammen99 ammen99 transferred this issue from WayfireWM/wayfire Jan 9, 2025
@NamorNiradnug
Copy link
Collaborator

Hi, could you please check whether #284 fixes the issue?

@bell07
Copy link

bell07 commented Jan 11, 2025

Confirm the patch in #284 avoid the panel crash if spotify play is started first time. In addition it solves my issue the keepassxc tray icon was not shown.

But now spotify freezes for ~30 seconds if play is started first time. The music is playing, but cannot be controlled, paused or window be closed. After ~30 seconds (time measured with timer) the spotify gets useable again.
Still have to disable the notifications in spotify to avoid this freeze.

@NamorNiradnug
Copy link
Collaborator

NamorNiradnug commented Jan 11, 2025

In addition it solves my issue the keepassxc tray icon was not shown.

The patch is not related to the tray widget at all, probably you've done something else in order to fix it.

But now spotify freezes for ~30 seconds if play is started first time. The music is playing, but cannot be controlled, paused or window be closed. After ~30 seconds (time measured with timer) the spotify gets useable again.

Hmm, interesting... Sounds like a Spofify's issue to me. Do I get it right:

  • you open Spotify
  • start playing some music
  • the music is playing, the notification is there, but Spotify's UI is freezed
  • then it unfreezes and playing next tracks is fine
    ?

Doesn't spotify log anything helpful?

@NamorNiradnug
Copy link
Collaborator

By the way, does it work fine with any other notification manager in the wild (such as https://github.com/dunst-project/dunst)?

@bell07
Copy link

bell07 commented Jan 12, 2025

You are right, the keepassxc issue is not solved yet. After reboot the tray icon is away again...

  • I open Spotify
  • I start paying music
  • The Notification does NOT appear
  • Before the patch the Panel was crashed at this point
  • After the patch I get a freeze in spotify.
  • Freeze means: The time remains at 0:00 and the "play" button is not swapped to "pause" button. I cannot stop playing
  • After ~30 seconds freeze the time jumps to 0:30 and spotify gets usable again

spotify --debug-level=MAX does not provide anything useful additional informations. I get only the two lines on start:

Neither gnome-integration-spotify nor spotify-tray are installed.
Launching spotify without systray integration.

contradicting this message I get spotify tray icon...

I disabled the notifications in wf-panel and started dunst

  • The notification appears. (Music cover image at the left and Album name + Track name in two lines at the right)
  • No freeze
  • No change in spotify --debug-level=MAX output

Tried https://github.com/emersion/mako too, it does work too

@soreau
Copy link
Member

soreau commented Jan 12, 2025

You are right, the keepassxc issue is not solved yet. After reboot the tray icon is away again...

For what it's worth, there is an option in KeepassXC to display the tray icon or not, which seems to work fine here.

@bell07
Copy link

bell07 commented Jan 12, 2025

You are right, the keepassxc issue is not solved yet. After reboot the tray icon is away again...

For what it's worth, there is an option in KeepassXC to display the tray icon or not, which seems to work fine here.

This Issue I solved by autostart1 = sleep 5; keepassxc now.

Seems to be a timing issue in autostart processing.

@NamorNiradnug
Copy link
Collaborator

NamorNiradnug commented Jan 13, 2025

I've found another bug and it should work now (at least I've finally installed spotify and it works for me). Although it looks ugly because notification's text and image are side-by-side and image is large. Probably the best solution is to scale it (gonna fix it soon).

P.S. fixed this thing too, could you please check whether it works for you now?

@bell07
Copy link

bell07 commented Jan 13, 2025

Confirm the spotify notification does work for me as expected and there is no freeze if #284 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants