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 755 - SDL_DisplayFormatAlpha() crashes
Summary: SDL_DisplayFormatAlpha() crashes
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.13
Hardware: x86 Linux
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-15 15:36 UTC by Sjors Gielen
Modified: 2009-06-15 16:13 UTC (History)
0 users

See Also:


Attachments
Testcase (1.74 KB, text/x-csrc)
2009-06-15 15:38 UTC, Sjors Gielen
Details
Sample file with which this bug occurs (8.27 KB, image/x-ms-bmp)
2009-06-15 15:39 UTC, Sjors Gielen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sjors Gielen 2009-06-15 15:36:17 UTC
I am using SDL_DisplayFormatAlpha() on a surface just previously loaded from a BMP file. I will attach the test case and the BMP image I am using. It is 8 bpp. What I was trying to do in my main application, was set the alpha color key to 0, because that's the color of the "background" which I want transparent. Then I called SDL_DisplayFormatAlpha to get a nice 32-bpp image with alpha value which I could use to blit over my screen.
However, I noticed SDL_DisplayFormatAlpha kept crashing so I wrote a test case. The segfault has been confirmed by two other people.
Comment 1 Sjors Gielen 2009-06-15 15:38:49 UTC
Created attachment 330 [details]
Testcase
Comment 2 Sjors Gielen 2009-06-15 15:39:23 UTC
Created attachment 331 [details]
Sample file with which this bug occurs
Comment 3 Sjors Gielen 2009-06-15 16:13:03 UTC
Oops, this is caused by not calling SDL_SetVideoMode(). Added a note on this to the docwiki so it doesn't bite others... http://www.libsdl.org/cgi/docwiki.cgi/SDL_DisplayFormatAlpha