I've had some look on the source code, and found some things which i PM'd. But i didn't find the crash on exit cause. It came down to al_destroy_bitmap(MaskBitmap); line. Are there some commands to issue for Allegro when application is quitting? I noticed it's sort of threaded, by linking a update procedure in it. But crash when destroying bitmap, which isn't nil, is very odd. That linked update thread wasn't responsible of drawing things. Main loop was already stopped at that time.