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

mate-volume-control-status-icon SEGV #159

Closed
joakim-tjernlund opened this issue Mar 19, 2020 · 33 comments
Closed

mate-volume-control-status-icon SEGV #159

joakim-tjernlund opened this issue Mar 19, 2020 · 33 comments

Comments

@joakim-tjernlund
Copy link

joakim-tjernlund commented Mar 19, 2020

Steps to reproduce the behaviour

Not sure but I see this a lot when using BlueTooth(BT) headset. Either it happens when you connect/disconnect
the HS or when start/close an audio chat in teams/pidgin.
I have seen this with USB hs too but not that often

MATE general version

1.22

Package version

1.22.2

Linux Distribution

Gentoo

Link to downstream report of your Distribution

None

@joakim-tjernlund
Copy link
Author

Backtrace etc.
mate-icon.txt

@phodopus42
Copy link

phodopus42 commented Apr 23, 2020

I'm getting the same issue on Fedora.

Please see https://bugzilla.redhat.com/show_bug.cgi?id=1820673 for the downstream bug.

I can't discern any particular patterns of use that cause this.

First time: I unplugged a USB headset, clicked on the microphone icon, and it crashed.

Second time: I right-clicked on the volume control icon to open the menu.

Third time: I used the scroll-wheel to change the volume level.

The only common factor is a mouse input event on the icon.

I'm happy to try to build a custom package, or attach a debugger. However, it's a very unpredictable bug.

@joakim-tjernlund
Copy link
Author

I am 1.24 now and still see the same issue now and then.

@joakim-tjernlund
Copy link
Author

Any news?

@schmolch
Copy link

schmolch commented Jun 9, 2020

This POS is crashing multiple times a day on any of my 3 systems.

@lukefromdc
Copy link
Member

Possible workaround for 1.24: Add the new "volume control" applet to the panel and remove mate-volume-control-status-icon ("volume control") from startup applications by unchecking that entry in the mate-control-center "Startup Applications" dialog. If you still get a crash,then the problem is in code common to both of them or even in libmatemixer. I've never seen this crash but it could be hardware-dependent

@yeezy69
Copy link

yeezy69 commented Apr 13, 2021

Same for me, while connecting any bluetooth speaker or headphones the mate-volume-control-status-icon randomly crashes after disconnecting.

Archlinux mate-media 1.24.1-1

Hope this helps, thank you.

$ gdb mate-volume-control-status-icon
GNU gdb (GDB) 10.1
Reading symbols from mate-volume-control-status-icon...
(No debugging symbols found in mate-volume-control-status-icon)
(gdb) run
Starting program: /usr/bin/mate-volume-control-status-icon 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

(mate-volume-control-status-icon:31013): Gtk-WARNING **: 21:54:31.481: Calling gtk_widget_realize() on a widget that isn't inside a toplevel window is not going to work very well. Widgets must be inside a toplevel container before realizing them.

(mate-volume-control-status-icon:31013): GLib-GObject-CRITICAL **: 21:54:31.481: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(mate-volume-control-status-icon:31013): Gdk-CRITICAL **: 21:54:31.482: gdk_window_get_scale_factor: assertion 'GDK_IS_WINDOW (window)' failed
**
Gtk:ERROR:../gtk/gtk/gtkwidget.c:5871:gtk_widget_get_frame_clock: assertion failed: (window != NULL)
Bail out! Gtk:ERROR:../gtk/gtk/gtkwidget.c:5871:gtk_widget_get_frame_clock: assertion failed: (window != NULL)

