Opened 12 years ago

Closed 11 years ago

#1499 closed defect (needs_more_info)

x11grab BadCursor

Reported by: ghafil Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: x11grab regression
Cc: Michael Niedermayer, Isaac Dooley Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

FFMPEG recent master/head x11grab input gives BadCursor request, tested on Ubuntu 10.04/11.04/12.04/12.10. Initially we thought this might be a X Window System issue but FFMPEG 0.11.1 work flawlessly on all same distribution without any issue.

How to reproduce:
git clone git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg ; ./configure --arch=x86_64 --enable-avfilter --enable-vdpau --enable-bzlib --enable-pthreads --enable-zlib --disable-stripping --enable-gpl --enable-postproc --enable-swscale --enable-x11grab ; make ; make install
% ffmpeg -f x11grab -r 15 -s 1024x768 -i :0.0 -f flv filename.flv
% ffmpeg -f x11grab -r 15 -s 1024x768 -i :0.0 -vcodec qtrle filename.mov
% ffmpeg -f x11grab -r 15 -s 1024x768 -i :0.0 -vcodec rawvideo screencast.raw

ffmpeg version: N-42091-gf7cba73
Ubuntu 12.10 x86_64

ubuntu@ip-10-17-194-99:~$ ffmpeg -f x11grab -r 15 -s 1024x768 -i :0.0 -f flv filename.flv
ffmpeg version N-42091-gf7cba73 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jul  1 2012 12:31:40 with gcc 4.7.1
  configuration: --arch=x86_64 --enable-avfilter --enable-vdpau --enable-bzlib --enable-pthreads --enable-zlib --disable-stripping --enable-gpl --enable-postproc --enable-swscale --enable-x11grab
  libavutil      51. 63.100 / 51. 63.100
  libavcodec     54. 31.100 / 54. 31.100
  libavformat    54. 14.100 / 54. 14.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     3.  0.100 /  3.  0.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[x11grab @ 0x18dd340] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1024 height: 768
[x11grab @ 0x18dd340] shared memory extension found
X Error of failed request:  BadCursor (invalid Cursor parameter)
  Major opcode of failed request:  142 (XFIXES)
  Minor opcode of failed request:  25 (XFixesGetCursorImageAndName)
  Resource id in failed request:  0x400001
  Serial number of failed request:  14
  Current serial number in output stream:  14

Change History (13)

comment:1 by Carl Eugen Hoyos, 12 years ago

Component: FFmpegundetermined
Description: modified (diff)

Could you test if it works with 219a6fb?

Unrelated:
Is arch=x86_64 necessary? I believe it should not be needed
The following configure options are superfluous afaict:
--enable-avfilter --enable-vdpau --enable-zlib --enable-bzlib --enable-pthreads --enable-postproc --enable-swscale

Last edited 12 years ago by Carl Eugen Hoyos (previous) (diff)

in reply to:  description ; comment:2 by Isaac Dooley, 12 years ago

I can reproduce on Ubuntu 12.10 using the current latest from git(version fef9e84114a2369bb0065f9a3d613e0e9c59d5d5). It only happens when I try to connect to a Xvfb X server. If I connect to the normal X server that is showing up on my physical monitors, the error does not occur.

How I built ffmpeg
./configure --enable-libx264 --enable-x11grab --enable-gpl --enable-nonfree

Create the X server on DISPLAY=:1
Xvfb :1 -screen 0 1920x1080x24

Connect to the X server
ffmpeg -ac 0 -f x11grab -s 1920x1080 -r 30 -i :1.0 -vcodec libx264 -threads 0 ${HOME}/capturedvideoXvfb.avi

Then in the output I see the error message, along with other messages:

X Error of failed request: BadCursor (invalid Cursor parameter)

Major opcode of failed request: 142 (XFIXES)
Minor opcode of failed request: 25 (XFixesGetCursorImageAndName)
Resource id in failed request: 0x200001
Serial number of failed request: 14
Current serial number in output stream: 14

Is there anything I can do to help fix this problem?

in reply to:  2 comment:3 by Isaac Dooley, 12 years ago

My problem seems like it may go away if I launch the metacity window manager in the Xvfb display prior to running ffmpeg.

comment:4 by Carl Eugen Hoyos, 12 years ago

Please provide complete, uncut console output and please test if it works with 219a6fb.

(Unrelated: In your configure line, --enable-nonfree has no positive effect.)

comment:5 by Michael Niedermayer, 12 years ago

if you have a version that works and one that doesnt, please try to bisect (see tools/bisect-create)

comment:6 by Michael Niedermayer, 12 years ago

Cc: Michael Niedermayer added

comment:7 by Carl Eugen Hoyos, 12 years ago

Cc: Isaac Dooley added
Keywords: regression added

The original command line works flawlessly here, if you want this fixed, please try to find the version introducing the problem / test 219a6fb.

comment:8 by Isaac Dooley, 12 years ago

I just tested 219a6fb, and it fails. The output follows. I'll try to either find another version that does work, or try to fix the bug myself and submit a patch.

