473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

exception problem: basic_string::_S_construct NULL not valid

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,

Jun 7 '06 #1
4 41391
utab wrote:
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).

--
Ian Collins.
Jun 7 '06 #2
Try setting a breakpoint in your debugger on the std::logic_error
constructor(s).

--
Ian Collins.


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

Regards,

Jun 7 '06 #3

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

--
Ian Collins.


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

Regards

Jun 7 '06 #4
utab wrote:
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/ho...t.html#faq-5.8.)

Cheers! --M

Jun 7 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Old Wolf | last post by:
Is it possible to portably get the typename of an exception that occurred? I noticed when an uncaught exception occurred, GCC (3.4.1) displayed: terminate called after throwing an instance of...
5
by: Jim Marquardson | last post by:
Hi, I've struggled with this for a while now, so I'm asking for help. I am trying to click on a link in one page, have that link open up in a new window, and set that newly opened window's...
3
by: chramprasad | last post by:
public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
7
by: gerry | last post by:
My 1st crack at doing things the RAD way - I have a web form with a SqlDataSource and a DetailsView. I am trying to find a way to catch database exceptions so that i can display an appropriate...
3
by: c.prerovsky | last post by:
Hi there, I started messing around with JavaScript OOP a few days ago and still can't get this one to work. There are many things wich keep confusing me, eg. the various ways to define a class...
2
by: Monty | last post by:
I have a GridView in an update panel, and the GridView has an ObjectDataSource. Under certain conditions the Object that is the ObjectDataSource will throw an exception with a specific error...
12
by: Fabiano Sidler | last post by:
Hi folks! I'm using gcc 4.2.3 and glibc6 2.7. I'm doing an exception handling implementation for a library. Although I assume to have it done properly, with a handler set up, it exits the...
1
by: Magnus.Moraberg | last post by:
Hi, Is it a code practice for me to have writen the following Class? - using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.