.hgignore
author Sam Lantinga <slouken@libsdl.org>
Thu, 17 Apr 2014 22:36:14 -0700
branchSDL-1.2
changeset 8716 0aade9c0203f
parent 5895 402eac854030
child 12985 aa678571dcd4
permissions -rw-r--r--
Fixed bug 2325 - SDL_EnableUNICODE sometimes drops keyboard events completely

Rafał Mużyło

The most annoying part of this bug is that though I've found it in two separate apps, I don't have a trivial testcase for it.

The problem seems to be a condition race, as it's triggered quite randomly (therefore it will be hard to tell whether it really gets fixed, if a probable fix is found).

While it's specific to SDL 1.2, it seems quite similar to the problem described and fixed in http://forums.libsdl.org/viewtopic.php?p=40503.

Now, I should start describing the problem.

A game uses Escape to open menu (the exact key might not be important). Upon opening, it calls SDL_EnableUNICODE(1). Upon closing it calls SDL_EnableUNICODE(0).

I have an IME running.

Game uses SDL_PollEvent to get the events.

If Escape is pressed repeatedly, menu is opened and closed, till it eventually freezes in open state.
"freezes" in this context means "app itself still runs, but no keyboard events are getting delivered (though - for example - mouse events still are)". "getting delivered" should mean "SDL_PollEvent is not receiving any".
If it matters, the last delivered keyboard event is a keypress, the release never arrives.

It seems (no guarantees, due to random nature of the freeze) that unsetting XMODIFIERS (which - AFAIU - will disable IME as far as SDL is concerned) prevents the freeze, therefore the reference to that SDL2 thread.
icculus@4420
     1
syntax:glob
icculus@4420
     2
aclocal.m4
icculus@4420
     3
autom4te*
icculus@4420
     4
config.cache
icculus@4420
     5
config.log
icculus@4420
     6
config.status
icculus@4420
     7
configure
icculus@4420
     8
libtool
icculus@4420
     9
Makefile
icculus@4420
    10
sdl-config
icculus@4420
    11
SDL.spec
icculus@4420
    12
SDL.qpg
icculus@4420
    13
build
icculus@4420
    14
build-deps
icculus@4420
    15
.DS_Store
icculus@4420
    16
sdl.pc
icculus@4420
    17
include/SDL_config.h
icculus@4420
    18
test/aclocal.m4
icculus@4420
    19
test/autom4te*
icculus@4420
    20
test/config.cache
icculus@4420
    21
test/config.log
icculus@4420
    22
test/config.status
icculus@4420
    23
test/configure
icculus@4420
    24
test/Makefile
icculus@4420
    25
test/SDL.dll
icculus@4420
    26
test/stdout.txt
icculus@4420
    27
test/stderr.txt
icculus@4420
    28
test/checkkeys
icculus@4420
    29
test/graywin
icculus@4420
    30
test/loopwave
icculus@4420
    31
test/testpower
icculus@4420
    32
test/testalpha
icculus@4420
    33
test/testbitmap
icculus@4420
    34
test/testblitspeed
icculus@4420
    35
test/testcdrom
icculus@4420
    36
test/testdyngl
icculus@4420
    37
test/testerror
icculus@4420
    38
test/testfile
icculus@4420
    39
test/testgamma
icculus@4420
    40
test/testgl
icculus@4420
    41
test/testhread
icculus@4420
    42
test/testiconv
icculus@4420
    43
test/testjoystick
icculus@4420
    44
test/testkeys
icculus@4420
    45
test/testlock
icculus@4420
    46
test/testoverlay
icculus@4420
    47
test/testoverlay2
icculus@4420
    48
test/testpalette
icculus@4420
    49
test/testplatform
icculus@4420
    50
test/testsem
icculus@4420
    51
test/testsprite
icculus@4420
    52
test/testtimer
icculus@4420
    53
test/testver
icculus@4420
    54
test/testvidinfo
icculus@4420
    55
test/testwin
icculus@4420
    56
test/testwm
icculus@4420
    57
test/threadwin
icculus@4420
    58
test/torturethread
icculus@4420
    59
test/testcursor
icculus@4420
    60
test/testloadso
icculus@4420
    61
test/*.exe
icculus@4420
    62
test/*.dSYM