Stupid Segfaults (mods, Delete The Other One)


Mudi

You're pushing your luck little man
Joined
Jan 25, 2006
Messages
815
Website
mudiweb.com
(hey mods, I edited the other one to indicate it was in the wrong forum, delete IT not this one please :) )

Does anyone want to tell me why
Code:
ret = SDL_CreateRGBSurface(SDL_SWSURFACE,512,288,32,0xff0000,0x00ff00,0x0000ff,0x0);
is segfaulting? There is no reason for it at all that I can see. Especially when calling
Code:
tmp = SDL_CreateRGBSurface(SDL_SWSURFACE,32,18,32,0xff0000,0x00ff00,0x0000ff,0x0);
a few lines above provides no trouble whatsoever.

That first line segfaults both on my PC and my GP2X, and I'm getting very frustrated

(hey mods, I edited the other one to indicate it was in the wrong forum, delete IT not this one please :) )
 
May be something in between those 2 lines corrupts the heap.

Just a guess.


EDIT: Can you try it with gdb (or valgrind if you're using x86 Linux)
 
gdb on the PC gives me nothing useful, but on the gp2x it really does interesting things... an endless loop of abort() (abort.c). No idea what it means, I don't know how a stack can get so corrupted that it does that... and also I'm not doing anything weird between those two lines to corrupt the stack or the heap. Meh.
 
Back
Top