[A5] al_create_display crashes under Windows if resolution is not supported
Oscar Giner

Also, setting a bigger than desktop resolution succeeds, but the window is mostly out of the screen (I can only see the bottom right corner of it).

Setting a very big resolution (to force it failing) just crashes. According to the debugger, here's the problem:

d3d_disp.cpp#SelectExpand
1976 al_lock_mutex(present_mutex); 1977 display = d3d_create_display_locked(w, h); 1978 win_display = (ALLEGRO_DISPLAY_WIN *)display; 1979 al_unlock_mutex(present_mutex); 1980 1981 s = display->extra_settings.settings;

It crashes at line 1981 (my birth year :o). The debugger shows that display = NULL.

There's one annoying thing: allegro keeps trying to create a window for like 30 seconds. The taskbar goes crazy showing an allegro window being created and destroyed, until the crash.

Using Allegro 5.0.3 (precompiled binaries from here).

Note: Maybe this has already been reported, my allegro.cc search-fu is pretty weak :-[

[Edit]
I'm pretty sure I selected allegro development subforum, but it seems I did not :-/

Matthew Leverton

It's definitely a bug in that it doesn't bother to check return values.

Thread #607885. Printed from Allegro.cc