Perhaps try to make it a release build and then switch on some symbols if possible ?

On Mon, Apr 13, 2009 at 10:55 PM, Jared Lee Richardson <jaredr26@gmail.com> wrote:
I'm having a strange issue with the boost::date_time library - My
program runs fine with both release and debug compilations, but will
not run in standalone / the command line.  I.e., the program works
when I run it through the MS visual studio debugger, whether the
program is built with debugging symbols or not.  It also ran correctly
when run through dependency walker.

It does not run when run without either of those, i.e. on a command
line.  Through print statements I determined that it is running
through the initialization and crashes(windows brings up the crashed
executable dialog, "This.exe has encountered a problem and needs to
close.")  The exact code it crashes on is the allocation of a class
that contains time_durations:

class TempClass
{
public:
   list<time_duration> TDList;
   time_duration SomeOtherDuration;
};

and then crashes when allocating this object:

TempClass* pTempClass;
pTempClass = new TempClass; // <--- Crashes when run without debugger.


The program crashes on the new.  I tried putting a try/catch block
around it for any exception to see if any were being hit and none are.
 I had tried to reproduce this issue in a much simpler program, but
have not had any luck thus far - the test program always runs
correctly.

Any ideas or things to try?  This is not the first instantiation of a
time_duration(pushed into a vector a few lines before this), but may
be the first instantiation of a std::list.  The pointer listed above
is actually a member of another class that is contained in a vector,
if that matters(shouldn't).

Any help?  If not I can try again at creating a simpler program that
exhibits the problem and paste it.

Thanks, Jared
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users