We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 960

Summary: Crash in SDL_SendKeyboardKey()
Product: SDL Reporter: Vittorio Giovara <vitto.giova>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.0   
Hardware: All   
OS: Mac OS X (All)   
Attachments: proposed fix by Jjgod Jiang

Description Vittorio Giovara 2010-02-27 14:37:33 UTC
Created attachment 494 [details]
proposed fix by Jjgod Jiang

This bug report wants to be a tracker for what has been outlined here:
http://forums.libsdl.org/viewtopic.php?t=6036

from the original post:
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
I am using MacOSX 10.6 with Macports, and after upgrading the 'libsdl-devel'
package, my application is crashing in SDL_SendKeyboardKey()... the crash
is happening after a few frames have been displayed on the screen.

Version of SDL used:

libsdl-devel @1.3.0-5552_0 (active)


My application is reading events from SDL like this:


SDL_Event event;
SDL_PollEvent(&event);


here is parts of the GDB backtrace:


(gdb) bt
#0 0x0000000101ea5358 in SDL_SendKeyboardKey ()
#1 0x0000000101efbe51 in Cocoa_HandleKeyEvent ()
#2 0x0000000101efac1e in Cocoa_PumpEvents ()
#3 0x0000000101ea4195 in SDL_PumpEvents ()
#4 0x0000000101ea45a5 in SDL_WaitEventTimeout () 

"""""""""""""""""""""""""""""""""""""""""""""""""""""""

This bug also affects iPhoneOS version
The attached patch by Jjgod Jiang should fix the problem but since the user reports further errors it may require some more investigation.
Comment 1 Sam Lantinga 2010-04-20 07:17:49 UTC
This is in source control, thanks!

changeset:   4437:25e45611fa3d
tag:         tip
user:        Jjgod Jiang <gzjjgod@gmail.com>
date:        Tue Apr 20 07:16:42 2010 -0700
summary:     Fix a crash caused by empty keyboard focus