VLC crashes if cairo-dock is installed in karmic alpha 4

Bug #416294 reported by nhasian
62
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Cairo-Dock Core
Invalid
Undecided
Unassigned
Qt
Confirmed
Undecided
Unassigned
VLC media player
Fix Released
High
Rémi Denis-Courmont
qt4-x11 (Ubuntu)
Triaged
Medium
Unassigned
vlc (Ubuntu)
Fix Released
High
Reinhard Tartler

Bug Description

Binary package hint: vlc

using a fresh install of Karmic 64bit Alpha 4 or the latest daily build with either the Karmic Desktop CD or Alternate CD for installations VLC fails to playback any type of video file is cario-dock is installed.

Notes:

1) VLC works normally if installed on a fresh install of Karmic Alpha 4.
2) VLC fails to playback video after the package cairo-dock is installed

tested on HP pavilion laptop with intel CPU & Nvidia GPU and also tested on Toshiba Satelite laptop with Intel CPU & Intel GPU.

Revision history for this message
nhasian (nhasian) wrote :

other people are also experiencing this bug on the ubuntu forums:

http://ubuntuforums.org/showthread.php?t=1235211

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Hello,
I confirm this bug only if this option is enabled : 'Integrate video in interface'
If this option is disabled all works fine !

Changed in vlc (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthieu Baerts (matttbe) wrote :

I think this bug is due to Qt !

If the option 'Integrate video in interface' is enabled and if I launch vlc with this command :

   $ export XLIB_SKIP_ARGB_VISUALS=1 && vlc

All is ok ! (I'm on Karmic Alpha 4 with VLC 1.0.1 Goldeneye)

I propose that the videolan team adds a new bug in Qt tracker bug. We have already informed Qt dev on its forum but without any answer... We notes that there is a bug like this one with SMplayer or VirtualBox...
(I wanted to add a new bug on trac.videolan.org but "Trac is down for maintenance.")

Changed in cairo-dock-core:
status: New → Incomplete
Changed in vlc:
status: New → Confirmed
Fabounet (fabounet03)
Changed in qt:
status: New → Confirmed
Revision history for this message
Tien Nguyen (tienhn) wrote :

I observed the same problem on 9.10 64 bit release. Matthieu's work around fixed the problem.

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Thanks to report (and to insist ;) ) there: http://bugreports.qt.nokia.com/browse/QTBUG-5464 (QT bugs tracker)

Revision history for this message
Fabounet (fabounet03) wrote :

I'll close this bug as it seems not depending on us but on Qt (it happens on every applications using Qt for drawings)
This bug has already been reported numerous times, and should really be fixed asap.
If after investigation in Qt it appears to be CD's fault, thanks to open a new bug report.

Changed in cairo-dock-core:
status: Incomplete → Invalid
Changed in vlc:
assignee: nobody → Rémi Denis-Courmont (rdenis)
Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

For VLC, you can work around the problem by selecting the OpenGL video output provider. Then you don't need to disable embedded video.

Changed in vlc:
milestone: none → 1.1.0
status: Confirmed → Fix Committed
importance: Undecided → High
Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

Qt4-X11 is using ARGB visuals, which seems like a logical thing to do if Cairo-Dock is running. VLC Xvideo and X11 plugins fail to handle this correctly when creating their rendering window. Thus, this is essentially a LibVLC bug.

A trivial work-around is here:
http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=c0ec5be56e71c273eef4faea8d927eeb3cbc7ec5;hp=493ed6ef7ff138e7b93f31e962bb28dfa06d928b

Changed in vlc:
milestone: 1.1.0 → 1.0.4
Revision history for this message
Yann SLADEK (yann-sladek) wrote :

Hi Rémi,

so mean it's an library application bug essentially ?
Because this bug affects every applications using QT4 lib (SMplayer, Virtualbox, Skype, etc...) as mentionned in our Wiki (http://www.cairo-dock.org/ww_page.php?p=Probl%C3%A8mes%20r%C3%A9currents&lang=fr). Regarding your first name, I sent the french link but if I was wring, you can change language in our wiki.

So we need to open a bug for every application impacted ?

Thanks for your reply

Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

For whatever reason, when Cairo-Dock is started Qt4-X11 starts using the ARGB X11 visual, instead of normal RGB. I don't know why, but I assume it's the intended behaviour. Indeed, all Qt4 widgets work fine that way.

VLC breaks because it tries to use a VLC Qt4 plugin video widget directly through X11 (instead of libQt4). There, VLC (1.0 and older) makes an incorrect assumption. It expects that the X11 visual of the Qt4 widget is the same as the visual of the root X11 window. That causes an unexpected error in the X11 protocol. Then, Xlib calls the default error handler, which aborts the VLC process.

Correct mt if I'm wrong. But I believe that the Qt4 API does not provide a way to request a RGB visual instead of ARGB explicitly. So the any application using QWidget::winId has to be ready to handle ARGB visuals. VLC clearly fails here. From the wiki, I infer that Skype has the same bug. For non-Qt4 apps like mplayer, I guess it's a similar problem, though the choice or ARGB is not coming from Qt4-X11.

On the other hand, with an ARGB visual, I am afraid there is no way to use XVideo anymore. At least neither of my XVideo adaptors list the ARGB visual as supported. This means, even if the bug is fixed or worked around in VLC, we cannot use the video overlay anymore, so rendering will be a lot more CPU-demanding.

So in a sense, the proper solution would be for Qt4 to provide a way to disable ARGB for some specific widgets. But to me, this would look more like a new feature than a bug from libQt4.

Changed in vlc (Ubuntu):
assignee: nobody → Reinhard Tartler (siretart)
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Fabounet (fabounet03) wrote :

thanks for your explanations !
It's more tricky than I thought ^_^

So if I understood correctly, using RGBA visuals for video widgets make them fail, so the solution would be to allow to create specifically RGB widgets, which is not possible at the moment because Qt decides by itself if the visual will be RGB or RGBA.
It would explain why Mplayer and Totem works correctly with Cairo-Dock, and also all Qt applications which don't use video like Kate or Konsole, but not VLC or Smplayer.
but then each application should use this new function (or add this new parameter when creating their widget), so we have to report the bug on every Qt applications which use video.

Do your patch (putenv( "XLIB_SKIP_ARGB_VISUALS=1" );) have the same effect as asking Qt to use an RGB visual for the widget ? Would it be applicable for all the impacted applications ?

Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

putenv() makes Xlib hide the ARGB visual. So libQt4 does not see the ARGB visual, hence falls back to RGB regardless of Cairo-Dock. This is a huge hack and not even thread-safe :-( though.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vlc - 1.0.3-1ubuntu2

---------------
vlc (1.0.3-1ubuntu2) lucid; urgency=low

  [ Reinhard Tartler ]
  * don't crash when cairo-dock is running. LP: #416294
    Very ugly patch from upstream to disable ARGB channel usage
    in libqt4
  * enable and install the fb module on Linux systems. Closes: #556228

  [ Whoopie ]
  * enable CDDB in the CDDA module (LP: #439131) and enable
    globalhotkeys module (LP: #439077)
 -- Reinhard Tartler <email address hidden> Sat, 21 Nov 2009 22:11:48 +0100

Changed in vlc (Ubuntu):
status: Triaged → Fix Released
Changed in vlc:
status: Fix Committed → Fix Released
Revision history for this message
harrison.pace@gmail.com (harrison-pace) wrote :

How do I install the latest vlc with fix? Have no idea how to compile :-( PLEASE HELP been googling for 6 hours got no where!

Revision history for this message
Matthieu Baerts (matttbe) wrote :

It's fixed on Ubuntu Lucid.
You can easily find a ppa : https://launchpad.net/~c-korn/+archive/vlc/ with tarball (sources code) if you want.
But if you have a problem with Cairo-Dock, simply check the wiki : http://www.cairo-dock.org/ww_page.php?p=Recurrents%20problems&lang=en

Revision history for this message
Daëavelwyn (daeavelwyn) wrote :

I've the same bug, and Matthieu work around works, so I've reported the bug on QT team bug tracker, I hope it can help.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :
Changed in qt4-x11 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

This is properly fixed in VLC 1.1.0 (no more hacks as in VLC 1.0.4) in any case. It probably still affects other Qt4 apps, at least Skype was mentioned at some point.

Changed in vlc:
milestone: 1.0.4 → 1.1.0
Changed in vlc (Ubuntu):
status: Fix Released → Triaged
Changed in vlc:
status: Fix Released → Fix Committed
Changed in vlc:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.4 KiB)

This bug was fixed in the package vlc - 1.1.0-1ubuntu1

---------------
vlc (1.1.0-1ubuntu1) maverick; urgency=low

  * Merge from Debian unstable, remaining changes:
    - build and install the libx264 plugin
    - add Xb-Npp header to vlc package
    - Add apport hook to include more vlc dependencies in bug reports
  * Drop xulrunner patches.
  * Drop 502_xulrunner_191.diff.

vlc (1.1.0-1) unstable; urgency=low

  [ Christophe Mutricy ]
  * New upstream version 1.1.0 (Closes: #586760, LP: #597108)
    * Fixes many bugs (Closes: #572151, #578917, #526088, #572914, #503377;
      LP: #206152, #261001, #281478, #282215, #282966, #283379, #283855,
      #285681, #287263, #328064, #328861, #346631, #356006, #356908, #357595,
      #358461, #362793, #368599, #375854, #380077, #383443, #403135, #403657,
      #403802, #414069, #415396, #416294, #419915, #422797, #425975, #427247,
      #435225, #439271, #442038, #444795, #453928, #459515, #461443, #465687,
      #466418, #476478, #482440, #491151, #491601, #514915, #517329, #517496,
      #537627, #539406, #542293, #549029, #549902, #550468, #550485, #550599,
      #551482, #553503, #554277, #556440, #560167, #564964, #566347, #568750,
      #570666, #582785, #584009, #586692, #587528)
    * SONAME changes
    * Update symbols files
    * Refresh patches and remove the ones merged upstream
  * rules:
    * Disable projectm and sqlite
    * Upstream Makefile install icons at the good place, simplify debian/rules
    * Specify where to install solids files
    * Install the optim only if present
    * Make sure we have useful build log
  * *.install: reflect new modules path and add new files
  * Add a trigger to generate the modules' cache as root.
  * Update the doc which get installed
  * control:
    * Prefer a recent libdvbpsi
    * add lua5.1 to have luac
    * Add more build-dep: xcb*, dirac, dc1394
  * Patch to allow compilation with xul 1.9.1
  * Remove unneeded -V for dh_makeshlibs
  * Use configure option instead of patching
  * Use dh_bugfiles and update the bug control file
  * Don't advertise deprecated package in vlc's manpage
  * Add some news about lua and zvbi
  * Move the luahttp's .hosts to /etc/vlc

  [ Benjamin Drung ]
  * Switch to dpkg-source 3.0 (quilt) format.
  * Disable portaudio module.
  * Update symbols files.
  * Cleanup clean rule and other parts of debian/rules.
  * Remove default values from git-buildpackage config.
  * Change installation of man pages.
  * Remove unused ${shlibs:Depends}.
  * Sort Build-Depends and Depends.
  * Remove unused libhal-dev from Build-Depends (Closes: #580407).
  * Remove unused --enable-release configure flag.
  * Remove unused Build-Depends libid3tag0-dev, libsysfs-dev, and libxv-dev.
  * Provide VBI teletext plugin (Closes: #563873) - thanks to László
    Benedek <email address hidden> for the patch.
  * Enable atmo, fluidsynth (separate package), libproxy (Closes: #532110),
    kate (Closes: #563464), and mtp plugin.
  * Comment disabled features.
  * Explicitly enable or disable features.
  * Vcs-Browser link to summary page.
  * Convert patch header to DEP-3 and add DEP-3 to 502_xulrunner_191.diff.
  * Add myself to Uploaders.
  * ...

Read more...

Changed in vlc (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Luke (lukekuhn) wrote :

A similar bug affects video playback in the kdenlive video editor-I just filed this report:

https://bugs.launchpad.net/ubuntu/+source/cairo-dock/+bug/729970

Fixing vlc, smplayer, kdenlive, etc to deal with this will work but is the slow, difficult way. It will ultimately need to be fixed either in QT where the but is said to originate or in cairo-dock where it is being invoked. Otherwise every developer of applications using qt will have to test them with cairo-dock and debug this.

Revision history for this message
Fabounet (fabounet03) wrote : Re: [Cairo-dock-team] [Bug 416294] Re: VLC crashes if cairo-dock is installed in karmic alpha 4

actually it's more a bug in gtkglext (but maybe also in Qt)
anyway, GTK and Qt can't live happily togather when an RGBA OpenGL context
is used.
I've made a workaround in the 2.3 though, I'd like to have some feedback
from people experiencing this bug.
Thanks! :-)

2011/3/6 Luke <email address hidden>

> A similar bug affects video playback in the kdenlive video editor-I just
> filed this report:
>
> https://bugs.launchpad.net/ubuntu/+source/cairo-dock/+bug/729970
>
> Fixing vlc, smplayer, kdenlive, etc to deal with this will work but is
> the slow, difficult way. It will ultimately need to be fixed either in
> QT where the but is said to originate or in cairo-dock where it is being
> invoked. Otherwise every developer of applications using qt will have to
> test them with cairo-dock and debug this.
>
> --
> You received this bug notification because you are a member of Cairo-
> Dock Team, which is subscribed to Cairo-Dock Core.
> https://bugs.launchpad.net/bugs/416294
>
> Title:
> VLC crashes if cairo-dock is installed in karmic alpha 4
>
> Status in Cairo-Dock : Core:
> Invalid
> Status in Qt:
> Confirmed
> Status in VLC media player:
> Fix Released
> Status in “qt4-x11” package in Ubuntu:
> Triaged
> Status in “vlc” package in Ubuntu:
> Fix Released
>
> Bug description:
> Binary package hint: vlc
>
> using a fresh install of Karmic 64bit Alpha 4 or the latest daily
> build with either the Karmic Desktop CD or Alternate CD for
> installations VLC fails to playback any type of video file is cario-
> dock is installed.
>
> Notes:
>
> 1) VLC works normally if installed on a fresh install of Karmic Alpha 4.
> 2) VLC fails to playback video after the package cairo-dock is installed
>
> tested on HP pavilion laptop with intel CPU & Nvidia GPU and also
> tested on Toshiba Satelite laptop with Intel CPU & Intel GPU.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~cairo-dock-team
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~cairo-dock-team
> More help : https://help.launchpad.net/ListHelp
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.