[SDL] Application doesn't start

Paulo Pinto pjmlp at progtools.org
Fri Apr 16 04:10:22 PDT 2010


Have you tried to run the application under the debugger?

GDB or windbg would suffice, although I am not sure if windbg plays nice
with mingw generated executables.

You could then have a look at the stack trace to see where the call to
RtlpWaitForCriticalSection () is coming from.

--
Paulo


On Fri, Apr 16, 2010 at 12:26 PM, Nikos Chantziaras <realnc at arcor.de> wrote:

> This code can reproduce the problem when including the Qt libraries
> (QtCore, QtGui) in the link:
>
>  #include <SDL/SDL.h>
>  #include <SDL/SDL_mixer.h>
>
>  int main( int argc, char** argv )
>  {
>
>    if (SDL_Init(SDL_INIT_AUDIO) != 0)
>      return 1;
>
>    int sdlFormats = MIX_INIT_OGG | MIX_INIT_MP3;
>    if (Mix_Init((sdlFormats & sdlFormats) != sdlFormats))
>      return 1;
>
>    if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 4096) != 0)
>      return 1;
>
>    Mix_CloseAudio();
>    SDL_Quit();
>  }
>
> I don't think it's a race condition in my code.  Also, it works fine on
> Linux and Mac OS.
>
>
>
> On 04/16/2010 12:57 PM, Paulo Pinto wrote:
>
>> Hi,
>>
>> this looks like a deadlock.
>>
>> RtlpWaitForCriticalSection () is a low level function of the NT kernel
>> for handling critical sections (mutexes). So you
>> might have a race condition on your code.
>>
>> --
>> Paulo
>>
>> On Fri, Apr 16, 2010 at 11:00 AM, Nikos Chantziaras <realnc at arcor.de
>> <mailto:realnc at arcor.de>> wrote:
>>
>>    Does someone know what this error means:
>>
>>    err:ntdll:RtlpWaitForCriticalSection section 0x11ae558 "?" wait
>>    timed out in thread 0009, blocked by 0000, retrying (60 sec)
>>
>>    The application just hangs at startup and repeats that message.
>>      It's a static build done with mingw32 (cross compiling from Linux
>>    to Windows.)  It's a Qt+SDL application.
>>
>>    The problem doesn't exist with the Linux and OS X binary.  Only the
>>    Windows one does this.
>>
>>    _______________________________________________
>>    SDL mailing list
>>    SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
>>
>>    http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>
>>
>>
>>
>> _______________________________________________
>> SDL mailing list
>> SDL at lists.libsdl.org
>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>
>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20100416/8b57f31e/attachment.htm>


More information about the SDL mailing list