Skip to content
Snippets Groups Projects
  • George Kiagiadakis's avatar
    340b52fb
    proxy: fix crash that happens when a client exits very quickly after starting · 340b52fb
    George Kiagiadakis authored
    This is very easy to reproduce when the pipewire-alsa integration
    is installed and you do 'arecord -l'; the alsa plugin connects and
    disconnects again before the proxy is ready.
    
    In this case we have to skip remote-global-added and we also have
    to be careful with the references: the global-removed callback is
    called earlier, so the core's reference to the proxy is gone and
    the GTask is the only thing holding a reference to the proxy.
    When we unref the GTask, the proxy is also unrefed, so we have
    to keep an additional reference in order to avoid crashing
    when accessing the hash table below.
    340b52fb
    History
    proxy: fix crash that happens when a client exits very quickly after starting
    George Kiagiadakis authored
    This is very easy to reproduce when the pipewire-alsa integration
    is installed and you do 'arecord -l'; the alsa plugin connects and
    disconnects again before the proxy is ready.
    
    In this case we have to skip remote-global-added and we also have
    to be careful with the references: the global-removed callback is
    called earlier, so the core's reference to the proxy is gone and
    the GTask is the only thing holding a reference to the proxy.
    When we unref the GTask, the proxy is also unrefed, so we have
    to keep an additional reference in order to avoid crashing
    when accessing the hash table below.