program received signal:SIGABRT

來源:互聯網
上載者:User

平常我們寫程式的時候經常會遇到這樣的問題。program received signal:SIGABRT 以及EXC_BAD_ACCESS

SIGABRT 一般是過度release 或者 發送 unrecogized selector導致。

EXC_BAD_ACCESS 是訪問已被釋放的記憶體導致。

查了下StackOverflow。找到下面的答案,說道linux核心下面了!

SIGABRT is
raised by the abort(3) function.
It's impossible to tell exactly what's going on in your program without more information, but the most common reasons that abort() 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.(你發送給對象一個它並不支援或者是沒實現的訊息,這導致可怕的 "unrecognized
    selector sent to instance" 錯誤)
  • You have a failed assertion somewhere. In non-debug builds that define the macro NDEBUG,
    the standard library macro assert(3) calls abort() when
    the assertion fails.(某個地方你做了個錯誤的判斷)
  • You have some memory stomping/allocation error. When malloc/free detect
    a corrupted heap, the may call abort() (see,
    e.g. this
    question)
  • You're throwing an uncaught exception (either a C++ exception or an Objective-C exception)(記憶體配置出錯,記憶體泄露,會調用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.

(多數情況下,偵錯主控台會給你更多的資訊關於導致了abort的原因。所以仔細看)。



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.