Thread1:Program received signal:"SIGABRT"

  • warning: Declaration of views_handler_argument::init(&$view, &$options) should be compatible with views_handler::init(&$view, $options) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_argument.inc on line 745.
  • warning: Declaration of views_handler_filter::options_validate(&$form, &$form_state) should be compatible with views_handler::options_validate($form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 585.
  • warning: Declaration of views_handler_filter::options_submit(&$form, &$form_state) should be compatible with views_handler::options_submit($form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 585.
  • warning: Declaration of views_handler_filter_boolean_operator::value_validate(&$form, &$form_state) should be compatible with views_handler_filter::value_validate($form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 149.
  • warning: Declaration of views_plugin_style_default::options(&$options) should be compatible with views_object::options() in /home/xnvgu7/public_html/sites/all/modules/views/plugins/views_plugin_style_default.inc on line 25.
  • warning: Declaration of views_plugin_row::options_validate($form, &$form_state) should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.
  • warning: Declaration of views_plugin_row::options_submit($form, &$form_state) should be compatible with views_plugin::options_submit(&$form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.

Thread1:Program received signal:"SIGABRT"

這是由Xcode4.6.2產生的project,修改Deployment Target 5.0後,Product/Run在iPhone5.0 simulator或iPad5.0simulator時,所產生的錯誤。若Product/Run在iPhone5.0 simulator或iPad5.0simulator時,不會有問題。

問題的情形如下圖:

SIGABRT

問題所在:iOS6.0開始支援Autolayout,當Deployment Target改為iOS5.0後,iOS5.0並不支援Autolayout,因而當機。而且Autolayout的設定是自動隱藏在storyboard裡面,不易發現,

解決方法:

  1. 先找到所有的.storyboard檔案,點某個.storyboard檔,找到如下圖。
    點storyboard後的畫面
  2. 去掉Autolayout:見上圖,點Book Root View Controller/Show the File Inspector,找到Interface Builder Document下本來是勾選的Use Autolayout,去掉勾選。但是,若現在Product/Run,會發現螢幕顯示不對,這是因為AutoResize沒設定好。
    不勾選Autolayout
  3. 保持AutoResize的第一步,改Size為FreeForm:點Book Root View Controller/Show the Attributes Inspector,找到Simulated Metrics下的Size,將其改為Freeform。
     Freeform
  4. 保持AutoResize的第二步,改View:點Book Root View Controller下的view,㸃Show the Size inspector,找到Autosizing(如下圖),將其改為如Autosizing上的樣子(修改方法:用滑鼠點即可)。注意:這個步驟相當於BookRootViewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;....等等。注意:對所有的view都需做這個動作。
    Autosizing
  5. 對所有的.storyboard檔內的所有其他的Controller(例如Book Data View Controller)及其下的所有的view做上2,3,4動作。