Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » allegro_image-5.2.dll - Cannot find or open the PDB file

This thread is locked; no one can reply to it. rss feed Print
allegro_image-5.2.dll - Cannot find or open the PDB file
thebignic
Member #14,419
July 2012

Visual Studio Community 2015 + Allegro 5.2.5.1

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
Member #1,146
March 2001
avatar

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:

  ALLEGRO_PATH *path;
  path = al_get_standard_path(ALLEGRO_RESOURCES_PATH);
  al_change_directory(al_path_cstr(path,ALLEGRO_NATIVE_PATH_SEP));

thebignic
Member #14,419
July 2012

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
Member #1,146
March 2001
avatar

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 5.2.5.1. My oversight, sorry.

Quote:

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

Interesting.

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.

DanielH
Member #934
January 2001
avatar

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

thebignic
Member #14,419
July 2012

used nuget.

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

Thanks anyway

EDIT:
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...

EDIT 2:
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...

Thanks

EDIT 3:
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......

Go to: