Boost logo

Boost Users :

Subject: Re: [Boost-users] Strange issue with boost::date_time
From: Rune Lund Olesen (rune.olesen_at_[hidden])
Date: 2009-04-14 04:31:14


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_at_[hidden]>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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net