Boost logo

Boost Users :

Subject: Re: [Boost-users] Strange issue with boost::date_time
From: Jared Lee Richardson (jaredr26_at_[hidden])
Date: 2009-04-14 18:20:27


On Tue, Apr 14, 2009 at 1:56 AM, Igor R <boost.lists_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.
>
> Ensure that all your libs are built with the same CRT/ STL options
> (threading, _SECURE_SCL etc.)

Hmm, I tried to find anything on that, but I couldn't. I'm not sure
what the boost libraries I'm using were built with, but I don't have
anything special in my builds. No multithreading(yet), none of those
defines.

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

Actually it runs fine without any symbols at all. It only crashes if
no other program is hooked, like a debugger or dependencywalker.

I discovered that the problem happens/can happen on one of several new
calls, but only when linking to the date_time libraries. I removed
everything from my project except the offending code, and the crash
only went away when I stopped linking to date_time. I even changed
the type of variable I am allocating to double instead of
time_duration, and it only goes away if I stop linking to date_time.

I'm going to try to remove even more code and narrow it down, and then
I'll paste the offending code. Basically all I'm doing right now is
initializing some time variables, then opening and reading from a
file. It crashes on allocating 5 chars inside a function that reads
from a file(or on allocating the class that contains a
std::list<double> and a double).

Any other ideas?

Thanks, Jared.


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