Thread 1 "mate-volume-con" received signal SIGABRT, Aborted.
0x00007ffff7018ef5 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff7018ef5 in raise () at /usr/lib/libc.so.6
#1  0x00007ffff7002862 in abort () at /usr/lib/libc.so.6
#2  0x00007ffff71c6084 in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff722185d in g_assertion_message_expr () at /usr/lib/libglib-2.0.so.0
#4  0x00007ffff7969637 in  () at /usr/lib/libgtk-3.so.0
#5  0x00007ffff796f58d in gtk_widget_realize () at /usr/lib/libgtk-3.so.0
#6  0x00007ffff796f779 in gtk_widget_map () at /usr/lib/libgtk-3.so.0
#7  0x00007ffff76f1ef0 in  () at /usr/lib/libgtk-3.so.0
#8  0x00007ffff7740231 in  () at /usr/lib/libgtk-3.so.0
#9  0x00007ffff730d7f3 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff730e210 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff796f719 in gtk_widget_map () at /usr/lib/libgtk-3.so.0
#12 0x00007ffff798a599 in  () at /usr/lib/libgtk-3.so.0
#13 0x00007ffff730e096 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff730e210 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#15 0x00007ffff796f719 in gtk_widget_map () at /usr/lib/libgtk-3.so.0
#16 0x00007ffff798e812 in  () at /usr/lib/libgtk-3.so.0
#17 0x00007ffff72f0ddf in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#18 0x00007ffff7319c2c in  () at /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff730dcad in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#20 0x00007ffff730e210 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#21 0x00007ffff7970147 in gtk_widget_show () at /usr/lib/libgtk-3.so.0
#22 0x00007ffff792c510 in  () at /usr/lib/libgtk-3.so.0
#23 0x00007ffff792c709 in  () at /usr/lib/libgtk-3.so.0
#24 0x00007ffff756b89c in  () at /usr/lib/libgdk-3.so.0
#25 0x00007ffff71fd614 in  () at /usr/lib/libglib-2.0.so.0
#26 0x00007ffff71fcf30 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#27 0x00007ffff7250b59 in  () at /usr/lib/libglib-2.0.so.0
#28 0x00007ffff71fc593 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#29 0x00007ffff781358f in gtk_main () at /usr/lib/libgtk-3.so.0
#30 0x00005555555591b9 in main ()
(gdb) quit

@cwendling
Copy link
Member

BTW I confirm this through a colleague of mine on 1.20's mate-volume-control-applet (which is possibly the old name of the status icon?). We for the moment worked around it in a fairly ugly fashion by restarting the binary if it crashes.

The backtrace is very similar, and IIUC it's when trying to show the tooltip. Steps to reproduce are the same as well, play with your bluetooth headset or so, and after a couple tries it crashes.
I couldn't debug this properly as I don't have the hardware myself, so I only dug a little, but no luck.

@yeezy69
Copy link

yeezy69 commented Apr 19, 2021

Right, I noticed that the applet occasionally crashed on mouseover (tooltip), after bluetooth connect / disconnect. However, it also crashes without a mouseover.

@muesli4
Copy link
Contributor

muesli4 commented Dec 20, 2022

It is a bit hard to debug the main loop and I don't have it compiled without optimizations. However, I was able to run it in gdb and it ran into that condition. From what I can see the following is happening (I was printing out some of the widgets with p):

gtk_main
g_main_loop_run
g_main_context_iterate
g_main_context_dispatch
g_main_dispatch
g_timeout_dispatch
gdk_threads_dispatch
tooltip_popup_timeout
gtk_tooltip_show_tooltip
gtk_tooltip_position: tooltip = GtkTooltip
gtk_window_show: widget = GtkTooltipWindow
gtk_widget_map: widget = GtkTooltipWindow
gtk_window_map: widget = GtkTooltipWindow
gtk_widget_map: child = GtkBox
...
gtk_widget_realize: widget = GtkLabel
gtk_widget_get_frame_clock: widget = GtkLabel

gtkwidget.c:5875: g_assert (window != NULL);

So it tries to show the tooltip which recursively sends events (map, realize) through all widgets and in the label it tries to get the frame clock from the window. The window is NULL for some reason.

I added a coredump and a backtrace in debug-information.zip.

I am also not sure whether that is connected but every time this happens I loose network for a short amount of time and I have pulseaudio running on a different machine:

