<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - crashes if XDG_RUNTIME_DIR is empty on non-existant"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=57280">57280</a>
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>crashes if XDG_RUNTIME_DIR is empty on non-existant
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bluewind@xinu.at
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>clients
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr></table>
      <p>
        <div>
        <pre>mpd, mplayer and pavucontrol crash in libpulse.so if XDG_RUNTIME_DIR is empty
or the path it points to doesn't exist.

I'm running Arch Linux with pulseaudio 2.99.2

Backtraces below

flo@Marin ~ > XDG_RUNTIME_DIR=/foo backtrace pavucontrol
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3400.2-gdb.py",
line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Failed to create secure directory (): No such file or directory
*** glibc detected *** /usr/bin/pavucontrol: double free or corruption (out):
0x00000000008666b0 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x798a6)[0x7ffff4f338a6]
/usr/lib/libpulse.so.0(pa_xfree+0x2e)[0x7ffff59cd12e]
/usr/lib/pulseaudio/libpulsecommon-2.99.so(pa_get_runtime_dir+0x132)[0x7ffff11fca52]
/usr/lib/pulseaudio/libpulsecommon-2.99.so(+0x25e40)[0x7ffff11fce40]
/usr/lib/libpulse.so.0(+0xea9d)[0x7ffff59a3a9d]
/usr/lib/libpulse.so.0(pa_context_connect+0x238)[0x7ffff59a5a58]
/usr/bin/pavucontrol[0x4269d5]
/usr/bin/pavucontrol[0x40e310]
/usr/lib/libc.so.6(__libc_start_main+0xf5)[0x7ffff4edb725]
/usr/bin/pavucontrol[0x40e699]
--- removed memory mapping info ---

flo@Marin ~ > XDG_RUNTIME_DIR=/ backtrace pavucontrol   
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3400.2-gdb.py",
line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Failed to create secure directory (): Permission denied

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4f339e3 in malloc_consolidate () from /usr/lib/libc.so.6
#0  0x00007ffff4f339e3 in malloc_consolidate () from /usr/lib/libc.so.6
#1  0x00007ffff4f34ba7 in _int_malloc () from /usr/lib/libc.so.6
#2  0x00007ffff4f36e50 in malloc () from /usr/lib/libc.so.6
#3  0x00007ffff4edc431 in __gconv_open () from /usr/lib/libc.so.6
#4  0x00007ffff4edbdfa in iconv_open () from /usr/lib/libc.so.6
#5  0x00007ffff59c82a5 in ?? () from /usr/lib/libpulse.so.0
#6  0x00007ffff11f6aa5 in pa_cstrerror () from
/usr/lib/pulseaudio/libpulsecommon-2.99.so
#7  0x00007ffff1213ba7 in ?? () from /usr/lib/pulseaudio/libpulsecommon-2.99.so
#8  0x00007ffff1214036 in pa_socket_client_new_sockaddr () from
/usr/lib/pulseaudio/libpulsecommon-2.99.so
#9  0x00007ffff12141b1 in pa_socket_client_new_unix () from
/usr/lib/pulseaudio/libpulsecommon-2.99.so
#10 0x00007ffff1214f4d in pa_socket_client_new_string () from
/usr/lib/pulseaudio/libpulsecommon-2.99.so
#11 0x00007ffff59a4fd5 in ?? () from /usr/lib/libpulse.so.0
#12 0x00007ffff59a5903 in pa_context_connect () from /usr/lib/libpulse.so.0
#13 0x00000000004269d5 in ?? ()
#14 0x000000000040e310 in ?? ()
#15 0x00007ffff4edb725 in __libc_start_main () from /usr/lib/libc.so.6
#16 0x000000000040e699 in ?? ()
#17 0x00007fffffffda78 in ?? ()
#18 0x0000000000000000 in ?? ()</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>