473,770 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_err or'
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 41485
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_err or'
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_erro r
constructor(s).

--
Ian Collins.
Jun 7 '06 #2
Try setting a breakpoint in your debugger on the std::logic_erro r
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_erro r
constructor(s).

--
Ian Collins.


But, putting breakpoints on the std::logic_erro r, 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_err or'
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
3494
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 'std::logic_error' what(): basic_string::_S_construct NULL not valid So I tried:
5
4217
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 ifram to a specific url. Here is the code I'm using: <html> <head>
3
6814
by: chramprasad | last post by:
public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { MissionForm missionForm = (MissionForm) form; String strMissionId = InsEncr.getSingleton().decrypt(missionForm.getMissionId().toString()); Long userEntityTypeId = getUserEntityTypeId(request); String strUserEntityTypeId =...
7
2385
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 error message and let the user fix the data and resubmit the form. ( In this case it is a dup key violation - so nothing I can pre-edit for ) The only way I can see to catch db exceptions is by overriding Page.OnError and looking at Context.Error....
3
3473
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 or especially methods. Ok, here's the code I'm trying to get to work. I'm trying to create a selection mask with drag handles, which will enable the user to select an area of an image. currently I'm stuck with "el.addEventListener('mousedown',...
2
3692
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 message, but on the client side the only error message displayed is "exception has been thrown by the target of an invocation". I would like the error message on the client to show the error description the object provides when it throws the error. Is...
12
1703
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 program with a random exit value, and without a handler set up, it crashes with a SIGSEGV, but as I have found out with gdb, at the same line of code: __libc_siglongjmp (env=0xbfb935f0, val=1) at longjmp.c:29 29 {
1
9388
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 System.Collections;
0
9617
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10254
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10099
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9904
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7451
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.