- Online Community Forums » Allegro Development » [A5] al_create_display crashes under Windows if resolution is not supported

This thread is locked; no one can reply to it. rss feed Print
[A5] al_create_display crashes under Windows if resolution is not supported
Oscar Giner
Member #2,207
April 2002

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:

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 search-fu is pretty weak :-[

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

Matthew Leverton
Supreme Loser
January 1999

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

Go to: