[AD] Threads, Window Handles and more

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hey,

I don't know if it is a bug in Allegro, MIDAS, AllegroGL or just me, but I
have some really serious problems. Everytime when my game crashes due to a
NULL pointer access or similar other reasons, Allegro doesn't exit
completely. The program vanishes from the tasklist ( CTRL+ALT+DEL ), but
there is still a visible button in the taskbar, I can't write to the .EXE
file anymore, because there are still some threads running (Allegro?
MIDAS?). I can start the Process Viewer of MSVC and it tells me, the process
OBS2GAME is running, but I can't kill the process. I can only kill it, when
I shutdown windows. Then Windows tells me, there is a program which doesn't
respond and asks me if Windows should kill it. This is very annoying,
because I need to restart everytime my project crashes, otherwise I can't
compile anymore.

Doesn't Allegro kill all threads when crashing?
I attach the MIDAS thread to the Allegro window, by passing a handle to it.
What happens, when the program crashes? Are all attached threads destroyed
automatically? Are all registered atexit() functions executed, when a
program crashes? Or only whe n it exits normally.

When I ALT+TAB away from my game, it doesn't pause. I tried several display
switch modes, but all had the same result. Fault of AllegroGL? Is there a
way I can intercept the WindowsMessages and handle them myself? I'd like to
destroy the OpenGL context when switching away, and recreate it when
switching in. I also like to disable screensaver/powersaving popping up,
when the game is running.

And why has the Windows driver no SWITCH_OUT notification event?

"To do this, you need to intercept the windows message WM_ACTIVATEAPP in
your windows procedure and either suspend processing or restart it depending
on the values of the parameters passed with the message. " - Somewhere from
the net

Sorry to bother you with this stuff here, but I am currently not subsribed
to the other Allegro lists. Accept it as a bug report :)

Robin: What is this windows sounddriver you posted here? Is it a full
working driver capable to play JGMOD files correctly?

Thanks
Jörg



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/