[20. Dez 15:44] r8169 0000:04:00.0 enp4s0: Link is Down
[  +3,071099] r8169 0000:04:00.0 enp4s0: Link is Up - 1Gbps/Full - flow control rx/tx
[  +2,953061] usb 3-1.1: reset high-speed USB device number 4 using xhci_hcd

@muesli4
Copy link
Contributor

muesli4 commented Dec 20, 2022

@lukefromdc
Copy link
Member

By any chance is this crash appearing only with the tray on a bottom panel? The tooltip does not appear (would be offscreen) with the tray icon OR with the panel applet on a bottom panel. None of the tooltips work on a bottom panel

@muesli4
Copy link
Contributor

muesli4 commented Dec 20, 2022

By any chance is this crash appearing only with the tray on a bottom panel? The tooltip does not appear (would be offscreen) with the tray icon OR with the panel applet on a bottom panel. None of the tooltips work on a bottom panel

No. The status icon is on my top panel. However, I've seen some weird behavior in the past that the tool tip was very far on the left side but still visible in those cases. Maybe there is some glitch related to the position.

But there must be something else going on. Because the widget is clearly realized if it is reaching that code but the parent is probably not (since the GdkWindow is not set). Maybe that is good enough for a gtk bug report already.

@lukefromdc
Copy link
Member

I found that bottom panel tooltips do in fact work-so long as the mouse is not dragged all the way to the very bottom row of pixels.

@yeezy69
Copy link

yeezy69 commented Jan 22, 2023

Archlinux mate-media 1.26.0-1: Unfortunately, the applet still crashes.

@j6b72
Copy link

j6b72 commented Mar 7, 2023

I also notice this (arch, also 1.26.0-1).

Full log, from start to end (probably only the last few lines are relevant):

(mate-volume-control-status-icon:93422): Gdk-CRITICAL **: 21:15:52.817: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed

(mate-volume-control-status-icon:93422): Gtk-WARNING **: 18:46:41.818: Calling gtk_widget_realize() on a widget that isn't inside a toplevel window is not going to work very well. Widgets must be inside a toplevel container before realizing them.

(mate-volume-control-status-icon:93422): GLib-GObject-CRITICAL **: 18:46:41.818: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(mate-volume-control-status-icon:93422): Gdk-CRITICAL **: 18:46:41.818: gdk_window_get_scale_factor: assertion 'GDK_IS_WINDOW (window)' failed
**
Gtk:ERROR:../gtk/gtk/gtkwidget.c:5875:gtk_widget_get_frame_clock: assertion failed: (window != NULL)
Bail out! Gtk:ERROR:../gtk/gtk/gtkwidget.c:5875:gtk_widget_get_frame_clock: assertion failed: (window != NULL)
Abgebrochen (Speicherabzug geschrieben)

("Abgebrochen (Speicherabzug geschrieben)" is german for "segfault (core dumped)".)

Every time this happens I just resort to starting tmux and running the applet within so I don't have to keep the terminal open, but it's still annoying. Can I do anything to help you solve this faster, like setting certain debug options?

@raveit65
Copy link
Member

raveit65 commented Sep 2, 2023

There are different reasons for crashing the applet.
For all who have a crash when unplug/plug a device please test mate-desktop/libmatemixer#40
and give feedback.

@joakim-tjernlund
Copy link
Author

Added here, time will tell if the crashes are gone.

@raveit65
Copy link
Member

The issue with plug/unplug a device should be solved by mate-desktop/libmatemixer@e9995a7
New 1.26 release is coming.

@vido89
Copy link

vido89 commented Feb 3, 2025

Just happened to me to, I booted my machine from sleep and volume icon is gone. Im using MATE Desktop Environment 1.26.2 LM 22.1

crash.tar.gz

@cwendling
Copy link
Member

