Hi all,
I’m new to SDL.
I’ll try to explain my problem. I’m currently working on a simple shoot’em up
engine, using SDL for its multi platform compatibility.
I’m having some strange segmentation fault, while blitting surface on screen
(especially when using SDL_RLEACCEL), when calling SDL_Quit(), or while freeing
surfaces.
Here is the call stack while freeing:
8: malloc_trim()
7: free()
6: SDL_FreeSurface()
(…)
While drawing software surface:
*** glibc detected *** malloc(): memory corruption: 0x00000000005395d0 ***
And the stack:
19: raise()
18: abort()
17: __fsetlocking()
16: free()
15: malloc()
14: SDL_RLESurface()
…
No offense but without seeing some of your code, we can’t do much.
SROn 10/28/05, Fred wrote:
Hi all,
I’m new to SDL.
I’ll try to explain my problem. I’m currently working on a simple shoot’em up
engine, using SDL for its multi platform compatibility.
I’m having some strange segmentation fault, while blitting surface on screen
(especially when using SDL_RLEACCEL), when calling SDL_Quit(), or while freeing
surfaces.
Here is the call stack while freeing:
8: malloc_trim()
7: free()
6: SDL_FreeSurface()
(…)
While drawing software surface:
*** glibc detected *** malloc(): memory corruption: 0x00000000005395d0 ***
And the stack:
19: raise()
18: abort()
17: __fsetlocking()
16: free()
15: malloc()
14: SDL_RLESurface()
…
No offense but without seeing some of your code, we can’t do much.
SR
Ok sorry, but I don’t know which piece of code to post.
On the other hand, I discovered that the segmentation fault occured after a call
to malloc (not immediately after!). Otherwise I don’t know how I could proceed ,
and why that generates an error.
No offense but without seeing some of your code, we can’t do much.
SR
Ok sorry, but I don’t know which piece of code to post.
On the other hand, I discovered that the segmentation fault occured after
a call
to malloc (not immediately after!). Otherwise I don’t know how I could
proceed ,
and why that generates an error.
You could try the old fashioned way: put printf()s in your code and
see how far it gets…
ChrisOn 10/29/05, Fred wrote:
Ok sorry, but I don’t know which piece of code to post.
On the other hand, I discovered that the segmentation fault occured after a call
to malloc (not immediately after!). Otherwise I don’t know how I could proceed ,
and why that generates an error.