allegro_image-5.2.dll - Cannot find or open the PDB file

Visual Studio Community 2015 + Allegro

Is there any way to load debugging information for allegro_image-5.2.dll so I can find a source code / line number where al_load_bitmap() is generating an exception?

Mark Oates

I'm not using VS and don't regularly do debugging deeper than the external interface of Allegro. But, I bet you $100 your problem is because either:

  1. The image addon is not initialized. al_init_image_addon() or al_is_image_addon_initialized().

  2. Allegro is not initialized. al_init() or al_is_system_installed().

  3. The path of the image you are loading is not working as you might expect.

It's likely the last one, in my experience. To fix:

  1. You might try an absolute path to the image file to test it out. Absolute path always works (but is not portable or flexible).

  2. The relative image path you are providing to your al_load_bitmap call is not correct. In your program, you should set the current working directory to the location of the executable during setup, and make sure your image file is in the same location relative to the executable.

To set the programs working path to the location of the executable:

  path = al_get_standard_path(ALLEGRO_RESOURCES_PATH);


al_is_image_addon_initialized() doesnt appear to be a valid function?

It's not a path issue, and I'm logging the path to console, and its correct.

Also it seems intermittent. It SEEMED to be related to Steam Overlay 99% of the time, and disabling it used to be a fine workaround for about 2 years, but now it happens regardless if the overlay is enabled or not. (and typically only on laptops/shared memory systems...)

I don't know any other way to proceed, than to see EXACTLY what the exception is in al_load_bitmap() ?

Mark Oates
thebignic said:

al_is_image_addon_initialized() doesnt appear to be a valid function?

Ahhhh. It's new to the latest release 5.2.6. You have My oversight, sorry.


I don't know any other way to proceed, than to see EXACTLY what the exception is in al_load_bitmap() ?


Unfortunately, I have a very limited experience with the debug version, or a debugger in general. I would expect that the library you are trying to find is called allegro_image-5.2-debug.dll. I don't know how you installed the Allegro version on your computer. It may or may not include it, or if you built it, you may have to indicate to the build system that you also want to build debug libraries as well. Again, really fuzzy on this, you may also need to set certain flags when building.

I found this. Hopefully it's helpful.


Yes, are you linking to the debug versions of the libraries? Are you running in debug mode?


used nuget.

lost too many hours trying to build allegro over the years :/

Thanks anyway

Linking to "Dynamic Debug" might be loading the PDB but it doesn't crash and no exception seems to be thrown.. the call just fails.

Using Monolithic Static throws exception and crashes...

Seems like its still intermittent, but finally got "lock was nullptr"

Don't have the .c files handy but at least its pointing to some now...


yah, none of that helped - no reason why the bitmap couldn't be locked if its new (not locked already) so ???:'(

if Steam Client is running, it fails. otherwise, works like a dream. regardless if overlay is on... how bizzare. One wonders wtf their shader caching thing does? Its disabled but......

Thread #618103. Printed from