![]() |
|
ATI Radeon HD 5770 [Sapphire] Crash on ogl_display |
Dario ff
Member #10,065
August 2008
![]() |
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: 288 format = ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE;
289 // TODO: This one is also supported
290 //format = ALLEGRO_PIXEL_FORMAT_RGB_565;
291#else
292 format = _al_deduce_color_format(&disp->extra_settings);
293 /* Eww. No OpenGL hardware in the world does that - let's just
294 * switch to some default.
295 */
296 if (al_get_pixel_size(format) == 3) {
297 /* Or should we use RGBA? Maybe only if not Nvidia cards? */
298 format = ALLEGRO_PIXEL_FORMAT_ABGR_8888;
299 }
300#endif
301 ALLEGRO_TRACE_CHANNEL_LEVEL("display", 1)("Format %s used for backbuffer.\n",
302 _al_format_name(format));
304
305 /* Now that the display backbuffer has a format, update extra_settings so
306 * the user can query it back.
307 */
308 _al_set_color_components(format, &disp->extra_settings, ALLEGRO_REQUIRE);
309 disp->backbuffer_format = format;
310
311 ALLEGRO_DEBUG("Creating backbuffer bitmap\n");
312 al_set_new_bitmap_format(format);
The error even happens with ex_opengl, and the Direct3D driver works fine. Any workaround? Or is this just a plain bug? TranslatorHack 2010, a human translation chain in a.cc. |
Peter Wang
Member #23
April 2000
|
It's a bug. allegro.log should help. It would also help to know which version it worked for.
|
Dario ff
Member #10,065
August 2008
![]() |
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. TranslatorHack 2010, a human translation chain in a.cc. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Dario ff said: How do I enable the allegro.log file? Link to the debug version of allegro. -- |
Dario ff
Member #10,065
August 2008
![]() |
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. Important Edit
Ok, I've tracked the version... I think: 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. TranslatorHack 2010, a human translation chain in a.cc. |
Peter Wang
Member #23
April 2000
|
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?
|
Dario ff
Member #10,065
August 2008
![]() |
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)
TranslatorHack 2010, a human translation chain in a.cc. |
Peter Wang
Member #23
April 2000
|
Thanks. Looking at it again, the assertion seems to be wrong so I will remove it.
|
Dario ff
Member #10,065
August 2008
![]() |
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: And here's the log as well. Another assert I need to remove? TranslatorHack 2010, a human translation chain in a.cc. |
Peter Wang
Member #23
April 2000
|
Try this provisional patch. Are you setting display settings manually?
|
Dario ff
Member #10,065
August 2008
![]() |
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. New EDIT #2Here'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: 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? TranslatorHack 2010, a human translation chain in a.cc. |
Peter Wang
Member #23
April 2000
|
Yes, the original assertion should be removed as well.
|
Dario ff
Member #10,065
August 2008
![]() |
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. TranslatorHack 2010, a human translation chain in a.cc. |
|