Comment 84 for bug 805303

Revision history for this message
Aurélien Gâteau (agateau) wrote :

>> Correct me if I wrong but this call is happening from the Qt libraries, not
>> from the VLC itself.
>
> That is why it is a bug. The only safe place to call putenv() is early in the
> VLC main() function, before any thread is created. In practice, the VLC code
> base has long since been audited and all setenv(), unsetenv() and putenv()
> calls removed. VLC versions 1.1.0 and later actively prevent libraries from
> modifying its environment as this is a known cause of crashes; that's why you
> see the "Blocked: ..." error message.
>
>> Does that mean VLC initializes the UI in a different thread?
>
> Different thread than... ? Anyway, calling putenv() is not thread-safe in any
> case on glibc, regardless of which thread calls it: glibc does not protect the
> environment against concurrent accesses, so putenv() can crash a concurrent
> *env() function call from another thread.

In this case putenv() and getenv() calls for LIBOVERLAY_SCROLLBAR are done from
the same thread (the one running the GUI event loop) so it would not cause any
problem.

Anyway, I think our only solution for Oneiric is to do what pablomme suggested
in comment #75.

https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/805303/comments/75