$ ./ffmpeg -v 100 -an -f x11grab -s 800x600 -r 30 -i :10.0 -vcodec libx264 -threads 2 ${HOME}/capturedvideoXvfb.avi
ffmpeg version N-38847-g219a6fb Copyright (c) 2000-2012 the FFmpeg developers

built on Sep 15 2012 11:27:39 with gcc 4.6.3
configuration: --enable-libx264 --enable-x11grab --enable-gpl --enable-nonfree
libavutil 51. 42.100 / 51. 42.100
libavcodec 54. 10.100 / 54. 10.100
libavformat 54. 2.100 / 54. 2.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 65.100 / 2. 65.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100

[x11grab @ 0x2ccb620] device: :10.0 -> display: :10.0 x: 0 y: 0 width: 800 height: 600
[x11grab @ 0x2ccb620] shared memory extension found
X Error of failed request: BadCursor (invalid Cursor parameter)

Major opcode of failed request: 142 (XFIXES)
Minor opcode of failed request: 25 (XFixesGetCursorImageAndName)
Resource id in failed request: 0x200001
Serial number of failed request: 14
Current serial number in output stream: 14

Last edited 12 years ago by Isaac Dooley (previous) (diff)

in reply to:  8 ; comment:9 by Carl Eugen Hoyos, 12 years ago

Replying to idooley:

I just tested 219a6fb, and it fails. The output follows. I'll try to either find another version that does work, or try to fix the bug myself and submit a patch.

This ticket is about a problem that is not reproducible with 0.11.1. Can you confirm that it works for you with 0.11.1?

in reply to:  9 ; comment:10 by Isaac Dooley, 12 years ago

Replying to cehoyos:

Replying to idooley:

I just tested 219a6fb, and it fails. The output follows. I'll try to either find another version that does work, or try to fix the bug myself and submit a patch.

This ticket is about a problem that is not reproducible with 0.11.1. Can you confirm that it works for you with 0.11.1?

I get an error in 0.11.1. Thus I guess I have a different problem than the submitter. I do have a fix for my problem however. I'll open a separate trac ticket for my problem and post the patch there. Here is the output I get when using 0.11.1 that I compiled from the source tarball:

$ ./ffmpeg -an -f x11grab -s 800x600 -r 30 -i :10.0 -vcodec libx264 -threads 1 ${HOME}/capturedvideoXvfb.avi
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers

built on Sep 15 2012 14:48:09 with gcc 4.6.3
configuration: --enable-network --enable-protocol=tcp --enable-libx264 --enable-x11grab --enable-gpl
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100

[x11grab @ 0x1614360] device: :10.0 -> display: :10.0 x: 0 y: 0 width: 800 height: 600
[x11grab @ 0x1614360] shared memory extension found
X Error of failed request: BadCursor (invalid Cursor parameter)

Major opcode of failed request: 142 (XFIXES)
Minor opcode of failed request: 25 (XFixesGetCursorImageAndName)
Resource id in failed request: 0x200001
Serial number of failed request: 14
Current serial number in output stream: 14

in reply to:  10 comment:11 by Isaac Dooley, 12 years ago

Replying to idooley:

Replying to cehoyos:

Replying to idooley:

I just tested 219a6fb, and it fails. The output follows. I'll try to either find another version that does work, or try to fix the bug myself and submit a patch.

This ticket is about a problem that is not reproducible with 0.11.1. Can you confirm that it works for you with 0.11.1?

I get an error in 0.11.1. Thus I guess I have a different problem than the submitter. I do have a fix for my problem however. I'll open a separate trac ticket for my problem and post the patch there. Here is the output I get when using 0.11.1 that I compiled from the source tarball:

$ ./ffmpeg -an -f x11grab -s 800x600 -r 30 -i :10.0 -vcodec libx264 -threads 1 ${HOME}/capturedvideoXvfb.avi
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers

built on Sep 15 2012 14:48:09 with gcc 4.6.3
configuration: --enable-network --enable-protocol=tcp --enable-libx264 --enable-x11grab --enable-gpl
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100

[x11grab @ 0x1614360] device: :10.0 -> display: :10.0 x: 0 y: 0 width: 800 height: 600
[x11grab @ 0x1614360] shared memory extension found
X Error of failed request: BadCursor (invalid Cursor parameter)

Major opcode of failed request: 142 (XFIXES)
Minor opcode of failed request: 25 (XFixesGetCursorImageAndName)
Resource id in failed request: 0x200001
Serial number of failed request: 14
Current serial number in output stream: 14

I've opened Ticket #1738 for my problem, since it is different than this one. That ticket has one possible fix.

comment:12 by Michael Niedermayer, 11 years ago

I cannot reproduce this issue on ubuntu neither with the default X11 server nor with Xvfb

comment:13 by Carl Eugen Hoyos, 11 years ago

Resolution: needs_more_info
Status: newclosed

Ticket #1738 was fixed, if this bug (x11grab works with 0.11.1 but not some later version) is still reproducible with current git head (or a supported release), please reopen (and please consider testing 219a6fb).

Note: See TracTickets for help on using tickets.