So a friend of mine is having a strange crash in the latest RC. Keep in mind these OGL apps actually worked for him in the past, so it's weird it doesn't work now. Last version I remember it worked was just a few versions before 5.0 I think.
This is the error:
Assertion failed: format != ALLEGRO_PIXEL_FORMAT_ANY, file E:\allegro\src\opengl\ogl_display.c, line 303
As mentioned on the title, the GPU is ATI Radeon HD 5770 [Sapphire], and drivers are up to date according to him. OS is Windows 7 64-bit, and the application was compiled on Windows XP 32-bit. As I said before, it worked anyway from quite a few versions back, with the same GPU as well.
These are the lines around the assert just for reference:
The error even happens with ex_opengl, and the Direct3D driver works fine. Any workaround? Or is this just a plain bug?
It's a bug. allegro.log should help. It would also help to know which version it worked for.
How do I enable the allegro.log file?
And regarding the versions, I guess I'll start downloading some binaries and compiling ex_opengl til I track the one with the bug. I'm not really in the mood of compiling 10+ versions.
How do I enable the allegro.log file?
Link to the debug version of allegro.
Got it.
Where did the old binaries that were uploaded at Allegro5.org go? I think the page was maintained by Trent wasn't it? It's been replaced now by the official Allegro page... I can only track down up to 5.0rc2 on the Allegro.cc files page. And I wasn't browsing for them, I just guessed them by replacing the URL.
I'm looking for the old MinGW binaries in particular.
Ok, I've tracked the version... I think:
Here are the logs from 4.9.18 to 5.0-rc4.
The only versions that worked were 4.9.18 and 4.9.21.
4.9.19 and 4.9.20 failed on al_install_system for some reason, but that got fixed in .21 apparently.
4.9.22 log's last lines are the following:
opengl I E:\ogl_test\4.9\allegro-4.9.22\allegro\src\opengl\extensions.c:766 _al_ogl_manage_extensions [ 0.49394] Packed Pixels formats available opengl I E:\ogl_test\4.9\allegro-4.9.22\allegro\src\opengl\extensions.c:812 _al_ogl_manage_extensions [ 0.49398] Use of non-power-of-two textures enabled. opengl I E:\ogl_test\4.9\allegro-4.9.22\allegro\src\opengl\extensions.c:823 _al_ogl_manage_extensions [ 0.49402] Use of FBO to draw to textures enabled.
And on from rc1 to rc4, the last log's lines are pretty much the same:
opengl I E:\ogl_test\5.0-RC1\allegro-5.0.0rc1\allegro\src\opengl\extensions.c:766 _al_ogl_manage_extensions [ 0.47743] Packed Pixels formats available opengl I E:\ogl_test\5.0-RC1\allegro-5.0.0rc1\allegro\src\opengl\extensions.c:812 _al_ogl_manage_extensions [ 0.47748] Use of non-power-of-two textures enabled. opengl I E:\ogl_test\5.0-RC1\allegro-5.0.0rc1\allegro\src\opengl\extensions.c:823 _al_ogl_manage_extensions [ 0.47752] Use of FBO to draw to textures enabled. opengl D E:\ogl_test\5.0-RC1\allegro-5.0.0rc1\allegro\src\opengl\ogl_display.c:279 _al_ogl_create_backbuffer [ 0.47760] Creating backbuffer display I E:\ogl_test\5.0-RC1\allegro-5.0.0rc1\allegro\src\opengl\ogl_display.c:301 _al_ogl_create_backbuffer [ 0.47764] Format ANY used for backbuffer.
Hope this helps.
4.9.22 was when the assertion was added. The same "bug" is present in earlier versions but not detected.
Could you apply the attached patch to rc4 and post allegro.log again?
Ok, attached the new log.
I noticed the new line:
display W E:\ogl_test\allegro\src\display_settings.c:634 _al_deduce_color_format [ 0.40133] Could not deduce color format, sizes = (8,8,8,8,24), shifts = (16,8,0,24)
Thanks. Looking at it again, the assertion seems to be wrong so I will remove it.
So is it safe if I remove the assertion for the moment? My priority is to get it working for the moment just so we can at least test the game in both comps, not really needed for a release or something like that. I can wait for a proper fix for that later.
EDIT: Ah, I see you just comitted it to the 5.1 branch.
EDIT: Ok, I applied the changes from your revision to rc4, and the problem doesn't stop there apparently.
The program crashes with this message:
{"name":"603199","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/7\/f70862c20404e184c90e2869205a520c.png","w":448,"h":325,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/7\/f70862c20404e184c90e2869205a520c"}
And here's the log as well.
Another assert I need to remove?
Try this provisional patch.
Are you setting display settings manually?
It's ex_opengl, so...
al_set_new_display_flags(ALLEGRO_OPENGL); display = al_create_display(640, 480);
Yeah, it's setting the display manually I guess.
I'm gonna try this out as soon as he connects.
Here's the new log. I couldn't notice anything different myself, I applied & verified the patches. Though I wasn't really sure what the second one was supposed to do.
And the error:
{"name":"603203","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/2\/42021679b6ce9a3b63917c201b0d58ec.png","w":426,"h":294,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/2\/42021679b6ce9a3b63917c201b0d58ec"}
Back to the old assert, uh? I forgot that in the last test, I manually removed it. I also forgot that your first patch didn't include the change you did on SVN to ogl_display.
But there's one interesting tidbit though, pressing on the Omit button on that error window apparently allows him to run ex_opengl! Should I try and remove the assert from ogl_display now?
Yes, the original assertion should be removed as well.
Well, that's it! It works finally. Thanks for all the help Peter.
Are these changes going to be in rc5? Since I'm interested in the monolith builds.
Oh, and I'd thank Rick for patiently testing over 10-12 different versions.