[SDL] Trying to understand why SDL_GetRGB() crashes

Edward Byard e_byard at yahoo.co.uk
Wed Aug 15 03:47:44 PDT 2007


Can you post some code for us to look at?

----- Original Message ----
From: Maarten Engels - Visual Productions <m.engels at visualproductions.nl>
To: sdl at lists.libsdl.org
Sent: Wednesday, 15 August, 2007 11:44:12 AM
Subject: [SDL] Trying to understand why SDL_GetRGB() crashes

Dear All,

I keep running into situations where SDL_GetRGB() crashes my app (SIGSEGV).
I don't understand why the call would crash; perhaps you can enlighten me
with your ideas. 

Let's assume that all 4 pointer arguments are correct; I've checked this
over and over again.
If the first 'pixel' argument is invalid then I would expect incorrect
results, but no crash.
I use the call on surfaces that I have previously loaded with images from
disk via IMG_Load().
It might have something to do with (BMP) images with indexed colours; it
doesn't seem to happen with 24 bitmaps.

I use:
- SDL-1.2.11
- mingw
- ms vista

Thanks,
Maarten Engels

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org







      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070815/d9eaea5d/attachment.htm 


More information about the SDL mailing list