Opened 4 years ago

Closed 4 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, idooley Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by cehoyos)

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 Changed 4 years ago by cehoyos

  • Component changed from FFmpeg to undetermined
  • 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 4 years ago by cehoyos (previous) (diff)

comment:2 in reply to: ↑ description ; follow-up: Changed 4 years ago by idooley

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?

comment:3 in reply to: ↑ 2 Changed 4 years ago by idooley

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 Changed 4 years ago by cehoyos

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 Changed 4 years ago by michael

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

comment:6 Changed 4 years ago by michael

  • Cc michael added

comment:7 Changed 4 years ago by cehoyos

  • Cc idooley 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 follow-up: Changed 4 years ago by idooley

edit: Please ignore this comment. I accidentally ran the wrong version.

Version 1, edited 4 years ago by idooley (previous) (next) (diff)

comment:9 in reply to: ↑ 8 ; follow-up: Changed 4 years ago by 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?

comment:10 in reply to: ↑ 9 ; follow-up: Changed 4 years ago by 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

comment:11 in reply to: ↑ 10 Changed 4 years ago by idooley

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 Changed 4 years ago by michael

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

comment:13 Changed 4 years ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from new to closed

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.