[vlc-devel] [PATCH 00/13] Execute medialib queries out of the UI thread

Rémi Denis-Courmont remi at remlab.net
Tue Nov 24 16:27:00 CET 2020


Le mardi 24 novembre 2020, 09:07:00 EET Steve Lhomme a écrit :
> On 2020-11-23 21:09, Rémi Denis-Courmont wrote:
> > Le lundi 23 novembre 2020, 18:30:14 EET Romain Vimont a écrit :
> >> Currently, the Qt interface for medialibrary executes database queries
> >> from
> >> the UI thread. As a consequence, every I/O blocking results in a freeze
> >> of
> >> the whole VLC interface.
> > 
> > Strictly speaking, local I/O never blocks, but whatever.
> > 
> >> In practice, on my computer, during medialibrary
> >> indexation, it is common that VLC is frozen for tens of seconds (e.g. 45
> >> seconds) on scrolling or click on a tab.
> > 
> > Well my experience is that, if I enable the media library, VLC crashes
> > immediately because of some demuxer bug. This is totally unacceptable.
> > 
> > The root cause bug is most likely in an underlying library (and possibly
> > failure of Debian to update), caused by a file in one of the standard
> > media
> > directory. Still, for the sake of reliability, it is totally insane and
> > unacceptable that VLC crashes just because of a bug in a demuxer triggered
> > by a file that is neither being played and in a directory that was not
> > explicitly added.
> 
> One good reason never to put any abort() in the code, either in the core
> or modules.

It's the other way around. It's a good reason to put assertions and aborts, 
which are easier to debug than crashes, live loops and lock-ups. But that's 
irrelevant here because my specific problem is crashing in a library.

> > If this hits one out of a dozen of devs, how many million users will have
> > VLC crash straight away?
> 
> The "crash" may just be an assert for developers. Regular users will not
> see it (depending how the error is handled).

I don't think Debian enables assertions in their library builds (and VLC 
contribs typically don't either).

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list