@vido89 Looks like you use a version that should include mate-desktop/libmatemixer#40 so maybe there's more to it that that one. Could you install debugging symbols (e.g. libmatemixer0-dbgsym or so) in order to get more information on the issue next time it happens?

In theory with the core dump you posted you should even be able to get a better stack trace without waiting for another crash once you installed the debug symbols, using something like gdb -ex 'bt full' /usr/bin/mate-volume-control-status-icon CoreDump (untested).

@vido89
Copy link

vido89 commented Feb 4, 2025

Hi @cwendling I have installed libmatemixer0-dbgsym but when I run your command I get

No debugging symbols found in /usr/bin/mate-volume-control-status-icon)
/home/slobodan/CoreDump: No such file or directory.

@cwendling
Copy link
Member

@vido89 you can install mate-media-dgbsym as well, but that's probably not really necessary.
The issue is that you don't have the CoreDump file in your home directory: you need to replace CoreDump in my command with the path to the CoreDump file from your linked archive.

@vido89
Copy link

vido89 commented Feb 4, 2025

@cwendling I tried to install mate-media-dgbsym but I could not because it's in conflict in LM 22.1

$ gdb -ex 'bt full' /tmp/mintreport/crash/CoreDump
GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
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"...
"/tmp/mintreport/crash/CoreDump": not in executable format: file format not recognized
No stack.
(gdb)

@cwendling
Copy link
Member

gdb -ex 'bt full' /usr/bin/mate-volume-control-status-icon /tmp/mintreport/crash/CoreDump

@vido89
Copy link

vido89 commented Feb 4, 2025

Im really sorry Im not a developer

gdb -ex 'bt full' /usr/bin/mate-volume-control-status-icon /tmp/mintreport/crash/CoreDump
GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
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 /usr/bin/mate-volume-control-status-icon...

warning: could not find '.gnu_debugaltlink' file for /usr/bin/mate-volume-control-status-icon
(No debugging symbols found in /usr/bin/mate-volume-control-status-icon)

warning: Can't open file /memfd:pulseaudio (deleted) during file-backed mapping note processing

warning: Can't open file /SYSV00000000 (deleted) during file-backed mapping note processing

warning: Can't open file /usr/share/mime/mime.cache (deleted) during file-backed mapping note processing

warning: Can't open file /usr/share/icons/hicolor/icon-theme.cache (deleted) during file-backed mapping note processing
[New LWP 1736]
[New LWP 328940]
[New LWP 1751]
[New LWP 8681]
[New LWP 1753]
[New LWP 1752]

warning: Build-id of /lib/x86_64-linux-gnu/libsystemd.so.0 does not match core file.

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libxapp.so.1

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgdk-3.so.0

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgobject-2.0.so.0

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libglib-2.0.so.0

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libcanberra.so.0

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgmodule-2.0.so.0

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgnomekbdui.so.8

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgnomekbd.so.8

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libbrotlidec.so.1

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libbrotlicommon.so.1

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libcap.so.2

warning: could not find '.gnu_debugaltlink' file for /usr/lib/x86_64-linux-gnu/gtk-3.0/modules/libxapp-gtk3-module.so

warning: could not find '.gnu_debugaltlink' file for /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so

warning: could not find '.gnu_debugaltlink' file for /usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so

warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libpulse.so.0

