Nswarn: nil string argument libc ++ abi. dylib: terminate_handler unexpectedly threw an exception, exceptionhandler
Yes
20:12:51. 501 Pan doctor [5001: 299704] nssag: nil string argument
20:12:51. 502 Pan doctor [5001: 299704] nssag: nil string argument
Libc ++ abi. dylib: terminate_handler unexpectedly threw an exception
Summary of error messages:
I couldn't find a good method when this error occurs, but then I found out:
It turns out that the NSString type variable I uploaded is empty. It turns out that I used a local variable in the code block. As a result, when I exit the code block, the memory is destroyed,
The memory is empty.
Solution:
1. Avoid using NSString * string = string2;
2. Avoid using NSString * string1 = [NSString stringWithFormat: @ ""];
3. In the code block, consider whether the memory is destroyed in advance:
For variables: it is best to use:
NSString * string1 = [NSString alloc] initWithFormat: @ "% @", string2];
Format
// The above is my opinion. please correct me if you have any questions. Thank you. --- Xiaohongqi
QQ-651134397