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

Disconnection of sound sink crashes GNOME shell #108

Closed
zoqaeski opened this issue Aug 7, 2020 · 7 comments
Closed

Disconnection of sound sink crashes GNOME shell #108

zoqaeski opened this issue Aug 7, 2020 · 7 comments

Comments

@zoqaeski
Copy link

zoqaeski commented Aug 7, 2020

Describe the bug
I have PulseAudio set up so I can reroute audio via my laptop over the network. Upon rebooting my laptop for updates, this extension triggered an error in GNOME that crashed the shell (and by extension, the Wayland session and everything in it). I was not using the network stream for audio at the time.

Extension Information

  • Shell Version: GNOME 3.36.4, Wayland
  • Extension Version: Current version on extensions.gnome.org (installed it yesterday)
  • Install method (extension.gnome.org, AUR etc.) : Installed via extensions.gnome.org
  • OS: Arch Linux

Error / Journal messages

  • Journal messages related to the error / extension.
Aug 07 12:17:10 ganymede pulseaudio[1699]: E: [pulseaudio] module-tunnel.c: Connection failed: Connection refused
Aug 07 12:17:10 ganymede gsd-media-keys[1939]: Unable to get default source
Aug 07 12:17:10 ganymede pulseaudio[1699]: E: [pulseaudio] module-tunnel.c: Connection failed: Connection refused
Aug 07 12:17:10 ganymede gnome-shell[1715]: Device did not have an appropriate card
Aug 07 12:17:11 ganymede gnome-shell[1715]: gvc_mixer_card_get_profile: assertion 'GVC_IS_MIXER_CARD (card)' failed
Aug 07 12:17:11 ganymede kernel: audit: type=1701 audit(1596766631.619:456): auid=1000 uid=1000 gid=1000 ses=3 subj==unconfined pid=1715 comm="gnome-shell" exe="/usr/bin/gnome-shell" sig=6 res=1
Aug 07 12:17:11 ganymede audit[1715]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj==unconfined pid=1715 comm="gnome-shell" exe="/usr/bin/gnome-shell" sig=6 res=1
Aug 07 12:17:11 ganymede gnome-shell[1715]: **
Aug 07 12:17:11 ganymede gnome-shell[1715]: Gvc:ERROR:../gnome-shell/subprojects/gvc/gvc-mixer-control.c:551:gvc_mixer_control_change_profile_on_selected_device: assertion failed: (best_profile)
Aug 07 12:17:11 ganymede gnome-shell[1715]: Bail out! Gvc:ERROR:../gnome-shell/subprojects/gvc/gvc-mixer-control.c:551:gvc_mixer_control_change_profile_on_selected_device: assertion failed: (best_profile)
Aug 07 12:17:11 ganymede gnome-shell[1715]: == Stack trace for context 0x560ba429d460 ==
Aug 07 12:17:11 ganymede gnome-shell[1715]: #0   560ba8477fb0 i   /home/praxidike/.local/share/gnome-shell/extensions/sound-output-device-chooser@kgshank.net/extension.js:57 (12a328205088 @ 25)
Aug 07 12:17:11 ganymede gnome-shell[1715]: #1   560ba8477ef8 i   /home/praxidike/.local/share/gnome-shell/extensions/sound-output-device-chooser@kgshank.net/base.js:281 (12a328205bc8 @ 140)
Aug 07 12:17:11 ganymede gnome-shell[1715]: #2   7ffe2bcb9100 b   self-hosted:1001 (24aef309e4c0 @ 398)
Aug 07 12:17:11 ganymede systemd[1]: Created slice system-systemd\x2dcoredump.slice.
pothos added a commit to pothos/gse-sound-output-device-chooser that referenced this issue Jan 4, 2021
This prevents calling a C function with an old pointer from the JS
timeout callback which then crashes the GNOME Shell.
An upstream fix was also sent in which prevents the crash of GNOME
Shell but still this bug here needs to be fixed.

Fixes kgshank#110 kgshank#108
pothos added a commit to pothos/gse-sound-output-device-chooser that referenced this issue Jan 4, 2021
This prevents calling a C function with an old pointer from the JS
timeout callback which then crashes the GNOME Shell.
An upstream fix was also sent in which prevents the crash of GNOME
Shell but still this bug here needs to be fixed.

Fixes kgshank#110 kgshank#108
@kgshank
Copy link
Owner

kgshank commented Jan 24, 2021

Fixes released

kgshank added a commit that referenced this issue Jan 24, 2021
@pothos
Copy link
Contributor

pothos commented Feb 6, 2021

In the latest version it's still crashing, or rather again. The pointers can't be simply taken and passed around as is and used at any time. The GObject system offers a ref counting mechanism which one can use but I don't know if it also applies to this case here which depends on how the gvc object is currently used and whether GJS exposes this function (g_object_ref).

@kgshank
Copy link
Owner

kgshank commented Feb 7, 2021

@pothos , can you provide more information about the crash. Journal messages, extension installation source etc.

@pothos
Copy link
Contributor

pothos commented Feb 7, 2021

It was the same crash as usual, on the latest version from extensions.gnome.org. I've uninstalled it now and think that's the best to do until this fundamental design issue of how the C pointers are used is solved, sorry.

@kgshank
Copy link
Owner

kgshank commented Feb 7, 2021

@pothos , I understand your point. I need to rewrite the full extension again to achieve that. Let me see how soon it can be done

@kgshank
Copy link
Owner

kgshank commented Mar 24, 2021

@pothos I have removed references to C pointers within the extension. Give a try if you are still interested.

@kgshank kgshank closed this as completed Mar 24, 2021
@pothos
Copy link
Contributor

pothos commented Mar 25, 2021

Thanks for the notification, plan to try it soon :)

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

3 participants