Program received signal: SIGABRT

Source: Internet
Author: User

We often encounter such problems when writing programs.Program received signal: SIGABRT and exc_bad_access

SIGABRT is usually caused by excessive release or unrecogized selector.

Exc_bad_access is caused by access to the released memory.

Check stackoverflow. Find the following answer and talk about the Linux kernel!

SIGABRTIs
Raised byabort(3)Function.
It's impossible to tell exactly what's going on in your program without more information, but the most common reasons thatabort()Gets
Called are:

  • Your sending a message to an objective-C object that doesn't support/implement that message. This results in the dreaded "unrecognized
    Selector sent to instance "error. (You send a message to the object that is not supported or not implemented, which leads to the terrible" unrecognized
    Selector sent to instance "error)
  • You have a failed assertion somewhere. In non-Debug builds that define the macroNDEBUG,
    The standard library macroassert(3)CILSabort()When
    The assertion fails. (You made an incorrect judgment somewhere)
  • You have some memory stomping/allocation error. Whenmalloc/freeDetect
    A specified upted heap, The may callabort()(See,
    E.g. This
    Question)
  • You're throwing an uncaught exception (either a C ++ exception or an objective-C exception) (memory allocation error, memory leakage, will call abort ())

In almost all cases, the debug console will give you a little more information about what's causingabort()To
Be called, so always take a look there.

(In most cases, the debugging console will give you more information about the causes of abort. So take a closer look ).



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.