[SDL] Keyboard input and Seg Faults
Stephane Marchesin
stephane.marchesin at wanadoo.fr
Thu May 20 15:23:59 PDT 2004
Lee Tobin wrote:
>Hello all,
>
>I've written a simple menu system. which takes keyboard i/p (SDLK_UP and
>SDLK_DOWN) like this
>
>do{ SDL_WaitEvent(&event); }
>while(event.type != SDL_KEYDOWN);//wait for user i/p
>switch(event.key.keysym.sym)
>{
>
>//LOOK AFTER Input
>
>}
>
>It works, kind of. When you terror test this (by pressing up and down lots of
>times and holding down for several seconds etc) after a few seconds i get the
>dreaded...
>
>Fatal signal: Segmentation Fault (SDL Parachute Deployed)
>
>Anyone have any ideas why this is happening?
>
That means your program crashed, and that you probably have a bug in it.
But we can't be sure without a full source code reproducing the problem.
Could you make an example reproducing the problem available ?
Stephane
More information about the SDL
mailing list