SDL_CreateTexture seg fault when low video RAM

I’m getting a Sementation fault when calling SDL_CreateTexture when I limit video memory in the BIOS to 8mb. I know it’s a ridiculously low amount of memory, but it’s not an excuse for SDL to crash; returning an error would be preferable.

my code:

SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_TARGET, 1024, 768);

Code works as expected when video RAM is set to 32mb+. Is it another bug?

Sure you are checking the return value isn’t/is NULL?

There is no return value, since it doesn’t return, it causes a seg fault, crashing the whole system.

The only thing I can think is happening (as there are failure checks) is that an infinite loop is happening if a supported format is not found

Wouldn’t an infinite loop cause a hang and not a crash?

Nitpicking, sure, but it does make me curious.On Sat, Sep 12, 2015 at 5:02 AM, MrTAToad wrote:

The only thing I can think is happening (as there are failure checks) is
that an infinite loop is happening if a supported format is not found


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

If the infinite loop is eating stack space it will crash real quickly.On Saturday 19 September 2015 06:54:43 Raymond Jennings wrote:

Wouldn’t an infinite loop cause a hang and not a crash?

Nitpicking, sure, but it does make me curious.

On Sat, Sep 12, 2015 at 5:02 AM, MrTAToad wrote:

The only thing I can think is happening (as there are failure checks) is
that an infinite loop is happening if a supported format is not found


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