Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Allegro on NuGet!

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Allegro on NuGet!
Brooklyn
Member #12,433
December 2010
avatar

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Brooklyn
Member #12,433
December 2010
avatar

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

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
avatar

Bruce Pascoe
Member #15,931
April 2015
avatar

There is no quote button, as I found out a while back. :-/ You have to greentext:

> 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 ;)) code.

That said, the type of bug you had to deal with isn't very fun, even for me.

 1   2 


Go to: