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 - Crash in SDL_SendKeyboardKey()
Summary: Crash in SDL_SendKeyboardKey()
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.0
Hardware: All Mac OS X (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-27 14:37 UTC by Vittorio Giovara
Modified: 2010-04-20 07:17 UTC (History)
0 users

See Also:


Attachments
proposed fix by Jjgod Jiang (1.30 KB, application/octet-stream)
2010-02-27 14:37 UTC, Vittorio Giovara
Details

Note You need to log in before you can comment on or make changes to this bug.
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