[vlc-devel] Crash in vlc_cancel while input/rtp creation

Rémi Denis-Courmont remi at remlab.net
Fri Mar 12 11:52:01 CET 2010

On Fri, 12 Mar 2010 10:01:13 +0100, Sébastien Escudier
<sebastien-devel at celeos.eu> wrote:
> I have a race condition bug where vlc_cancel(thread id=0) is called on a
> thread
> being created at the same time.
> I would like to know how this is supposed to be avoided ?
> I thought I could call vlc_savecancel before thread creation but I don't
> see it
> anywhere else so it must not be the solution.
> The bug is happening when input thread is opening a rtp stream output
> module.
> The thread is created in rtp.c Add function.
> And at the same time input is destroyed and the thread is cancelled in
> input_Stop -> ObjectKillChildrens

Yeah that sucks. ObjectKillChildrens() is a brittle hack.

In this case, we could simply replace vlc_thread_create()/vlc_object_kill()
with vlc_clone()/vlc_cancel() in the RTP output plugin to avoid

Rémi Denis-Courmont

More information about the vlc-devel mailing list