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!
SIGABRT
Is
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 macro
NDEBUG
,
The standard library macroassert(3)
CILSabort()
When
The assertion fails. (You made an incorrect judgment somewhere)
- You have some memory stomping/allocation error. When
malloc
/free
Detect
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 ).