<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 --- - crash in module-combine-sink adjust_rates"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=73692">73692</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>crash in module-combine-sink adjust_rates
          </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>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>daniel@lbers.com
          </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>modules
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=92212" name="attach_92212" title="module-combine-sink: fix segfault">attachment 92212</a> <a href="attachment.cgi?id=92212&action=edit" title="module-combine-sink: fix segfault">[details]</a></span>
module-combine-sink: fix segfault

Pulseaudio often crashes here when pavucontrol is running.

Program received signal SIGSEGV, Segmentation fault.
adjust_rates (u=0x7cf7b0) at modules/module-combine-sink.c:219
219             uint32_t current_rate = o->sink_input->sample_spec.rate;

(gdb) p *o
$1 = {userdata = 0x7cf7b0, sink = 0x807880, sink_input = 0x0,
ignore_state_change = false, inq = 0x804780, outq = 0x8047b0,
inq_rtpoll_item_read = 0x0, inq_rtpoll_item_write = 0x0, outq_rtpoll_item_read
= 0x0, outq_rtpoll_item_write = 0x0, memblockq = 0x8047e0, total_latency = 0,
max_request = {value = 0}, requested_latency = {value = 0}, next = 0x0, prev =
0x0}

(gdb) p o->sink_input
$2 = (pa_sink_input *) 0x0

(gdb) list
214
215         base_rate = u->sink->sample_spec.rate;
216
217         PA_IDXSET_FOREACH(o, u->outputs, idx) {
218             uint32_t new_rate = base_rate;
219             uint32_t current_rate = o->sink_input->sample_spec.rate;
220
221             if (!o->sink_input ||
!PA_SINK_IS_OPENED(pa_sink_get_state(o->sink)))
222                 continue;
223


Putting the check in line 221f before the assignment in 219 seems to fix this.</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>