warning: could not find '.gnu_debugaltlink' file for /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-16.1.so
--Type <RET> for more, q to quit, c to continue without paging--RET
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `mate-volume-control-status-icon'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  on_connection_server_info (connection=<optimized out>, info=0x0, 
    pulse=0x644d6c822af0)
    at /build/libmatemixer-WmJpKp/libmatemixer-1.26.1/backends/pulse/pulse-backend.c:678

warning: 678	/build/libmatemixer-WmJpKp/libmatemixer-1.26.1/backends/pulse/pulse-backend.c: No such file or directory
[Current thread is 1 (Thread 0x74c709a17a80 (LWP 1736))]
#0  on_connection_server_info (connection=<optimized out>, info=0x0, 
    pulse=0x644d6c822af0)
    at /build/libmatemixer-WmJpKp/libmatemixer-1.26.1/backends/pulse/pulse-backend.c:678
        stream = <optimized out>
        name_source = 0x0
        name_sink = 0x0
#1  0x000074c70aee72fa in g_closure_invoke ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#2  0x000074c70af1690c in ?? () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#3  0x000074c70af07591 in ?? () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--RET
#4  0x000074c70af077c1 in g_signal_emit_valist ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#5  0x000074c70af07883 in g_signal_emit ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#6  0x000074c7095eebb5 in pulse_server_info_cb (c=<optimized out>, 
    info=<optimized out>, userdata=0x644d6c8addd0)
    at /build/libmatemixer-WmJpKp/libmatemixer-1.26.1/backends/pulse/pulse-connection.c:1472
        connection = 0x644d6c8addd0
#7  0x000074c709593eb9 in ?? () from /lib/x86_64-linux-gnu/libpulse.so.0
No symbol table info available.
#8  0x000074c7065c06a8 in ?? ()
   from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-16.1.so
No symbol table info available.
#9  0x000074c70bbbd7f8 in ?? ()
   from /lib/x86_64-linux-gnu/libpulse-mainloop-glib.so.0
No symbol table info available.
#10 0x000074c70ade65b5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#11 0x000074c70ae45717 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--RET
#12 0x000074c70ade6f77 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#13 0x000074c70b3feb45 in gtk_main () from /lib/x86_64-linux-gnu/libgtk-3.so.0
No symbol table info available.
#14 0x0000644d40db4a9e in main ()
No symbol table info available.
(gdb) 

@cwendling
Copy link
Member

@vido89 no worries. This pinpoints the issue, which is probably another one that wasn't fixed yet :)

@vido89
Copy link

vido89 commented Feb 4, 2025

@cwendling Ok awesome, I mean with your help I managed to report a bug this is my first, hope it would not be that hard to fix.

cwendling added a commit to mate-desktop/libmatemixer that referenced this issue Feb 4, 2025
Although the documentation isn't very verbose, pactl handles this case
like this, so an NULL info is likely a valid result of this call upon
failure.

Most of the code is actually just copied over from pactl.c itself,
there wasn't much more to it.

Part-of: mate-desktop/mate-media#159
cwendling added a commit to mate-desktop/libmatemixer that referenced this issue Feb 4, 2025
Although the documentation isn't very verbose, pactl handles this case
like this, so a NULL info is likely a valid result of this call upon
failure.

Most of the code is actually just copied over from pactl.c itself,
there wasn't much more to it.

Part-of: mate-desktop/mate-media#159
@cwendling
Copy link
Member

@vido89 here we go: mate-desktop/libmatemixer#41 I'm not entirely sure of the implications as this shows a PulseAudio communication error, but it should at least fix the very issue you saw. If you fancy a challenge (as you're saying you're new to this), you could try and rebuild libmatemixer and test :)

@vido89
Copy link

vido89 commented Feb 4, 2025

@cwendling Oh you fixed it already great ... that was quick. I don't know about rebuilding should I first remove pulse audio with my package manager and then install pulse audio from sources with your fix ?

@cwendling
Copy link
Member

@vido89 don't touch pulseaudio :) my fix is on libmatemixer, which uses pulseaudio.
You won't be able to remove libmatemixer with your package manager without removing other parts of MATE, what you can do is try and build it from sources with my fix and override the system one. At worse, you'll uninstall the source version and fore a reinstall of your distribution's version and you should be back on your feet, in case it overwrote any of its files.

@lukefromdc
Copy link
Member

lukefromdc commented Feb 4, 2025 via email

@cwendling
Copy link
Member

@lukefromdc ouch, I hope you'll be able to get it sorted out. Otherwise we'll see to find a way to get you back in somehow, but hopefully at worse GitHub would help 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants