General Category > Help and troubleshooting

[solved] .PNG loading error


Posted for future reference.

thanks to barra, sleek, and GreyGhostNew for your assistance earlier, especially sleek, who'd seen a similar error and led me to find that, sure enough, my IMG_Load_RW function was returning null. That tipped me off and upon looking in the sourcecode for SDL_image itself, that function literally had one line....

--- Code: ---return NULL;
--- End code ---

which explained a whole lot. I did a quick "emerge --sync" and found a new release of both sdl and sdl image was available, after installing them all problems magically went away.

edit: to clarify after further inspection, the blank "IMG_LoadPNG_RW" that returns null seems to still exist, but there's a second function of the same name that actually works.

Thanks for the pointer Raptor85 :-)

Which SDL versions did you run before updating? Would be interesting as I could update the build dependencies article with correct minimum version numbers this way.

my libsdl was 1.2.11 and im unsure what my sdl-image was. I upgraded to 1.2.13 with sdl-image 1.2.6-r1 . I don't know why it was calling the "return null" version of the function in .11, probably a bug in that release. I don't particularly feel like breaking my SDL install just to find out though :)  Really strange that error it was throwing though, made it appear to be some sort of libpng error or conflict when it was SDL all along.


[0] Message Index

Go to full version