Hello,
I recently posted a message about my program crashing, and I have some new
information to report.
The Problem:
When I press two of the keys I am polling for at the same time, the program
crashes. It does not happen when I and pressing keys I am not polling for.
These are the error messages I get when running in different modes:
Running the program with a regular user:
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 129 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Value in failed request: 0x1961
Serial number of failed request: 8074
Current serial number in output stream: 8183
X Error of failed request: BadWindow (invalid Window parameter)
Segmentation fault
Running the program with root user:
video mode protecting
Running the program using the GNU debugger (gdb):
Program received signal SIGSEGV, Segmentation fault.
SDL_MITSHMUpdate (screen=Cannot access memory at address 0xb201ac.
) at src/linux/x11/SDL_sysvideo.c:1081
1081 XShmPutImage(GFX_Display, SDL_Window, SDL_GC, SDL_Ximage,
Here is the code I use to check the events:
SDL_PollEvent(&event);
keys = SDL_GetKeyState(NULL);
if ( keys[SDLK_whateverkey] == SDL_PRESSED ) {
//Do whatever
}
The game works perfectly fine until I press two of the keys I am polling
for.
Does anyone have any idea what the heck is going on??
Thanks.
Ryan Wahle
@Ryan_Wahle