Re: [Sdl4fp-users] runtime error on alloc to pSDL_RECT
Brought to you by:
trixx
From: Daniel F M. <dmo...@ar...> - 2006-04-30 21:36:36
|
On Fri, 2006-04-28 at 22:34 +0200, Matthias wrote: > Hi there. > > When trying to compile I got runtime error 216 at allocation of > memory. While in debug mode I receive the messege you see in the > picture. > > http://unterhaltung.freepage.de/tycoon/sam/sdlerr.GIF > > The curious thing is, this allocation didn't make any problems before. > Any suggestions what is going wrong here? An usual cause of allocation failures is corrupt data structures in the heap. Probably you are accessing a pointer after freeing it, or accessing a dynamic array out of its bounds. These kind of errors disappear and reappear randomly, because they may depend on previous contents of the memory. I can't be 100% sure, but I bet your problem is this and not one related to the SDL library (anyway, you are just using a record allocation there, not a library function). Regards, Daniel |