I saw this reported already, but details were sketchy.
Allegro crashes sometimes under Windows when using DirectX render in full-screen mode with non-desktop resolution. Crash seems to be related to TTF addon. Here's my reproduction code:
Allegro (or rather DirectX) will crash in call from al_load_bitmap to here:
6 if (
bmp, x, y, width, height);
10 if (
11 if (
ALLEGRO_ERROR("d3d_do_upload: Couldn't update texture.\n");
...on call to d3d_bmp->display->device->UpdateTexture on attempt to access invalid pointer. Bot input pointers seem to be valid at the first glance, so something deeper is corrupted.
However, this will not happen, if I initialize ttf addon BEFORE creating display:
This way, it always works. However, I could find no mention of this in docs, and also this does not happen if I either:
So I think it's a bug.