[SDL] Handling a large number of image files
Alvin
alvinbeach at gmail.com
Mon May 14 16:19:08 PDT 2007
On Monday 14 May 2007 18:57:43 Tom Davies wrote:
> Thanks for the tips. I am playing around with IMG_ReadXPMFromArray, and so
> far
> everything compiles okay but it crashes as soon as I call that function and
> I can't
> figure out why. I will continue to play around with it and try and debug
> the problem
> though. Thanks!
I had this same problem with SDL_image and IMG_ReadXPMFromArray. I had to
revert to version 1.2.4. I use openSUSE, so the exact version I had to revert
to is 1.2.4-16.
I cannot recall the exact details of the problem, but I do remember that
IMG_ReadXPMFromArray calls another function that does all the work
(IMG_ReadXPMFromArray is just a wrapper). Anyway, the "other" function that
is called is called with NULL as its 2nd parameter. The 2nd parameter is then
used with RWops which is where the crash comes from.
With SDL_image 1.2.4, the implementation of this "other" function is different
and so the 2nd parameter being NULL doesn't cause a crash.
Well, having said all this I decided not to be so lazy, so I checked
SDL_image's SVN. Sure enough, it looks like icculus (Ryan G?) fixed the bug
in February 2007. Try upgrading your version of SDL_image. If that doesn't
work and you do not want to install from SVN (i.e. want distro RPMs), then
you can try to downgrade to SDL_image version 1.2.4.
Alvin
More information about the SDL
mailing list