Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » crtdll.dll crash when trying to load a bitmap

This thread is locked; no one can reply to it. rss feed Print
crtdll.dll crash when trying to load a bitmap
Blahthing
Member #15,757
October 2014

Hello, i just recently signed up to the forums. I've been using allegro for a while now and have used both allegro 4 and 5 and i have never encountered this problem before

Consider the certain example code

#SelectExpand
1#include "allegro5\allegro.h" 2#include "allegro5\allegro_image.h" 3#include <iostream> 4ALLEGRO_BITMAP *b; 5ALLEGRO_DISPLAY *display; 6int main(void) 7{ 8 al_init(); 9 al_init_image_addon(); 10 11 display = al_create_display(640, 480); 12 b = al_load_bitmap("file.bmp"); 13 14 std::cin.get(); 15 return 0; 16}

I have two computers in which i both have different IDE's on (one has restricted admin rights so i have to work around that)
First computer is a Windows 8 and has Visual Studio 2010 installed
Second computer is a Windows 7 and Codeblocks 12.11. Both can successfully compile and run examples without bitmaps and the "file.bmp" is not missing or corrupt.

On the first computer in Visual Studio this code compiles and runs without any errors where as on the second computer in Codeblocks it compiles but crashes when running the program on this line:

#SelectExpand
1b = al_load_bitmap("file.bmp");

Windows Error reporting details an APPCRASH in crtdll.dll (c0000005) and by using the debugger in Codeblocks, it says its due to a segmentation fault caused by the function wscanf (again in crtdll.dll) The computer with codeblocks installed can still successfully draw empty bitmaps and primitives as well as a display.

Does anyone have a solution to this problem? I've searched online quite a bit but havent found a similar post yet.

pkrcel
Member #14,001
February 2012

Seems something about incompatible DLLs, as in incompatible with your comnpiler.

Which allegro version are you using with GCC?

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Blahthing
Member #15,757
October 2014

Welp. Im using precompiled 4.7.0 allegro 5.0.10 with GCC 4.8.1 ;D

I've tried compiling it with GCC 4.7 earlier and got a bunch of undefined references to _unwind_resume and gxx personality errors but this does sound like the reason. Ill try using GCC 4.7 again and see if i can get different results

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: