<html><head></head><body>Hi,<br><br>Patch makes sense, but does the dispatched-to thread ever wait directly or indirectly on the input thread to end? If so, this might trigger a deadlock.<br><br>Note that with or without the patch, depending on an unknown thread to exist to run an access is a bad idea. I tried that approach with the PulseAudio input and it lead to intractable deadlocks with the output. Also, if a LibVLC app has no such thread, then nothing good can happen.<br><br><div class="gmail_quote">Le 20 janvier 2019 05:36:26 GMT+02:00, Marvin Scholz <epirat07@gmail.com> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Destruction of qtsound objects was dispatched async to the main thread,<br>this causes a race so that the qtsound objects can still be around when<br>the actual VLC objects those rely on are already gone (because Close was<br>already left), causing weird crashes.<br><br>Ref CD 0ee7a644-041f-453d-a196-7cdd75acaf3b<hr> modules/access/qtsound.m | 6 +++---<br> 1 file changed, 3 insertions(+), 3 deletions(-)<br><br>diff --git a/modules/access/qtsound.m b/modules/access/qtsound.m<br>index 533d6e81344..ab44e12d777 100644<br>--- a/modules/access/qtsound.m<br>+++ b/modules/access/qtsound.m<br>@@ -504,9 +504,9 @@ static void Close(vlc_object_t *p_this)<br>         demux_t *p_demux = (demux_t*)p_this;<br>         demux_sys_t *p_sys = p_demux->p_sys;<br> <br>-        [p_sys->session performSelectorOnMainThread:@selector(stopRunning) withObject:nil waitUntilDone:NO];<br>-        [p_sys->audiooutput performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];<br>-        [p_sys->session performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];<br>+        [p_sys->session performSelectorOnMainThread:@selector(stopRunning) withObject:nil waitUntilDone:YES];<br>+        [p_sys->audiooutput performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:YES];<br>+        [p_sys->session performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:YES];<br> <br>         free(p_sys);<br>     }</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>