質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Objective-C

Objective-Cはオブジェクト指向型のプログラミング言語のひとつです。C言語をベースにSmalltalkが取り入れられています。

iPad

iPadは、Appleがデザインしたタブレット型コンピュータです。iPadアプリケーションは通常Xcode IDEのObjective-Cで書かれますが、iPadアプリケーションを組むためのほかのツールを使うことも可能です。

Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

Q&A

0回答

1619閲覧

アプリ実行時にThread 1:signal SIGABRTが出力されクラッシュする

hw_test

総合スコア13

Objective-C

Objective-Cはオブジェクト指向型のプログラミング言語のひとつです。C言語をベースにSmalltalkが取り入れられています。

iPad

iPadは、Appleがデザインしたタブレット型コンピュータです。iPadアプリケーションは通常Xcode IDEのObjective-Cで書かれますが、iPadアプリケーションを組むためのほかのツールを使うことも可能です。

Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

0グッド

0クリップ

投稿2018/12/14 08:31

編集2018/12/16 23:59

xcodeにiPadを接続し実行するとThread 1:signal SIGABRTが出力されてしまい
アプリが起動直後にクラッシュしてしまいます。

main.m

1int main(int argc, char * argv[]) 2{ 3 @autoreleasepool { 4 return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 5 } 6}

上記のreturnの行でThread 1:signal SIGABRTが出ておりました。

エラー詳細

2018-12-14 10:45:00.622204+0900 abcSystem[1512:961641] <LeftMenuViewController: 0x102016d20> willMoveToParentViewController <JASidePanelController: 0x102844600> 2018-12-14 10:45:00.622391+0900 abcSystem[1512:961641] <LeftMenuViewController: 0x102016d20> didMoveToParentViewController <JASidePanelController: 0x102844600> 2018-12-14 10:45:00.654390+0900 abcSystem[1512:961641] <WeldListViewController: 0x10170dca0> willMoveToParentViewController <UINavigationController: 0x10181f800> 2018-12-14 10:45:00.764714+0900 abcSystem[1512:961641] *** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3698.93.8/UIApplication.m:3855 2018-12-14 10:45:00.765230+0900 abcSystem[1512:961641] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch' *** First throw call stack: (0x1d2fdfea0 0x1d21b1a40 0x1d2ef5c1c 0x1d39e3140 0x1ffda3710 0x1ff63f358 0x1ff647fd8 0x1ff63efd4 0x1ff63f974 0x1ff63da74 0x1ff63d720 0x1ff6428e0 0x1ff643840 0x1ff642798 0x1ff647684 0x1ffda17a0 0x1ff98abac 0x1d5a149d4 0x1d5a1f79c 0x1d5a1ee94 0x101614dc8 0x101618a10 0x1d5a53a9c 0x1d5a53728 0x1d5a53d44 0x1d2f701cc 0x1d2f7014c 0x1d2f6fa30 0x1d2f6a8fc 0x1d2f6a1cc 0x1d51e1584 0x1ffda5054 0x100ecfcd0 0x1d2a2abb4) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

一番初めの画面生成ソース

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // ウィンドウ初期化 おためし //self.window.rootViewController = [UIViewController new]; // SidePanelの初期設定 self.sidePenelController = [[JASidePanelController alloc] init]; self.sidePenelController.shouldDelegateAutorotateToVisiblePanel = NO; self.sidePenelController.allowLeftSwipe = NO; self.sidePenelController.leftPanel = [[LeftMenuViewController alloc] init]; self.sidePenelController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[WeldListViewController alloc] init]]; self.window.rootViewController = self.sidePenelController; [self.window makeKeyAndVisible]; // NavigationBarの背景画像を設定する UIImage *image = [UIImage imageNamed:@"bg_navigationbar.png"]; [[UINavigationBar appearance] setBackgroundImage:image forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setTintColor:[CommonFunction hexToUIColor:@"FFFFFF" alpha:1.0]]; // NavigationBarのタイトルフォントを変更する [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIFont boldSystemFontOfSize:30],UITextAttributeFont, [CommonFunction hexToUIColor:TITLE_BAR_TEXT_COLOR alpha:1.0], // タイトルの文字色 NSForegroundColorAttributeName, nil, // シャドウの色 NSShadowAttributeName, // シャドウの強さ(x, y) nil ]]; // NSUserDefaultsに初期値を登録する NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; NSMutableDictionary *defaults = [NSMutableDictionary dictionary]; [defaults setObject:@"FALSE" forKey:KEY_LOGIN_OK]; [ud registerDefaults:defaults]; // DBの初回open if (![self firstOpenDatabase]) { [CommonFunction errAlertShow:ERR_DB_OPEN_ERROR]; } return YES; }

「試してみたこと」
以下のサイトを参考にし、View Controllerでエラーが出ていないか確認しましたが、
特に何もエラーは出ていませんでした。
https://teratail.com/questions/8372
また、以下のサイトの対処方法を実施してみましたがかわりませんでした。
※上記ソース内の// ウィンドウ初期化 おためし の部分
https://qiita.com/peromasamune/items/716de6da66dd31faeba8

「環境」
MacBook Pro iOS:10.13.6
Xcode:10.1
iPad iOS:12.1

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問