Results 1 to 3 of 3

Thread: 'std::logic_error'

  1. #1
    Join Date
    Feb 2006
    Posts
    157
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default 'std::logic_error'

    Hi guys

    Can anybody help me to resolve this error :-
    Qt Code:
    1. terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct NULL
    To copy to clipboard, switch view to plain text mode 

    => i was compiling the project in Kdevelop ( In opensuse )
    => it compiled properly , but after that while running i need to pass a text file ( as command line argument ) to the appliaction.
    => then it is exiting from the application and thowing the error :-

    Qt Code:
    1. terminate called after throwing an instance of 'std::logic_error'
    2. what(): basic_string::_S_construct NULL not valid
    3. Aborted
    To copy to clipboard, switch view to plain text mode 

    Please help me , am so stucked

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: 'std::logic_error'

    Sounds like you're attempting to initialize std::string with NULL value.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    joseph (8th February 2008)

  4. #3
    Join Date
    Feb 2006
    Posts
    157
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Talking Re: 'std::logic_error'

    Quote Originally Posted by jpn View Post
    Sounds like you're attempting to initialize std::string with NULL value.
    Thankssssssssssssssssssssss a lot JPN
    yes that was the reason

    Let me share the problem
    => i had a one environment 'SOME_ENVR' in the main.cpp of my application
    => But by mistake (spelling mistake ) i set the environment variable as 'ENVR_SOME' ,then it was assinging "NULL" to the corresponding std::string variable.

    Now i corrected it thank you so much

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.