Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » monolith dll Assertion failed!

This thread is locked; no one can reply to it. rss feed Print
monolith dll Assertion failed!
SaSSolino
Member #16,806
February 2018

Hi everyone!

So I added FONTS to my little program and wanted to try and launch it when I got a missing "msvcr110d.dll" file error, which I "solved" by downloading it again and putting it the Debug folder.

Afterwards however I got another error: 0xc000007b, which Google told me to solve by either repairing my VS installation or downloading new .dll files. I tried both and had a pretty good idea of what .dll could cause the issue.

Changing this msvcr110d.dll file once more, I got this error:

Assertion failed!

Program: c:\allegro\bin\allegro-5.0.10-monolith-md-debug.dll
File: allegro-git\src\misc\vector.c
Line: 174

Expression: vec->_itemsize > 0

Could you guys help me out of this error loop? Thanks!

Frank Drebin
Member #2,987
December 2002
avatar

Maybe if you use the most recent version of Allegro this will solve this issue...

ks
Member #1,086
March 2001

Incidentally, I have started using https://github.com/Microsoft/vcpkg with VS2017. Once the libraries are installed via the package manager there is no need to explicitly link specific libraries. In the case of DLLs, the appropriate files are copied to your build folder.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

You probably forgot to initialize an addon or a resource like a font failed to load. Check your code. Post it if you can't find it.

If you know how to get a backtrace and use a debugger, try adding the following code to your program :

#SelectExpand
1#include "allegro5/allegro.h" 2 3void crash(char const *expr, char const *file, int line, char const *func) { 4 printf("Failed assert(%s) on line %d of file %s in function %s\n" , expr , line , file , func); 5 int i = 1/0; 6} 7 8int main(int argc , char** argv) { 9 al_init();/// 10 11 12 al_register_assert_handler(crash); 13 14 ///... Rest of program 15 16 return 0; 17}

Now run your program normally. When the assert is fired, your program will crash on the divide by zero. This allows you to get a backtrace from your debugger and see why it is failing.

SaSSolino
Member #16,806
February 2018

It seems to crash on al_init_ttf_addon, not sure why though as I called the library.

edit: nevermind solved it, thanks for the help guys!

Go to: