|
Allegro 5 fails to "assert mutex" when doing image = al_create_bitmap(x, x); |
GudPiggeh
Member #16,492
July 2016
|
I'm trying to create a bitmap. 218void tile::imageLoad() {
219 std::cout << "Loading " << fileName << std::endl;
220 //some code
221 image = al_create_bitmap(NUMBER, NUMBER);
222 //some code
223 std::cout << "Loaded " << fileName << std::endl;
224}
Somehow, as it does image = al_create_bitmap(1, 1);, it gives Assertion failed: mutex, file C:\dev\allegro_winpkg\universal\allegro\src\threads.c, line 310 |
jmasterx
Member #11,410
October 2009
|
We're going to need more context than that! You're even assigning to a variable that is outside the scope of the function (member variable (Or global )). Agui GUI API -> https://github.com/jmasterx/Agui |
Edgar Reynaldo
Major Reynaldo
May 2007
|
My guess is you're using a global Tile object, and it's trying to create the bitmap before allegro has been initialized. But it could be a lot of things. I can't tell you where in the source code that is, because GIT has diverged from 5.2.2 and the sources don't match up anymore. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
jmasterx
Member #11,410
October 2009
|
Agui GUI API -> https://github.com/jmasterx/Agui |
Edgar Reynaldo
Major Reynaldo
May 2007
|
The only reason a mutex wouldn't be valid is because you haven't called al_init first. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|