![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Allegro on NuGet! |
Brooklyn
Member #12,433
December 2010
![]() |
I've figured out the issue. I was not manually resetting (a call to the smart pointer's reset function) a file-scope smart pointer during the user-defined cleanup phase. If that step is missed, the C++ Standard says destruction of the smart pointers takes place during std::exit. Since Allegro has hooked into exit via a call to std::atexit it effectively shuts down before exit is called. Then any smart pointers try to use the custom deleters pointing to Allegro functions...which no longer work. Crash with accessing a no-man's-land (0xDDDDDDD) or null pointer address. I love programming. I hate debugging.
|
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Bambam would say that's what you get for using globals. And as an aside, if you're manually calling reset, why are you using a smart pointer in the first place? 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 |
Brooklyn
Member #12,433
December 2010
![]() |
Because they are a great feature to have...as long as a third party library does not hook into the exit function and shutdown the use of the custom deleters. With this issue resolved I now declare the NuGet package awesome and easy to use and set up. PDBs would still be a nice feature though. (P.S. I can't seem to find the Quote button on this forum software)
|
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
You're welcome to shutdown allegro manually, by avoiding the allegro atexit shutdown by using al_install_system and then calling al_uninstall_system after your globals get destroyed. 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 |
Bruce Pascoe
Member #15,931
April 2015
![]() |
There is no quote button, as I found out a while back. > Some text to quote As for this: Brooklyn said: I love programming. I hate debugging. I must be weird. I'll get a bug report or come across a bug myself, I rub my hands together in an excited "let's get to work!" way, and fire up the debugger. I probably have more fun debugging than I do writing the original (buggy That said, the type of bug you had to deal with isn't very fun, even for me.
|
|
1
2
|