Boost logo

Boost Users :

Subject: Re: [Boost-users] About log example in visual studio 2008
From: Xiande Cao (xiande.cao_at_[hidden])
Date: 2014-03-19 14:13:58


Hi, Stev,

Here is where the program stops,
In "formater_parser.cpp file
        const std::size_t len = end - begin;
        if (std::char_traits< char_type
>::length(constants::message_text_keyword()) == len &&
            std::char_traits< char_type
>::compare(constants::message_text_keyword(), begin, len) == 0)
        {
            m_AttrName = log::aux::default_attribute_names::message();
        }
        else
        {
 ???--> m_AttrName =
attribute_name(log::aux::to_narrow(string_type(begin, end)));
        }
    }

Here is the call stack,
> cvsie.exe!boost::log::v2s_mt_nt5::`anonymous
namespace'::formatter_parser<char>::on_attribute_name(const char *
begin=0x000000013f259a81, const char * end=0x000000013f259a8a) Line 359 +
0x4d bytes C++
  cvsie.exe!boost::log::v2s_mt_nt5::`anonymous
namespace'::formatter_parser<char>::parse(const char * &
begin=0x000000013f259a80, const char * end=0x000000013f259a96) Line 225 C++
  cvsie.exe!boost::log::v2s_mt_nt5::parse_formatter<char>(const char *
begin=0x000000013f259a80, const char * end=0x000000013f259a96) Line 436 C++
  cvsie.exe!boost::log::v2s_mt_nt5::parse_formatter<char>(const char *
str=0x000000013f259a80) Line 207 + 0x22 bytes C++
  cvsie.exe!boost::log::v2s_mt_nt5::aux::acquire_formatter<char>(const char
* formatter=0x000000013f259a80) Line 82 + 0xf bytes C++
  cvsie.exe!boost::log::v2s_mt_nt5::aux::setup_formatter<boost::log::v2s_mt_nt5::sinks::synchronous_sink<boost::log::v2s_mt_nt5::sinks::basic_text_ostream_backend<char>
>,boost::parameter::aux::tagged_argument<boost::log::v2s_mt_nt5::keywords::tag::format,char
const [23]>
>(boost::log::v2s_mt_nt5::sinks::synchronous_sink<boost::log::v2s_mt_nt5::sinks::basic_text_ostream_backend<char>
> & s={...}, const
boost::parameter::aux::tagged_argument<boost::log::v2s_mt_nt5::keywords::tag::format,char
const [23]> & args={...}, boost::mpl::bool_<0> __formal={...}) Line 107 +
0x1e bytes C++
  cvsie.exe!boost::log::v2s_mt_nt5::aux::add_console_log<char,boost::parameter::aux::tagged_argument<boost::log::v2s_mt_nt5::keywords::tag::format,char
const [23]> >(std::basic_ostream<char,std::char_traits<char> > &
strm={...}, const
boost::parameter::aux::tagged_argument<boost::log::v2s_mt_nt5::keywords::tag::format,char
const [23]> & args={...}) Line 79 C++
  cvsie.exe!boost::log::v2s_mt_nt5::add_console_log<char,boost::parameter::aux::tagged_argument<boost::log::v2s_mt_nt5::keywords::tag::format,char
const [23]> >(std::basic_ostream<char,std::char_traits<char> > &
strm={...}, const
boost::parameter::aux::tagged_argument<boost::log::v2s_mt_nt5::keywords::tag::format,char
const [23]> & arg1={...}) Line 136 + 0x14 bytes C++
  cvsie.exe!main(int argc=1, char * * argv=0x0000000000248890) Line 82 +
0x32 bytes C++
  cvsie.exe!__tmainCRTStartup() Line 586 + 0x19 bytes C
  cvsie.exe!mainCRTStartup() Line 403 C

The error shows:
Unhandled exception at 0x000000013f146b63 in cvsie.exe: 0xC0000005: Access
violation reading location 0x0000000000000070.

Thanks!

Regards,

Triston

On Wed, Mar 19, 2014 at 8:42 AM, Steven Watanabe <watanabesj_at_[hidden]>wrote:

> AMDG
>
> On 03/18/2014 10:59 PM, Xiande Cao wrote:
> >
> > I was trying to run the log basic usage
> > (libs/log/example/basic_usage/main.cpp) example in visual studio. And it
> > crashed at line
> > logging::add_console_log(std::clog, keywords::format = "%TimeStamp%:
> > %Message%");
> >
> > Stopped at
> > <snip>
> >
> > Anybody has successfully run the example?
> >
>
> It works fine for me with VC9 and VC11. What version of
> Boost are you using? What is the error that you get?
>
> In Christ,
> Steven Watanabe
>
>
> _______________________________________________
> 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