JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
giga30
Blank Cone
Blank Cone
Posts: 12
Joined: 30 Jul 2008 19:05

JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

Postby giga30 » 11 Feb 2009 20:27

Hi All:

I wrote a Java application using jVLC which throws the following exception and crashes.

Code: Select all

[????????] x11 video output error: X11 request 141.19 failed with error code 9: BadDrawable (invalid Pixmap or Window parameter) X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) Major opcode of failed request: 141 (XVideo) Minor opcode of failed request: 19 () Resource id in failed request: 0x3800006 Serial number of failed request: 19623 Current serial number in output stream: 19624
Wondering if you have seen this? The first media/video plays fine and the moment I try to choose another video I get this exception and the Java application crashes. (Every time I choose another media to play my Java application launches a new JVLC window)

This is on Ubuntu 8.10 intrepid based on kernel 2.6.27.11, vlc 0.9.4, jvlc-core-0.9.0-SNAPSHOT-20080727.jar and Java 6.

(By the way I had to create a soft link under /usr/lib libvlc.so.0.0.2 -> libvlc.so.2.0.2 to get this working; without this I was getting an error about no finding libvlc_new)

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

Postby Rémi Denis-Courmont » 11 Feb 2009 20:44

Is 0x3800006 the ID of your drawable? Xlib will crash if you destroy its parent drawable. Hardly anything to do about that. You must not destroy the drawable before the media player instance is destroyed.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

giga30
Blank Cone
Blank Cone
Posts: 12
Joined: 30 Jul 2008 19:05

Re: JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

Postby giga30 » 17 Feb 2009 21:05

Remi,
I do not know what causes this - I amnot doing anything in my code to do this. Can you give more info on what I can do to findout more about which is causing this problem? Or can you tell what I should not be doing in my Java app - like should I not call release() ? Thanks!

giga30
Blank Cone
Blank Cone
Posts: 12
Joined: 30 Jul 2008 19:05

Re: JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

Postby giga30 » 18 Feb 2009 23:25

Hi All:
My Java application is based on the JVLC sample. The PlayList interface is not working for me and so I throw away the JVLC canvas and recreate a new one to play another video. This is when I hit the issue.

Remi - my code is not destroying drawable.

I would greatly appreciate any comments or pointers.
Thanks
G

giga30
Blank Cone
Blank Cone
Posts: 12
Joined: 30 Jul 2008 19:05

Re: JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

Postby giga30 » 19 Feb 2009 01:58

I searched and found viewtopic.php?f=32&t=53499&p=174924&hil ... le#p174924
which indicates that this error could be related to the implementation itself.

Can VLC developers shed any light?

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

Postby Rémi Denis-Courmont » 20 Feb 2009 18:13

Which drawable is causing the failure? The one you gave to VLC, or the one VLC created within your own?
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

giga30
Blank Cone
Blank Cone
Posts: 12
Joined: 30 Jul 2008 19:05

Re: JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

Postby giga30 » 22 Feb 2009 17:43

Remi, since this is a Java application I do not understand your question completely. Here is what I do:
1. Create an instance using " jvlc = new JVLC(...)"
2. Create an awt canvas
3. allow jvlc to paint on canvas using "jvlc.setVideoOutput(canvas);"
These 3 steps happen whenever I attempt to play new video (as playList interface does not work for me I am following this approach as a work around)

As I get an error with "drawable" in it I am guessing that it is from the one VLC created - if not I should have seen a Java exception with references to "canvas" or other awt components.

I will try to simplify my application to create a reproducible test case and then update this post.
Thanks!

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

Postby Rémi Denis-Courmont » 22 Feb 2009 18:34

To embed a video, you need to give VLC the ID of an active window in the X Window system. VLC then creates its own window within that window.
If you don't give a window at all, then VLC creates a new window on the desktop named "VLC (XVideo output)".

From the error message, it looks like either you've given an invalid window ID, or you've destroyed the window before VLC was done using it.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

bentium
New Cone
New Cone
Posts: 6
Joined: 22 Dec 2008 11:35

Re: JVLC on Ubuntu throwing BadDrawable(after fixing libvlc_new)

Postby bentium » 27 Mar 2009 11:08

i also get these baddrawable errors (+ java crash) in my application.
The drawable id is correct and it is not removed or disposed.

It even happens when i press the "stop" button.

I'm using:
opensuse 10.1 or ubuntu 8.04
QT4.4.3
vlc 0.9.3
latest jvlc


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 33 guests