exception problem: basic_string::_S_construct NULL not valid

U

utab

Dear all,

I am using boost::lexical_cast to convert string values to real values.
(Please read the rest).

My question is not related to boost usage or asking a question related
to that. When I use that template, an exception is thrown

terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Aborted

I could not figure out the reason for this exception. I guess there is
something related to the construction of the strings that I am trying
to read from a .dat file.

Can you please give me information on this exception if possible.

Regards,
 
I

Ian Collins

utab said:
Dear all,

I am using boost::lexical_cast to convert string values to real values.
(Please read the rest).

My question is not related to boost usage or asking a question related
to that. When I use that template, an exception is thrown

terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Aborted

I could not figure out the reason for this exception. I guess there is
something related to the construction of the strings that I am trying
to read from a .dat file.

Can you please give me information on this exception if possible.
Well it looks very much like an attempt to initialise a string with a
null pointer.

Try setting a breakpoint in your debugger on the std::logic_error
constructor(s).
 
U

utab

Try setting a breakpoint in your debugger on the std::logic_error
constructor(s).

So I tried that before but could not figure out anyway but I will check
that again.

Regards,
 
U

utab

Try setting a breakpoint in your debugger on the std::logic_error
constructor(s).

But, putting breakpoints on the std::logic_error, this is specific but
do you know how to do that in DDD.

Regards
 
M

mlimber

utab said:
Dear all,

I am using boost::lexical_cast to convert string values to real values.
(Please read the rest).

My question is not related to boost usage or asking a question related
to that. When I use that template, an exception is thrown

terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Aborted

I could not figure out the reason for this exception. I guess there is
something related to the construction of the strings that I am trying
to read from a .dat file.

Can you please give me information on this exception if possible.

Please post a minimal but complete sample that demonstrates the
problem. Then we can help you better. (See this FAQ:
http://parashift.com/c++-faq-lite/how-to-post.html#faq-5.8.)

Cheers! --M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top