We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 495 - PATCH: fix crash with BadAlloc X-error when using yuv overlay on i810 vga
Summary: PATCH: fix crash with BadAlloc X-error when using yuv overlay on i810 vga
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.12
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-28 06:06 UTC by Hans de Goede
Modified: 2007-12-28 18:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans de Goede 2007-09-28 06:06:04 UTC
When running boswars: http://www.boswars.org/ on a machine with intel integrathed graphics it crashes when it tries to play the initial theora splashscreen video:
X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  140 (XVideo)
  Minor opcode of failed request:  19 ()
  Serial number of failed request:  25
  Current serial number in output stream:  26
boswars: xcb_xlib.c:41: xcb_xlib_lock: Assertion `!c->xlib.lock' failed.
Aborted

I recognized this problem from a few years back, when I encountered it while working on the Xv blitter for xmame. The problem is that for some reason creation the Xvport and XvImage succeeds, and failure (lack of resources / hw capability?) is only indicated during the first XvPut[Shm]Image. I've written a patch for SDL using the work around for this I developed for xmame (and which is still used successfully in xmame after many years of usage).

I'll admit it isn't very pretty, but after investigating several possibilities this was the best option, any other fixes would need changes to the SDL api and abi.

I'll attach the patch.
Comment 1 Hans de Goede 2007-09-28 06:11:20 UTC
Ugh, I cannot attach my patch, please get it from the corresponding Fedora bug ticket:
https://bugzilla.redhat.com/show_bug.cgi?id=310841

---

Internal Error

Bugzilla has suffered an internal error. Please save this page and send it to bugmaster@icculus.org with details of what you were doing at the time this message appeared.

URL: http://bugzilla.libsdl.org/attachment.cgi
undef error - Undefined subroutine Fh::slice at data/template/template/en/default/global/hidden-fields.html.tmpl line 58 
Comment 2 Sam Lantinga 2007-12-28 18:24:19 UTC
This patch was checked in with revision 3471.  Thanks!