[AD] Program hangs

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


The program below hangs when show_mouse calls install_int which in turn calls 
lock_mutex. It may take some iterations until it hangs (it's a bit random, 
the rest time will affect the probability). If I move show_mose to outside of 
the section with acquired screen I don't get the error, at least not within a 
reasonable time. The same if I remove either rest or vsync.
I can't find anything about such restrictions in the docs, so I assume that 
this is a bug.
I ran this program on Mandrake 10.0 and 10.1, static build with
Allegro 4.2.0 (beta4).

#include <allegro.h>
int main(void)
{
   allegro_init();
   if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 1000, 500, 0, 0) != 0)
      return 0;
   install_timer();
   install_mouse();
   show_mouse(screen);
   do {
      rest(100);
      vsync();
      acquire_screen();
      show_mouse(NULL);
      /* blit.. */
      show_mouse(screen);
      release_screen();
   } while (1);
   return 0;
}

-- 
Christer




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