GNOME Bugzilla – Bug 354698
[xvimagesink] fails to handle BadAllocs caused by creation of over-size overlays.
Last modified: 2009-01-06 11:36:46 UTC
Steps to reproduce: 1. Find a machine using Xorg's i810 driver. 2. Try to create an xvimagesink oversize for your current resolution. For example, my current resolution is 1024x768. So I run: gst-launch-0.10 videotestsrc ! video/x-raw-yuv,height=1024,width=768 ! xvimagesink Stack trace: $ gst-launch-0.10 videotestsrc ! video/x-raw-yuv,height=1024,width=768 ! xvimagesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 141 (XVideo) Minor opcode of failed request: 19 () Serial number of failed request: 49 Current serial number in output stream: 50 Other information: This issue occurs on only some drivers I have tested. nVidia cards it doesn't occur on, and some ATI cards it doesn't occur on. Almost all upstream Xorg drivers I have tested it does occur on. I originally found this bug via totem in Ubuntu, and the archived discussion and trackdown can be found at: https://launchpad.net/distros/ubuntu/+source/totem/+bug/39050
*** Bug 356347 has been marked as a duplicate of this bug. ***
Created attachment 79616 [details] [review] Proposed patch to catch BadAlloc on image creation Please try that patch. I can't reproduce your problem but i suppose that some drivers are behaving differently and throwing a bad alloc instead of allocating the maximum image size they support.
From the distribution bug: "That's a no-go. I added the upstream patch into the debian/patches directory, and did a "debuild binary", and installed both the new -plugins-base and -x packages. $ strings /usr/lib/gstreamer-0.10/libgstxvimagesink.so | grep "triggered an XError" xvimagesink triggered an XError. error: %s $ gst-launch-0.10 videotestsrc ! video/x-raw-yuv,height=1024,width=768 ! xvimagesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 141 (XVideo) Minor opcode of failed request: 19 () Serial number of failed request: 49 Current serial number in output stream: 50"
I would need a --gst-debug=xvimagesink:5 output log file please. Thanks
Created attachment 79982 [details] Results from crash test-case with patch applied. I ran the crash test-case with the patch applied. Here is the resulting log as requested.
This crash is indicating that the Xserver is happily handing out a frame of the required size, but failing later when we actually go to call XvShmPutImage to upload the frame. Looks like an Xserver bug to me.
Created attachment 86324 [details] result of totem --gst-debug=xvimagesink:5 I have no idea if it can be of help, but this is what I get on stock Totem 2.18.1 with a 1280x800 i915 computer trying to view a 1280x1024 video.
*** Bug 428616 has been marked as a duplicate of this bug. ***
*** Bug 362228 has been marked as a duplicate of this bug. ***
*** Bug 356016 has been marked as a duplicate of this bug. ***
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 351784 ***