Appears nsscanner:nil string argument Libc++abi.dylib:terminate_handler unexpectedly threw an exception

Source: Internet
Author: User

Came up

2015-04-04 20:12:51.501 pan doctor [5001:299704] nsscanner:nil string argument

2015-04-04 20:12:51.502 pan doctor [5001:299704] nsscanner:nil string argument

Libc++abi.dylib:terminate_handler unexpectedly threw an exception


Summary of the error message:

I couldn't find a good way to do this, and then I found out:

It turned out to be my nsstring variable of type is empty, originally I used a local variable in the code block, resulting in the subsequent exit code block, memory destruction,

Causes memory to be empty.

The workaround is to:


1. Avoid using: nsstring* string = string2;

2. Avoid using: nsstring* string1 = [NSString stringwithformat:@ ""]; form

3. In the code block, be sure to consider whether the memory is destroyed in advance:

For variables: best to use:

nsstring* string1 = [NSString alloc] initwithformat:@ "%@", string2];

The form

Above is my own opinion, insufficient please correct me, thank you. ---Little red flag

QQ-651134397

Appears nsscanner:nil string argument Libc++abi.dylib:terminate_handler unexpectedly threw an exception

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.