Skip to content

mixer-stream: handle portless streams during profile transitions#1

Closed
PhilBrk8 wants to merge 1 commit intoGNOME:masterfrom
PhilBrk8:fix-null-ports-crash
Closed

mixer-stream: handle portless streams during profile transitions#1
PhilBrk8 wants to merge 1 commit intoGNOME:masterfrom
PhilBrk8:fix-null-ports-crash

Conversation

@PhilBrk8
Copy link

@PhilBrk8 PhilBrk8 commented Jan 25, 2026

Summary

  • Guard against NULL ports in gvc_mixer_stream_get_port()
  • Log a debug message and return NULL instead of asserting
  • Prevents GNOME session crashes during Bluetooth profile switches

Background

When WirePlumber switches Bluetooth profiles (A2DP ↔ HFP),
the stream can be in a transient state where stream->priv->ports is NULL.
GVC currently asserts on this, which crashes gsd-media-keys and gnome-shell.

Fix

Make gvc_mixer_stream_get_port() tolerant of NULL ports and
return NULL with a debug log instead of aborting.

Cross‑reference

Companion mitigation in WirePlumber PR:
PipeWire/wireplumber#16
This defers profile switching until EnumRoute data is available, reducing the likelihood of the portless transient state.

Test plan

  • Not run: libgnome-volume-control is intended as a subproject.
  • Validate via parent project (e.g., gnome-settings-daemon) and by switching Bluetooth profiles in GNOME Settings.

@gnomesysadmins
Copy link

Thank you for contributing to libgnome-volume-control!

libgnome-volume-control uses GitLab for code review. As such we have forwarded
your contribution to the GNOME official GitLab instance:

https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/issues/38

GNOME's GitLab instance also supports GitHub as one of the possible
authentication method in case you'd like to follow up on the above
issue. You can login at the following URL:

https://gitlab.gnome.org/users/sign_in

If you are interested in sticking around within the GNOME community we
encourage you to read the following documents:

https://www.gnome.org/get-involved
and
https://wiki.gnome.org/Newcomers

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

Successfully merging this pull request may close these issues.

2 participants