|
ALLEGRO 5 - invinite loop an end in _al_win_input_exit |
HansiSchmidt
Member #10,570
January 2009
|
Hi, when I quit my program, the app hangs in _al_win_input_exit-function at WaitForSingleObject(ack_event, INFINITE). Found some old stuff in this forum here, but don't know whether the solution is still the same... I use MSVC 2005 and only the sound stuff from allegro 4.9.8 . Hope there's help ;-) Cheers, I |
Matthew Leverton
Supreme Loser
January 1999
|
Can you provide a simple program that illustrates this behavior? |
Milan Mimica
Member #3,877
September 2003
|
Maybe allegro.log has some useful info?
-- |
HansiSchmidt
Member #10,570
January 2009
|
>> Can you provide a simple program that illustrates this behavior? I have no simple program. This sound stuff is part of our C#-App. We use allegro in a c++ - SoundManager-dll. That is wrapped in a SoundManagerWrapper-Dll ( managed, assemply ) and this we use in a C#-app... no way to provide usefull source code... what a pity.. The log says: // LOG START ALLEGRO_SYSTEM_INTERFACE created. // LOG END Funny, because I take the autodetect to install the audio |
Thomas Fjellstrom
Member #476
June 2000
|
You may not have one, but we're going to need one. Its a common request. We need the simplest example possible that shows the issues you are having, otherwise we can't know who's problem it is. -- |
HansiSchmidt
Member #10,570
January 2009
|
What a pity.... but there's no program actually, because I only make init, create global voice and global mixer and create a stream: // ***************************************** if ( !al_init() ) // init sound stuff // CREATE VOICE m_GlobalMixer = al_create_mixer( 44100, // attach mixer to voice // ***************************************** m_pStream = al_create_stream( buffer_count, m_pSoundResource->GetSampleCount(), m_pSoundResource->GetFrequency(), _al_word_size_to_depth_conf(word_size), _al_count_to_channel_conf(channels) ); al_attach_stream_to_mixer(m_GlobalMixer, m_pStream) That's all for the source code. There're no other filling/playing stuff. #if defined ALLEGRO_MINGW32 && ( \ to #if defined OUR_NO_NATIVE_TLS || (ALLEGRO_MINGW32 && ( \ So the tls is supported in our dll.But don't know the side effects of this hack... Yes, that's the keys.... and maybe you can help me ? |
Thomas Fjellstrom
Member #476
June 2000
|
So make a program from that code, and see if you have the same problem. -- |
HansiSchmidt
Member #10,570
January 2009
|
You mean I should create another program with the same code to check its behavior ? hmmm....... any other ideas ? |
Thomas Fjellstrom
Member #476
June 2000
|
You should create a simple Allegro based program using ONLY the allegro code you've been using, and a little extra code to test that code. -- |
Evert
Member #794
November 2000
|
Quote: That is wrapped in a SoundManagerWrapper-Dll ( managed, assemply ) and this we use in a C#-app... no way to provide usefull source code... what a pity..
That means the bug could be in any of those other pieces of code as well. It's impossible for us to diagnose what the problem is if we can't reproduce it ourselves. Quote:
Funny, because I take the autodetect to install the audio It is a bit weird that it's looking for ALSA on Windows, but it shouldn't matter. All that's saying is that it failed to use ALSA for sound, which is fine. Quote: You mean I should create another program with the same code to check its behavior ? hmmm....... any other ideas ? Look. You want us to help you find the problem, right? Who knows, maybe it's a bug in Allegro we need to fix. But you have to help us do that by giving us code that we can run and that misbehaves for you. It's not that we do not want to help you otherwise, we just can't. That said, do any of Allegro's examples show the same problem? |
HansiSchmidt
Member #10,570
January 2009
|
I can see the problem for you... no usefull code - no help... >> That said, do any of Allegro's examples show the same problem? These examples are win apps in c++ with no .NET-connection... I have to consider my stuff and my questions for help... |
Thomas Fjellstrom
Member #476
June 2000
|
Quote: So maybe I have to create a small app that uses my soundmanager.dll... Better would be just to take the code in that dll that uses allegro, and put it in a simple test program. -- |
HansiSchmidt
Member #10,570
January 2009
|
Ok, now I use my allegro stuff in a non .NET-App and my program doesn't want to quit as well in this _al_win_input_exit. For what is WaitForSingleObject(ack_event, INFINITE); waiting ? And if nobody knows for what allegro is waiting for eternity, how can I debug this event stuff ? Is there an array or where can I find a reason to wait ? I don't want to change allegro.... but finally I have to ... perhaps. |
Elias
Member #358
May 2000
|
Do the example which come with Allegro work? -- |
Milan Mimica
Member #3,877
September 2003
|
I noticed that too. Happens sometimes and a switch in/out of debugger makes it continue. I didn't look into it yet, but I will.
-- |
HansiSchmidt
Member #10,570
January 2009
|
>> Do the example which come with Allegro work? Yes, they do...correctly _al_win_input_init and _al_win_input_exit without waiting at WaitForSingleObject(ack_event, INFINITE); Seems, that all the fancy / magic events are comming at the end and no one has to wait for something that nobody seems to know exactly :-( >> Happens sometimes and a switch in/out of debugger makes it continue. Do you mean that this is not happen if I compile in RELEASE or if I don't debug Update: |
Milan Mimica
Member #3,877
September 2003
|
I just happens sometimes, it's one of those bugs. You can't make a diagnosis just by looking at the symptoms.
-- |
HansiSchmidt
Member #10,570
January 2009
|
> You can't make a diagnosis just by looking at the symptoms. In principle - YES. But my question was, what is allegro at this point waiting for. Guess that this can't be all events in our universe, but some ending streaming stuff, special shut-down-allegro stuff and so on... |
Elias
Member #358
May 2000
|
The function is described here: http://msdn.microsoft.com/en-us/library/ms687032.aspx So basically, it waits for the event in the first parameter. For some reason, this event does not occur sometimes. To fix the problem, someone (who has Windows, so not me) has to figure out why this event does not occur. -- |
Milan Mimica
Member #3,877
September 2003
|
It waits for input evens, it's perfectly clear what it does and how it should work, to me at least.
-- |
HansiSchmidt
Member #10,570
January 2009
|
>> It waits for input evens, Ok, seems, that nobody understands, that I'm looking for the specific / the missing input event. I do know, what "WaitForSingleObject" does... But that's the coolness of Open Source stuff.... if you don't know what there's going on -> change it !! |
count
Member #5,401
January 2005
|
Quote: But that's the coolness of Open Source stuff.... if you don't know what there's going on -> change it !!
Can't help you on this event stuff though. Because I don't know what it's about.
|
Milan Mimica
Member #3,877
September 2003
|
Actually, the WaitForSingleObject() you are referring to waits for the input thread to acknowledge that it ended, after it has been instructed to end with an APC. Looking at your logfile, the input thread didn't process the APC for some reason.
-- |
Thomas Fjellstrom
Member #476
June 2000
|
Quote: I can't reproduce this any more. The problem might be solved already in SVN, with the latest memory corruption fix in the input code. You know what, that would make sense. A bug like that (that shouldn't be possible) could easily be caused by memory corruption. -- |
|