Allegro 5.0.4 crash if mixing resize/create_display
Max Savenkov

The following code crashes somewhere in al_create_display on a call to malloc:

ALLEGRO_DISPLAY *d = al_create_display( 800, 600 );
al_resize_display( d, 1024, 768 );
al_destroy_display( d );
al_set_new_display_flags( ALLEGRO_FULLSCREEN );
al_create_display( 1920, 1080 );

I understand that calling resize_display and then create_display is pointless, but still it shows a possible bug somewhere. At worst, this should be documented.


I can't reproduce the crash on my machine. Are you sure the crash is not caused because you are not assigning the second display to a variable?.

Max Savenkov

Yes, I'm sure. It happens before the second call to al_create_display is complete and therefore assignment/non-assignment could not have an effect in any way.

Also, this cropped up in a non-example program, where assignment was done.

I'll add some specifics about my setup then:

OS: Windows 7 64-Bit
GPU: GeForce 560 Ti
Driver: 280.26 (


Thread #608653. Printed from