[SDL] [SDL2] SDL_Init freezing with SDL_INIT_TIMER
puyolzits at gmail.com
Wed Mar 6 06:04:32 PST 2013
Greetings SDL community!
I started porting my game engine from SDL to SDL2 yesterday and I ran into
a strange issue.
When calling SDL_Init with SDL_INIT_TIMER flag, the function never returns.
It just stays there in some kind of infinite loop.
The same behavior happens when i'm trying to initialize SDL2_mixer,
although SDL2_image and SDL2_ttf are correctly
initialized and work ok.
My code basically calls SDL_Init with SDL_INIT_TIMER, SDL_INIT_VIDEO and
SDL_INIT_AUDIO flags. And then it initializes
SDL2_ttf, SDL2_image and SDL2_mixer. When calling SDL_Init without
SDL_INIT_TIMER and with SDL2_mixer commented,
there's no freezing.
I'm using Ubuntu 12.04 LTS on a x64 machine. I've compiled SDL2 directly
from hg as well as SDL2_image, SDL2_ttf and
I don't know if it's ok to just paste the trace, but here it is:
#0 __lll_lock_wait () at
#1 0x00007ffff70c7065 in _L_lock_858 () from
#2 0x00007ffff70c6eba in __pthread_mutex_lock (mutex=0x6054b0) at
#3 0x00007ffff6e88c4c in SDL_mutexP (mutex=0x6054b0) at
#4 0x00007ffff6e89011 in SDL_DestroySemaphore (sem=0x605490) at
#5 0x00007ffff6e2b5dd in SDL_CreateThread (fn=<optimized out>,
name=<optimized out>, data=<optimized out>)
#6 0x00007ffff6e2bb30 in SDL_TimerInit () at
#7 0x00007ffff6ddfc75 in SDL_InitSubSystem (flags=49) at
#8 0x00007ffff6ddfd3a in SDL_Init (flags=49) at
#9 0x00007ffff7bc7899 in Polymorphic::Engine::Initialize () at
#10 0x00007ffff7bc8093 in Polymorphic::Engine::Run (gi=0x7fffffffe100) at
#11 0x00000000004014d7 in main (argc=1, argv=0x7fffffffe218) at
If there's any information I forgot to provide, just tell me. Any help will
Thanks for you time,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL