Slide 1

Slide 1 text

シンボリケート
 クラッシュログを人間が読めるようになるまで 俺コン 2018 Summer Day.1 ※クラッシュログを使ったデバッグ手法については話しません!

Slide 2

Slide 2 text

About Me • ひろん(一宮 浩教) • Twitter:
 @hironytic • GitHub:
 https://github.com/hironytic • 株式会社MetaMoJi
 徳島在住エンジニア ͍͚ͬͳʔ͍τʔΫτʔΫࢲɺͻΖΜɻࠓ೥΋iOSDCͷLTʹԠืͨ͠ͷ✨Ͱ΋ iOSDC͸ڝٕLTΦʔσΟΤϯε΋͍ͬͺ͍͍Δ͔Βۓுͯ͠͠Ό΂Εͳ͍Αʔ͋ɺͦ ͏ͩAVSpeechSynthesizerͪΌΜͱPDF Kit͘ΜʹཔΊ͹ɺ୅ΘΓʹൃදͯ͘͠ΕΔΜ ͡Όͳ͍ʁࢲ͋ͬͨ·͍͍ʔ…ͬͯຊ౰ʹ࠾୒͞ΕͨΒͲ͏͠Α͏࣍ճʮશ෦iOSʹ ͠Ό΂ΒͤͪΌ͑ʂʯָ͓͠Έʹ

Slide 3

Slide 3 text

アジェンダ • クラッシュログとシンボリケート • シンボリケート失敗例とその原因の究明 • クラッシュログのねつ造

Slide 4

Slide 4 text

第1部 出会い編

Slide 5

Slide 5 text

パン + 衝突 = 恋に落ちる (クラッシュ)

Slide 6

Slide 6 text

身近なクラッシュ • 自社プロダクトを通常利用していたら落ちた • 同僚/友人からのクラッシュ報告 • お客様からのクラッシュ報告 クラッシュログが見たいですよね デバイス内に残っています

Slide 7

Slide 7 text

Demo

Slide 8

Slide 8 text

デバイス内のクラッシュログ • 「設定」アプリ
 
 プライバシー → 解析 → 解析データ
 → <アプリ名-日付-時刻.ips> ※ iOS 11の場合。OSのバージョンによって微妙に場所が異なる ※ メモリ不足でクラッシュしたときは
 JetsamEvent-日付-時刻.ipsが出力されるが、これはまた別

Slide 9

Slide 9 text

iTunesで同期 • iTunesで「母艦」と同期すれば /Users/<Ϣʔβʔ໊>/Library/Logs/
 CrashReporter/MobileDevice/<୺຤໊>/
 <ΞϓϦ໊೔෇࣌ࠁ.crash>

Slide 10

Slide 10 text

読めない Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 DramaticCrash 0x0000000100c8d708 0x100c88000 + 22280 1 DramaticCrash 0x0000000100c8d668 0x100c88000 + 22120 2 DramaticCrash 0x0000000100c8c2bc 0x100c88000 + 17084 3 UIKit 0x000000018ddb30cc 0x18dc9f000 + 1130700 4 UIKit 0x000000018ddb2d84 0x18dc9f000 + 1129860 5 UIKit 0x000000018ddb1aa0 0x18dc9f000 + 1125024 6 UIKit 0x000000018ddad5ec 0x18dc9f000 + 1107436 7 UIKit 0x000000018dcea6f4 0x18dc9f000 + 308980 8 QuartzCore 0x000000018825fe54 0x18813d000 + 1191508 9 QuartzCore 0x0000000188263fe4 0x18813d000 + 1208292 10 QuartzCore 0x00000001881d06c8 0x18813d000 + 603848 11 QuartzCore 0x00000001881f81b0 0x18813d000 + 766384 12 QuartzCore 0x0000000188148d38 0x18813d000 + 48440 13 IOKit 0x000000018433f48c 0x18433a000 + 21644 14 CoreFoundation 0x0000000184064b20 0x183f91000 + 867104 15 CoreFoundation 0x000000018407fae8 0x183f91000 + 977640 16 CoreFoundation 0x000000018407f230 0x183f91000 + 975408 17 CoreFoundation 0x000000018407cc80 0x183f91000 + 965760 18 CoreFoundation 0x0000000183f9cda8 0x183f91000 + 48552 19 GraphicsServices 0x0000000185f82020 0x185f77000 + 45088 20 UIKit 0x000000018dfbc758 0x18dc9f000 + 3266392

Slide 11

Slide 11 text

✨ symbolicatecrash ✨

Slide 12

Slide 12 text

symbolicatecrash • Xcodeに含まれているツール • クラッシュログを「シンボリケート」して、人間 が読めるかたちにしてくれる

Slide 13

Slide 13 text

使い方 ターミナルを開いて $ export DEVELOPER_DIR=/Applications/Xcode.app/Contents/ Developer
 $ /Applications/Xcode.app/Contents/SharedFrameworks/ DVTFoundation.framework/Versions/A/Resources/symbolicatecrash Ϋϥογϡϩά.ips >ग़ྗઌϑΝΠϧ DEVELOPER_DIR環境変数が必要 symbolicatecrashを実行 結果は標準出力に出るので、
 リダイレクト(必要に応じて)

Slide 14

Slide 14 text

Demo

Slide 15

Slide 15 text

気持ちが通じた Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 DramaticCrash 0x0000000100c8d708 specialized ViewController.tableView(_:cellForRowAt:) + 1 DramaticCrash 0x0000000100c8d668 specialized ViewController.tableView(_:cellForRowAt:) + 2 DramaticCrash 0x0000000100c8c2bc @objc ViewController.tableView(_:cellForRowAt:) + 17084 3 UIKit 0x000000018ddb30cc -[UITableView _createPreparedCellForGlobalRow:withIndex 4 UIKit 0x000000018ddb2d84 -[UITableView _createPreparedCellForGlobalRow:willDispl 5 UIKit 0x000000018ddb1aa0 -[UITableView _updateVisibleCellsNow:isRecursive:] + 22 6 UIKit 0x000000018ddad5ec -[UITableView layoutSubviews] + 140 7 UIKit 0x000000018dcea6f4 -[UIView+ 308980 (CALayerDelegate) layoutSublayersOfLay 8 QuartzCore 0x000000018825fe54 -[CALayer layoutSublayers] + 184 9 QuartzCore 0x0000000188263fe4 CA::Layer::layout_if_needed+ 1208292 (CA::Transaction*) 10 QuartzCore 0x00000001881d06c8 CA::Context::commit_transaction+ 603848 (CA::Transactio 11 QuartzCore 0x00000001881f81b0 CA::Transaction::commit+ 766384 () + 580 12 QuartzCore 0x0000000188148d38 CA::Display::DisplayLink::dispatch_items+ 48440 (unsign 13 IOKit 0x000000018433f48c IODispatchCalloutFromCFMessage + 492 14 CoreFoundation 0x0000000184064b20 __CFMachPortPerform + 188 15 CoreFoundation 0x000000018407fae8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTIO 16 CoreFoundation 0x000000018407f230 __CFRunLoopDoSource1 + 440 17 CoreFoundation 0x000000018407cc80 __CFRunLoopRun + 2456 18 CoreFoundation 0x0000000183f9cda8 CFRunLoopRunSpecific + 552 19 GraphicsServices 0x0000000185f82020 GSEventRunModal + 100 20 UIKit 0x000000018dfbc758 UIApplicationMain + 236

Slide 16

Slide 16 text

第1部 まとめ • クラッシュログはデバイスに残っている • 設定アプリ、iTunes同期で取り出せる • symbolicatecrashで人間が読めるかたちにできる

Slide 17

Slide 17 text

第2部 すれ違い編

Slide 18

Slide 18 text

シンボリケート失敗 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 DramaticCrash 0x0000000100c8d708 0x100c88000 + 22280 1 DramaticCrash 0x0000000100c8d668 0x100c88000 + 22120 2 DramaticCrash 0x0000000100c8c2bc 0x100c88000 + 17084 3 UIKit 0x000000018ddb30cc -[UITableView _createPreparedCellForGlobalRow:withIndex 4 UIKit 0x000000018ddb2d84 -[UITableView _createPreparedCellForGlobalRow:willDispl 5 UIKit 0x000000018ddb1aa0 -[UITableView _updateVisibleCellsNow:isRecursive:] + 22 6 UIKit 0x000000018ddad5ec -[UITableView layoutSubviews] + 140 7 UIKit 0x000000018dcea6f4 -[UIView+ 308980 (CALayerDelegate) layoutSublayersOfLay 8 QuartzCore 0x000000018825fe54 -[CALayer layoutSublayers] + 184 9 QuartzCore 0x0000000188263fe4 CA::Layer::layout_if_needed+ 1208292 (CA::Transaction*) 10 QuartzCore 0x00000001881d06c8 CA::Context::commit_transaction+ 603848 (CA::Transactio 11 QuartzCore 0x00000001881f81b0 CA::Transaction::commit+ 766384 () + 580 12 QuartzCore 0x0000000188148d38 CA::Display::DisplayLink::dispatch_items+ 48440 (unsign 13 IOKit 0x000000018433f48c IODispatchCalloutFromCFMessage + 492 14 CoreFoundation 0x0000000184064b20 __CFMachPortPerform + 188 15 CoreFoundation 0x000000018407fae8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTIO 16 CoreFoundation 0x000000018407f230 __CFRunLoopDoSource1 + 440 17 CoreFoundation 0x000000018407cc80 __CFRunLoopRun + 2456 アプリ部分がシンボリケートできていない

Slide 19

Slide 19 text

シンボリケート失敗 OSのフレームワーク部分がシンボリケートできていない Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 DramaticCrash 0x0000000100c8d708 specialized ViewController.tableView(_:cellForRowAt:) + 1 DramaticCrash 0x0000000100c8d668 specialized ViewController.tableView(_:cellForRowAt:) + 2 DramaticCrash 0x0000000100c8c2bc @objc ViewController.tableView(_:cellForRowAt:) + 17084 3 UIKit 0x000000018ddb30cc 0x18dc9f000 + 1130700 4 UIKit 0x000000018ddb2d84 0x18dc9f000 + 1129860 5 UIKit 0x000000018ddb1aa0 0x18dc9f000 + 1125024 6 UIKit 0x000000018ddad5ec 0x18dc9f000 + 1107436 7 UIKit 0x000000018dcea6f4 0x18dc9f000 + 308980 8 QuartzCore 0x000000018825fe54 0x18813d000 + 1191508 9 QuartzCore 0x0000000188263fe4 0x18813d000 + 1208292 10 QuartzCore 0x00000001881d06c8 0x18813d000 + 603848 11 QuartzCore 0x00000001881f81b0 0x18813d000 + 766384 12 QuartzCore 0x0000000188148d38 0x18813d000 + 48440 13 IOKit 0x000000018433f48c 0x18433a000 + 21644 14 CoreFoundation 0x0000000184064b20 0x183f91000 + 867104 15 CoreFoundation 0x000000018407fae8 0x183f91000 + 977640 16 CoreFoundation 0x000000018407f230 0x183f91000 + 975408 17 CoreFoundation 0x000000018407cc80 0x183f91000 + 965760

Slide 20

Slide 20 text

なぜこんなことが
 起きるのか?

Slide 21

Slide 21 text

symbolicatecrashを見てみよう • symbolicatecrashは
 Perlのスクリプト • 何をやっているのかわかる • しかし、約1500行もある • Perlが苦手(個人的事情) #!/usr/bin/perl -w # # This script parses a crashdump file and attempts to resolve addresses into function names. # # It finds symbol-rich binaries by: # a) searching in Spotlight to find .dSYM files by UUID, then finding the executable from there. # That finds the symbols for binaries that a developer has built with "DWARF with dSYM File". # b) searching in various SDK directories. # # Copyright (c) 2008-2015 Apple Inc. All Rights Reserved. # # use strict; use warnings; use Getopt::Long; use Cwd qw(realpath); use List::MoreUtils qw(uniq); use File::Basename qw(basename); use File::Glob ':glob'; use Env qw(DEVELOPER_DIR); use Config; no warnings "portable"; require bigint; if($Config{ivsize} < 8) { bigint->import(qw(hex)); } ############################# # Forward definitons sub usage(); ############################# # read and parse command line my $opt_help = 0; my $opt_verbose = 0; my $opt_output = "-"; my @opt_dsyms = (); my $opt_spotlight = 1; Getopt::Long::Configure ("bundling"); GetOptions ("help|h" => \$opt_help, "verbose|v" => \$opt_verbose, "output|o=s" => \$opt_output, "dsym|d=s" => \@opt_dsyms, "spotlight!" => \$opt_spotlight) or die("Error in command line arguments\n"); usage() if $opt_help; ############################# # have this thing to de-HTMLize Leopard-era plists my %entity2char = ( # Some normal chars that have special meaning in SGML context amp => '&', # ampersand 'gt' => '>', # greater than 'lt' => '<', # less than quot => '"', # double quote

Slide 22

Slide 22 text

############################# # run the script symbolicate_log(@ARGV); exit 0; ############################# sub symbolicate_log { my ($file,@extra_search_paths) = @_; print STDERR "Symbolicating $file ...\n" if ( $opt_verbose && defi print STDERR "Symbolicating stdin ...\n" if ( $opt_verbose && ! de my $log_ref = slurp_file($file); メインの処理は symbolicate_log

Slide 23

Slide 23 text

symbolicate_logの
 最後の方で呼んでいるのが
 symbolize_frames next; } # run atos symbolize_frames($images,$bt,$is_spindump_report); if(keys %$bt) { # run our fancy regex $process_section = replace_symbolized_frames($process_secti

Slide 24

Slide 24 text

next; } # run atos symbolize_frames($images,$bt,$is_spindump_report); if(keys %$bt) { # run our fancy regex $process_section = replace_symbolized_frames($process_secti symbolicate_logの
 最後の方で呼んでいるのが
 symbolize_frames # run atos sub symbolize_frames { my ($images,$bt,$is_spindump_report) = @_; # create mapping of framework => address => bt frame (adjust for sli

Slide 25

Slide 25 text

# run atos sub symbolize_frames { my ($images,$bt,$is_spindump_report) = @_; # create mapping of framework => address => bt frame (adjust for sli # run atos with the addresses and binary files we just gathered my $arch = $arch_map{$symbol}; my $base = $base_map{$symbol}; my $lib = $image_map{$symbol}; my $cmd = "'$atos' -arch $arch -l $base -o '$escapedSymbol' @{[ keys % print STDERR "Running $cmd\n" if $opt_verbose; open my($ph),$cmd or die $!; my @symbolled_frames = map { chomp; $_ } <$ph>; close $ph or die $!; 別のプログラムを
 呼び出している

Slide 26

Slide 26 text

atos atos -arch architecture -l load-address -o binary-image address ... arm64 0x100c88000 /………/DramaticCrash 0x0000000100c8d708 0x0000000100c8d668 0x0000000100c8c2bc アドレスをシンボルに変換するコマンド specialized ViewController.tableView(_:cellForRowAt:) (in DramaticCrash) (ViewController.swift:0) specialized ViewController.tableView(_:cellForRowAt:) (in DramaticCrash) (ViewController.swift:0) @objc ViewController.tableView(_:cellForRowAt:) (in DramaticCrash) (ViewController.swift:61)

Slide 27

Slide 27 text

atos • symbolicatecrashは内部でatosを使ってシンボリケート を実行している • atosの実行にはアドレス以外に3つのパラメータが必要 - architecture - load-address - binary-image • シンボリケートできないのはこれらのパラメータが揃わ ないとき 友情 努力 勝利

Slide 28

Slide 28 text

パラメータはどこから? # run atos with the addresses and binary files we just gathered my $arch = $arch_map{$symbol}; my $base = $base_map{$symbol}; my $lib = $image_map{$symbol}; my $cmd = "'$atos' -arch $arch -l $base -o '$escapedSymbol' @{[ keys % print STDERR "Running $cmd\n" if $opt_verbose; open my($ph),$cmd or die $!; my @symbolled_frames = map { chomp; $_ } <$ph>; close $ph or die $!; # run atos sub symbolize_frames { my ($images,$bt,$is_spindump_report) = @_; # create mapping of framework => address => bt frame (adjust for sli { "Foundation": { "path": …, "uuid": …, "symbol": …, "arch": …, "plus": …, "nextID": …, "base": …, "bundlename": …, "extent": … }, "libSystem_kernel.dylib": { "path": …, "uuid": …, "symbol": …, … }, … } → architecture → load-address → binary-image モジュール

Slide 29

Slide 29 text

next; } # run atos symbolize_frames($images,$bt,$is_spindump_report); if(keys %$bt) { # run our fancy regex $process_section = replace_symbolized_frames($process_section,$bt # read the binary images my ($images,$first_bundle) = parse_images($process_section, $report_ if ( $opt_verbose ) { imagesはどこから?

Slide 30

Slide 30 text

next; } # run atos symbolize_frames($images,$bt,$is_spindump_report); if(keys %$bt) { # run our fancy regex $process_section = replace_symbolized_frames($process_section,$bt # read the binary images my ($images,$first_bundle) = parse_images($process_section, $report_ if ( $opt_verbose ) { sub parse_images { my ($log_ref, $report_version, $is_spindump_report) = @_; my $section = parse_section($log_ref,'Binary Images Description',mu if (!defined($section)) { $section = parse_section($log_ref,'\\s*Binary\\s*Images',multil } if (!defined($section)) { 'bundlename' => \$4, 'uuid' => \$5, 'path' => \$6); } elsif($report_version == 104 || $report_version == 105) { # Kirkwood # 0x182155000 - 0x1824c6fff CoreFoundation arm64 /Sys $pat = ' ^\s* (\w+) \s* \- \s* (\w+) \s* (?# the range base and extent [1,2] ) (\+)? (?# the application may have a + in front of the name (.+) (?# bundle name [4] ) \s+ ('.$architectures.') \s+ (?# the image arch [5] ) \([[:xdigit:]]{32})?\>? (?# possible UUID [6] ) \s* (\/.*)\s*$ (?# first fwdslash to end we hope is path [7] ) '; %captures = ( 'base' => \$1, 'extent' => \$2, 'plus' => \$3, 'bundlename' => \$4, 'arch' => \$5, 'uuid' => \$6, 'path' => \$7); }

Slide 31

Slide 31 text

parse_image Binary Images: 0x100c88000 - 0x100c8ffff DramaticCrash arm64 /var/containers/Bund 0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 /var/contai 0x100d6c000 - 0x100d73fff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /var/container 0x100d80000 - 0x100d87fff libswiftObjectiveC.dylib arm64 <062bd1c402933010b791eb1a4d4dc93b> /var/cont 0x100d98000 - 0x100d9ffff libswiftQuartzCore.dylib arm64 <5df1cca7da493ae6bc61aaf18034779e> /var/cont 0x100dac000 - 0x100dbbfff libswiftUIKit.dylib arm64 <412b48c607fb3096a8f42fa3c159b67a> /var/container 0x100dd4000 - 0x100ddbfff libswiftos.dylib arm64 /var/containers/B 0x100f24000 - 0x100f5ffff dyld arm64 /usr/lib/dyld 0x100fb8000 - 0x1012c3fff libswiftCore.dylib arm64 <4fe543830b383378b946c669dd45fdd0> /var/containers 0x10159c000 - 0x1016f7fff libswiftFoundation.dylib arm64 /var/cont 0x18320a000 - 0x18320bfff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSyst 0x18320c000 - 0x183264fff libc++.1.dylib arm64 /usr/lib/libc++.1.d クラッシュログの最後にあるこの部分の
 情報を取ってきている

Slide 32

Slide 32 text

parse_image Binary Images: 0x100c88000 - 0x100c8ffff DramaticCrash arm64 /var/containers/Bund 0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 /var/contai 0x100d6c000 - 0x100d73fff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /var/container クラッシュログの最後にあるこの部分の
 情報を取ってきている 勝利 symbol
 → binary-image ? uuid base
 → load-address 友情 arch
 → architecture 努力

Slide 33

Slide 33 text

next; } # run atos symbolize_frames($images,$bt,$is_spindump_report); if(keys %$bt) { # run our fancy regex $process_section = replace_symbolized_frames($process_section,$bt # read the binary images my ($images,$first_bundle) = parse_images($process_section, $report_v if ( $opt_verbose ) { symbolはどこから? } @extra_search_paths = (@extra_search_paths, getSymbolDirPaths($model, $ fetch_symbolled_binaries($images,$build,$first_bundle,@extra_search_pat # If we didn't get *any* symbolled binaries, just print out the origina my $imageCount = keys(%$images);

Slide 34

Slide 34 text

} @extra_search_paths = (@extra_search_paths, getSymbolDirPaths($model, $ fetch_symbolled_binaries($images,$build,$first_bundle,@extra_search_pat # If we didn't get *any* symbolled binaries, just print out the origina my $imageCount = keys(%$images); symbolへの道 $symbol = $$lib{symbol}; if ($symbol) { print STDERR "-- [$$lib{uuid}] found in cache\n" if $op } else { ($symbol, $arch) = getSymbolPathAndArchFor($$lib{path}, @{$uuid_cache{$$lib{uuid}}} = ($symbol, $arch); if ( $symbol ) { $$lib{symbol} = $symbol;

Slide 35

Slide 35 text

} @extra_search_paths = (@extra_search_paths, getSymbolDirPaths($model, $ fetch_symbolled_binaries($images,$build,$first_bundle,@extra_search_pat # If we didn't get *any* symbolled binaries, just print out the origina my $imageCount = keys(%$images); $symbol = $$lib{symbol}; if ($symbol) { print STDERR "-- [$$lib{uuid}] found in cache\n" if $op } else { ($symbol, $arch) = getSymbolPathAndArchFor($$lib{path}, @{$uuid_cache{$$lib{uuid}}} = ($symbol, $arch); if ( $symbol ) { $$lib{symbol} = $symbol; sub getSymbolPathAndArchFor { my ($path,$build,$uuid,@extra_search_paths) = @_; # derive a few more parameters... my $bin = ($path =~ /^.*?([^\/]+)$/)[0]; # basename # Look in any of the manually-passed dSYMs if( @opt_dsyms ) { print STDERR "-- [$uuid] CHECK (manual)\n" if $opt_verbose; my ($out_path, $arch) = getSymbolPathAndArchFor_manualDSYM($uuid if(defined($out_path) && length($out_path) && defined($arch) && 4つの処理を順に呼び出して、uuidに
 一致するシンボル情報ファイルを探している

Slide 36

Slide 36 text

# Look in any of the manually-passed dSYMs if( @opt_dsyms ) { print STDERR "-- [$uuid] CHECK (manual)\n" if $opt_verbose; my ($out_path, $arch) = getSymbolPathAndArchFor_manualDSYM($uuid if(defined($out_path) && length($out_path) && defined($arch) && print STDERR "-- [$uuid] MATCH (manual): $out_path ($arch)\n return ($out_path, $arch); } print STDERR "-- [$uuid] NO MATCH (manual)\n\n" if $opt_verbose } ① getSymbolPathAndArchFor_manualDSYM

Slide 37

Slide 37 text

# Look for a UUID match in the cache directory my $uuidsPath = "/Volumes/Build/UUIDToSymbolMap"; if ( -d $uuidsPath ) { print STDERR "-- [$uuid] CHECK (uuid cache)\n" if $opt_verbose; my $out_path = getSymbolPathFor_uuid($uuid, $uuidsPath); if(defined($out_path) && length($out_path)) { my $arch = archForUUID($out_path, $uuid); if (defined($arch) && length($arch)) { print STDERR "-- [$uuid] MATCH (uuid cache): $out_path ( return ($out_path, $arch); ② getSymbolPathFor_uuid

Slide 38

Slide 38 text

# Look in the search paths (e.g. the device support directories) print STDERR "-- [$uuid] CHECK (device support)\n" if $opt_verbose; for my $func ( \&getSymbolPathAndArchFor_searchpaths, ) { my ($out_path, $arch) = &$func($bin,$path,$build,$uuid,@extra_se if ( defined($out_path) && length($out_path) && defined($arch) & print STDERR "-- [$uuid] MATCH (device support): $out_path ( return ($out_path, $arch); } } print STDERR "-- [$uuid] NO MATCH (device support)\n\n" if $opt_ver ③ getSymbolPathAndArchFor_searchpaths

Slide 39

Slide 39 text

# Ask spotlight if( $opt_spotlight ) { print STDERR "-- [$uuid] CHECK (spotlight)\n" if $opt_verbose; my ($out_path, $arch) = getSymbolPathAndArchFor_dsymUuid($uuid); if(defined($out_path) && length($out_path) && defined($arch) && print STDERR "-- [$uuid] MATCH (spotlight): $out_path ($arch return ($out_path, $arch); } print STDERR "-- [$uuid] NO MATCH (spotlight)\n\n" if $opt_verb } ④ getSymbolPathAndArchFor_dsymUuid

Slide 40

Slide 40 text

① getSymbolPathAndArchFor_manualDSYM • --dsymオプションで指定したdSYMファイルから uuidが一致するものを探す DramaticCrash.dSYM/Contents/Resources/DWARF/DramaticCrash symbolicatecrash --dsym path/to/DramaticCrash.dSYM

Slide 41

Slide 41 text

dSYMファイル • デバッグシンボルを含んでいるファイル
 (実体はフォルダ) • ビルドするたびに作られる
 ※Build Settingsの「Debug Information Format」 が「DWARF with dSYM File」になっていること • アーカイブしたら.xcarchiveファイルの中にも入っ ている

Slide 42

Slide 42 text

② getSymbolPathFor_uuid • /Volumes/Build/UUIDToSymbolMapの中から uuidが一致するものを探す • 詳細不明

Slide 43

Slide 43 text

③ getSymbolPathAndArchFor_searchpaths • search pathの中からuuidが一致するものを探す • 特に、iOS DeviceSupportフォルダの中 ~/Library/Developer/Xcode/
 iOS DeviceSupport/OSͷόʔδϣϯ/Symbols

Slide 44

Slide 44 text

iOS DeviceSupport • OSに含まれるモジュールのデバッグシンボルが
 入っている • デバイスを接続して、Xcodeを起動したときに
 コピーされる(まだコピーされていなければ)

Slide 45

Slide 45 text

④ getSymbolPathAndArchFor_dsymUuid • Spotlightでuuidが一致するdSYMファイルを探す mdfind "com_apple_xcode_dsym_uuids == uuid" ※ fcbd7e2d04523c2a835698b0bf29e71f ͡Όͳ͍ FCBD7E2D-0452-3C2A-8356-98B0BF29E71F

Slide 46

Slide 46 text

getSymbolPathAndArchFor --dsym 詳細不明 iOS DeviceSupport Spotlight ① ② ③ ④

Slide 47

Slide 47 text

getSymbolPathAndArchFor --dsym 詳細不明 iOS DeviceSupport Spotlight ① ② ③ ④ Thread 0 name: Dispatch queue: com.apple.main- Thread 0 Crashed: 0 DramaticCrash 0x00000001 1 DramaticCrash 0x00000001 2 DramaticCrash 0x00000001 3 UIKit 0x00000001 4 UIKit 0x00000001 5 UIKit 0x00000001 6 UIKit 0x00000001 7 UIKit 0x00000001 8 QuartzCore 0x00000001 9 QuartzCore 0x00000001 10 QuartzCore 0x00000001 11 QuartzCore 0x00000001 12 QuartzCore 0x00000001 13 IOKit 0x00000001 14 CoreFoundation 0x00000001 15 CoreFoundation 0x00000001 16 CoreFoundation 0x00000001 17 CoreFoundation 0x00000001 18 CoreFoundation 0x00000001 19 GraphicsServices 0x00000001 20 UIKit 0x00000001

Slide 48

Slide 48 text

getSymbolPathAndArchFor --dsym 詳細不明 iOS DeviceSupport Spotlight ① ② ③ ④ Thread 0 name: Dispatch queue: com.apple.main- Thread 0 Crashed: 0 DramaticCrash 0x00000001 1 DramaticCrash 0x00000001 2 DramaticCrash 0x00000001 3 UIKit 0x00000001 4 UIKit 0x00000001 5 UIKit 0x00000001 6 UIKit 0x00000001 7 UIKit 0x00000001 8 QuartzCore 0x00000001 9 QuartzCore 0x00000001 10 QuartzCore 0x00000001 11 QuartzCore 0x00000001 12 QuartzCore 0x00000001 13 IOKit 0x00000001 14 CoreFoundation 0x00000001 15 CoreFoundation 0x00000001 16 CoreFoundation 0x00000001 17 CoreFoundation 0x00000001 18 CoreFoundation 0x00000001 19 GraphicsServices 0x00000001 20 UIKit 0x00000001

Slide 49

Slide 49 text

シンボリケート失敗の原因 • SpotlightでdSYMファイルが見つからない - マシンに対応するdSYMファイルが存在しない - Spotlightのインデックスが作成されていない? Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 DramaticCrash 0x0000000100c8d708 0x100c88000 + 22280 1 DramaticCrash 0x0000000100c8d668 0x100c88000 + 22120 2 DramaticCrash 0x0000000100c8c2bc 0x100c88000 + 17084 3 UIKit 0x000000018ddb30cc -[UITableView _createPreparedCellForGlobalRow:withIndex 4 UIKit 0x000000018ddb2d84 -[UITableView _createPreparedCellForGlobalRow:willDispl 5 UIKit 0x000000018ddb1aa0 -[UITableView _updateVisibleCellsNow:isRecursive:] + 22 6 UIKit 0x000000018ddad5ec -[UITableView layoutSubviews] + 140 アプリ部分がシンボリケートできていない --dsymオプションで指定してみたら?

Slide 50

Slide 50 text

シンボリケート失敗の原因 • OSのシンボルがマシンにコピーされていない Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 DramaticCrash 0x0000000100c8d708 specialized ViewController.tableView(_:cellForRowAt:) + 1 DramaticCrash 0x0000000100c8d668 specialized ViewController.tableView(_:cellForRowAt:) + 2 DramaticCrash 0x0000000100c8c2bc @objc ViewController.tableView(_:cellForRowAt:) + 17084 3 UIKit 0x000000018ddb30cc 0x18dc9f000 + 1130700 4 UIKit 0x000000018ddb2d84 0x18dc9f000 + 1129860 5 UIKit 0x000000018ddb1aa0 0x18dc9f000 + 1125024 6 UIKit 0x000000018ddad5ec 0x18dc9f000 + 1107436 OSのフレームワーク部分がシンボリケートできていない

Slide 51

Slide 51 text

第2部 まとめ • symbolicatecrashは内部でatosを呼び出す • atosの実行にデバッグシンボルのファイルが必要 - dSYMファイル - iOS DeviceSupport

Slide 52

Slide 52 text

第3部 距離を置きましょう編

Slide 53

Slide 53 text

Thread.callStackSymbols

Slide 54

Slide 54 text

Thread.callStackSymbols open class var callStackSymbols: [String] { get } カレントスレッドのコールスタックを入れた配列

Slide 55

Slide 55 text

うまく読めないときがある for line in Thread.callStackSymbols { print(line) } 0 DramaticCrash 0x0000000100eae544 _T013DramaticCrash22reportCallStackSymbolsyyF + 1320 1 DramaticCrash 0x0000000100eb267c _T013DramaticCrash14ViewControllerC8doReportyyF + 20 2 DramaticCrash 0x0000000100eb2584 _T013DramaticCrash14ViewControllerC8onReportyypF + 52 3 DramaticCrash 0x0000000100eb2650 _T013DramaticCrash14ViewControllerC8onReportyypFTo + 84 4 UIKit 0x000000018d68d64c + 96 5 UIKit 0x000000018df67478 + 156 6 UIKit 0x000000018df673a8 + 172 7 UIKit 0x000000018d68d64c + 96 8 UIKit 0x000000018d7ae870 + 80 9 UIKit 0x000000018d693700 + 440 10 UIKit 0x000000018d7c91a8 + 572 11 UIKit 0x000000018d7109e0 + 2428 12 UIKit 0x000000018d705890 + 3160 13 UIKit 0x000000018d7041d0 + 340 ? ?

Slide 56

Slide 56 text

symbolicatecrashで
 シンボリケートできれば?

Slide 57

Slide 57 text

Binary Images • この部分が必要であることを、すでに 我々は知っている! Binary Images: 0x100c88000 - 0x100c8ffff DramaticCrash arm64 /var/containers/Bund 0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 /var/contai 0x100d6c000 - 0x100d73fff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /var/container 0x100d80000 - 0x100d87fff libswiftObjectiveC.dylib arm64 <062bd1c402933010b791eb1a4d4dc93b> /var/cont 0x100d98000 - 0x100d9ffff libswiftQuartzCore.dylib arm64 <5df1cca7da493ae6bc61aaf18034779e> /var/cont 0x100dac000 - 0x100dbbfff libswiftUIKit.dylib arm64 <412b48c607fb3096a8f42fa3c159b67a> /var/container 0x100dd4000 - 0x100ddbfff libswiftos.dylib arm64 /var/containers/B 0x100f24000 - 0x100f5ffff dyld arm64 /usr/lib/dyld 0x100fb8000 - 0x1012c3fff libswiftCore.dylib arm64 <4fe543830b383378b946c669dd45fdd0> /var/containers 0x10159c000 - 0x1016f7fff libswiftFoundation.dylib arm64 /var/cont 0x18320a000 - 0x18320bfff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSyst 0x18320c000 - 0x183264fff libc++.1.dylib arm64 /usr/lib/libc++.1.d ところが

Slide 58

Slide 58 text

StackOverflowで見つけた https://stackoverflow.com/questions/30212188/how-can-i-get-load-address-of-an-ios-app

Slide 59

Slide 59 text

Swiftのリポジトリで見つけた https://github.com/apple/swift/blob/cc7f207ceca0b42d25a76bd3ecfa0ad6c96baace/stdlib/private/ SwiftReflectionTest/SwiftReflectionTest.swift#L141-L154 /// Get the TEXT segment location and size for a loaded image. /// /// - Parameter i: The index of the loaded image as reported by Dyld. /// - Returns: The image name, address, and size. internal func getAddressInfoForImage(atIndex i: UInt32) -> (name: String, address: UnsafeMutablePointer?, size: UInt) { debugLog("BEGIN \(#function)"); defer { debugLog("END \(#function)") } let header = unsafeBitCast(_dyld_get_image_header(i), to: UnsafePointer.self) let name = String(validatingUTF8: _dyld_get_image_name(i)!)! var size: UInt = 0 let address = getsegmentdata(header, "__TEXT", &size) return (name, address, size) } __TEXTセグメント

Slide 60

Slide 60 text

この時点で得られたもの • address • size • name Binary Images: 0x100c88000 - 0x100c8ffff DramaticCrash arm64 /var/containers/Bund 0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 /var/contai 0x100d6c000 - 0x100d73fff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /var/container 0x100d80000 - 0x100d87fff libswiftObjectiveC.dylib arm64 <062bd1c402933010b791eb1a4d4dc93b> /var/cont 0x100d98000 - 0x100d9ffff libswiftQuartzCore.dylib arm64 <5df1cca7da493ae6bc61aaf18034779e> /var/cont

Slide 61

Slide 61 text

まだ足りないもの • architecture • UUID Binary Images: 0x100c88000 - 0x100c8ffff DramaticCrash arm64 /var/containers/Bund 0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 /var/contai 0x100d6c000 - 0x100d73fff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /var/container 0x100d80000 - 0x100d87fff libswiftObjectiveC.dylib arm64 <062bd1c402933010b791eb1a4d4dc93b> /var/cont 0x100d98000 - 0x100d9ffff libswiftQuartzCore.dylib arm64 <5df1cca7da493ae6bc61aaf18034779e> /var/cont

Slide 62

Slide 62 text

architecture _dyld_get_image_headerが指すもの
 (64ビットの場合) ※32ビットも同様 public struct mach_header_64 { public var magic: UInt32 /* mach magic number identifier */ public var cputype: cpu_type_t /* cpu specifier */ public var cpusubtype: cpu_subtype_t /* machine specifier */ public var filetype: UInt32 /* type of file */ public var ncmds: UInt32 /* number of load commands */ public var sizeofcmds: UInt32 /* the size of all the load commands */ public var flags: UInt32 /* flags */ public var reserved: UInt32 /* reserved */ public init() public init(magic: UInt32, cputype: cpu_type_t, cpusubtype: cpu_subtype_t, filetype: UInt32, ncmds: UInt32, sizeofcmds: UInt32, flags: UInt32, reserved: UInt32) }

Slide 63

Slide 63 text

architecture private func makeArchString(header: UnsafePointer) -> String { switch (header.pointee.cputype, header.pointee.cpusubtype) { case (CPU_TYPE_I386, _): return "i386" case (CPU_TYPE_X86_64, _): return "x86_64" case (CPU_TYPE_ARM64, _): return "arm64" case (CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V7): return "armv7" case (CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V7S): return "armv7s" default: return "unknown" } } #if arch(x86_64) || arch(arm64) private typealias MachHeader = mach_header_64 #else private typealias MachHeader = mach_header #endif

Slide 64

Slide 64 text

あとは UUID

Slide 65

Slide 65 text

load_command N MachHeader load_command 1 load_command 2 : public struct mach_header_64 { public var magic: UInt32 /* mach magic number identifier */ public var cputype: cpu_type_t /* cpu specifier */ public var cpusubtype: cpu_subtype_t /* machine specifier */ public var filetype: UInt32 /* type of file */ public var ncmds: UInt32 /* number of load commands */ public var sizeofcmds: UInt32 /* the size of all the load commands */ public var flags: UInt32 /* flags */ public var reserved: UInt32 /* reserved */ public init() public init(magic: UInt32, cputype: cpu_type_t, cpusubtype: cpu_subtype_t, filetype: UInt32, ncmds: UInt32, sizeofcmds: UInt32, flags: UInt32, reserved: UInt32) } _dyld_get_image_header N = header.ncmds

Slide 66

Slide 66 text

load_command N cmd cmdsize public struct load_command { public var cmd: UInt32 /* type of load command */ public var cmdsize: UInt32 /* total size of command in bytes */ public init() public init(cmd: UInt32, cmdsize: UInt32) } cmdに
 応じたデータ cmdsize

Slide 67

Slide 67 text

load_command N cmdsize public struct load_command { public var cmd: UInt32 /* type of load command */ public var cmdsize: UInt32 /* total size of command in bytes */ public init() public init(cmd: UInt32, cmdsize: UInt32) } cmdsize UUIDの場合は… cmd = LC_UUID データとしてUUIDが16バイト LC_UUID 59 61 6b 88
 aa 1b 37 07
 a5 0b e4 a5 
 d0 98 c2 ae

Slide 68

Slide 68 text

UUIDを探す private func searchUUID(header: UnsafePointer) -> String { var ptr = UnsafeRawPointer(header).advanced(by: MemoryLayout.size) for _ in 0 ..< header.pointee.ncmds { let loadCommand = ptr.bindMemory(to: load_command.self, capacity: 1) if loadCommand.pointee.cmd == LC_UUID { let uuidPointer = ptr .advanced(by: MemoryLayout.size) .bindMemory(to: UInt8.self, capacity: 16) return String(format: "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", uuidPointer[0], uuidPointer[1], uuidPointer[2], uuidPointer[3], uuidPointer[4], uuidPointer[5], uuidPointer[6], uuidPointer[7], uuidPointer[8], uuidPointer[9], uuidPointer[10], uuidPointer[11], uuidPointer[12], uuidPointer[13], uuidPointer[14], uuidPointer[15]) } ptr = ptr.advanced(by: Int(loadCommand.pointee.cmdsize)) } return "" }

Slide 69

Slide 69 text

UUIDを探す private func searchUUID(header: UnsafePointer) -> String { var ptr = UnsafeRawPointer(header).advanced(by: MemoryLayout.size) for _ in 0 ..< header.pointee.ncmds { let loadCommand = ptr.bindMemory(to: load_command.self, capacity: 1) if loadCommand.pointee.cmd == LC_UUID { let uuidPointer = ptr .advanced(by: MemoryLayout.size) .bindMemory(to: UInt8.self, capacity: 16) return String(format: "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", uuidPointer[0], uuidPointer[1], uuidPointer[2], uuidPointer[3], uuidPointer[4], uuidPointer[5], uuidPointer[6], uuidPointer[7], uuidPointer[8], uuidPointer[9], uuidPointer[10], uuidPointer[11], uuidPointer[12], uuidPointer[13], uuidPointer[14], uuidPointer[15]) } ptr = ptr.advanced(by: Int(loadCommand.pointee.cmdsize)) } return "" }

Slide 70

Slide 70 text

UUIDを探す private func searchUUID(header: UnsafePointer) -> String { var ptr = UnsafeRawPointer(header).advanced(by: MemoryLayout.size) for _ in 0 ..< header.pointee.ncmds { let loadCommand = ptr.bindMemory(to: load_command.self, capacity: 1) if loadCommand.pointee.cmd == LC_UUID { let uuidPointer = ptr .advanced(by: MemoryLayout.size) .bindMemory(to: UInt8.self, capacity: 16) return String(format: "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", uuidPointer[0], uuidPointer[1], uuidPointer[2], uuidPointer[3], uuidPointer[4], uuidPointer[5], uuidPointer[6], uuidPointer[7], uuidPointer[8], uuidPointer[9], uuidPointer[10], uuidPointer[11], uuidPointer[12], uuidPointer[13], uuidPointer[14], uuidPointer[15]) } ptr = ptr.advanced(by: Int(loadCommand.pointee.cmdsize)) } return "" }

Slide 71

Slide 71 text

すべての情報が揃った

Slide 72

Slide 72 text

と思ったら、
 そうでもなかった

Slide 73

Slide 73 text

他に必要だったもの Hardware Model: iPod7,1 OS Version: iPhone OS Version 11.4.1 (Build 15G77) Report Version: 104

Slide 74

Slide 74 text

他に必要だったもの Hardware Model: iPod7,1 OS Version: iPhone OS Version 11.4.1 (Build 15G77) Report Version: 104 private func modelName() -> String { var systemInfo = utsname() uname(&systemInfo) return withUnsafePointer(to: &systemInfo.machine) { $0.withMemoryRebound(to: CChar.self, capacity: 256) { String(utf8String: $0) ?? "" } } }

Slide 75

Slide 75 text

他に必要だったもの Hardware Model: iPod7,1 OS Version: iPhone OS Version 11.4.1 (Build 15G77) Report Version: 104 private func osVersion() -> String { // "Version 11.4.1 (Build 15G77)" operatingSystemVersionString͸ // ͜Μͳײ͡ͷจࣈྻΛฦ͢ // "11.4.1 (15G77" ·ͨ͸ "11.4.1 (Build 15G77" ͱ͍ͬͨܗࣜΛ // ؚΜͰ͍Ε͹OK (→ see parse_OSVersion in symbolicatecrash) let versionString = ProcessInfo().operatingSystemVersionString return "iPhone OS \(versionString)" }

Slide 76

Slide 76 text

他に必要だったもの Hardware Model: iPod7,1 OS Version: iPhone OS Version 11.4.1 (Build 15G77) Report Version: 104 104 固定

Slide 77

Slide 77 text

さらに必要だったこと 0 DramaticCrash 0x0000000100eae544 _T013DramaticCrash22reportCallStackSymbolsyyF + 1320 1 DramaticCrash 0x0000000100eb267c _T013DramaticCrash14ViewControllerC8doReportyyF + 20 2 DramaticCrash 0x0000000100eb2584 _T013DramaticCrash14ViewControllerC8onReportyypF + 52 3 DramaticCrash 0x0000000100eb2650 _T013DramaticCrash14ViewControllerC8onReportyypFTo + 84 4 UIKit 0x000000018d68d64c + 96 5 UIKit 0x000000018df67478 + 156 6 UIKit 0x000000018df673a8 + 172 7 UIKit 0x000000018d68d64c + 96 8 UIKit 0x000000018d7ae870 + 80 9 UIKit 0x000000018d693700 + 440 10 UIKit 0x000000018d7c91a8 + 572 11 UIKit 0x000000018d7109e0 + 2428 12 UIKit 0x000000018d705890 + 3160 13 UIKit 0x000000018d7041d0 + 340

Slide 78

Slide 78 text

さらに必要だったこと Thread 0:
 0 DramaticCrash 0x0000000100eae544 _T013DramaticCrash22reportCallStackSymbolsyyF + 1320 1 DramaticCrash 0x0000000100eb267c _T013DramaticCrash14ViewControllerC8doReportyyF + 20 2 DramaticCrash 0x0000000100eb2584 _T013DramaticCrash14ViewControllerC8onReportyypF + 52 3 DramaticCrash 0x0000000100eb2650 _T013DramaticCrash14ViewControllerC8onReportyypFTo + 84 4 UIKit 0x000000018d68d64c + 96 5 UIKit 0x000000018df67478 + 156 6 UIKit 0x000000018df673a8 + 172 7 UIKit 0x000000018d68d64c + 96 8 UIKit 0x000000018d7ae870 + 80 9 UIKit 0x000000018d693700 + 440 10 UIKit 0x000000018d7c91a8 + 572 11 UIKit 0x000000018d7109e0 + 2428 12 UIKit 0x000000018d705890 + 3160 13 UIKit 0x000000018d7041d0 + 340 スレッド番号 たぶん、なんでもいいが、後でわかりやすいように、 メインスレッドなら 0 それ以外のスレッドなら 9999

Slide 79

Slide 79 text

Hardware Model: iPod7,1 OS Version: iPhone OS Version 11.4.1 (Build 15G77) Report Version: 104 Thread 0: 0 DramaticCrash 0x0000000100722544 _T013DramaticCrash22reportCallStackSymbolsyyF + 1320 1 DramaticCrash 0x000000010072667c _T013DramaticCrash14ViewControllerC8doReportyyF + 20 2 DramaticCrash 0x0000000100726584 _T013DramaticCrash14ViewControllerC8onReportyypF + 52 3 DramaticCrash 0x0000000100726650 _T013DramaticCrash14ViewControllerC8onReportyypFTo + 84 4 UIKit 0x000000018d68d64c + 96 5 UIKit 0x000000018df67478 + 156 6 UIKit 0x000000018df673a8 + 172 7 UIKit 0x000000018d68d64c + 96 8 UIKit 0x000000018d7ae870 + 80 9 UIKit 0x000000018d693700 + 440 10 UIKit 0x000000018d7c91a8 + 572 11 UIKit 0x000000018d7109e0 + 2428 12 UIKit 0x000000018d705890 + 3160 13 UIKit 0x000000018d7041d0 + 340 14 UIKit 0x000000018dee5d1c + 2340 15 UIKit 0x000000018dee82c8 + 4744 16 UIKit 0x000000018dee1368 + 152 17 CoreFoundation 0x00000001838c7404 + 24 18 CoreFoundation 0x00000001838c6c2c + 276 19 CoreFoundation 0x00000001838c479c + 1204 20 CoreFoundation 0x00000001837e4da8 CFRunLoopRunSpecific + 552 21 GraphicsServices 0x00000001857ca020 GSEventRunModal + 100 22 UIKit 0x000000018d804758 UIApplicationMain + 236 23 DramaticCrash 0x0000000100728d74 main + 76 24 libdyld.dylib 0x0000000183275fc0 + 4 Binary Images: 0x10071c000 - 0x10072bfff DramaticCrash arm64 <59616b88aa1b3707a50be4a5d098c2ae> /var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/DramaticCrash 0x100758000 - 0x100763fff libBacktraceRecording.dylib arm64 /Developer/usr/lib/libBacktraceRecording.dylib 0x100788000 - 0x1007cbfff libMainThreadChecker.dylib arm64 <3e93edaa83073bea8226aef09b0d193e> /Developer/usr/lib/libMainThreadChecker.dylib 0x100998000 - 0x1009cffff libViewDebuggerSupport.dylib arm64 <389f14338b5f39de885d5febe2d97ca0> /Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib 0x184251000 - 0x184549fff Foundation arm64 <2eacef3cb1e5323eac1a2e0d743c81a5> /System/Library/Frameworks/Foundation.framework/Foundation 0x182ad0000 - 0x18318bfff libobjc.A.dylib arm64 /usr/lib/libobjc.A.dylib 0x182a52000 - 0x182a53fff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSystem.B.dylib 0x18d4e7000 - 0x18e565fff UIKit arm64 /System/Library/Frameworks/UIKit.framework/UIKit 0x100ab0000 - 0x100dbbfff libswiftCore.dylib arm64 <4fe543830b383378b946c669dd45fdd0> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Frameworks 0x100744000 - 0x10074bfff libswiftCoreFoundation.dylib arm64 /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/ 0x101094000 - 0x1010a7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Fr 0x100770000 - 0x100777fff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Frame 0x1009f8000 - 0x100a03fff libswiftDarwin.dylib arm64 /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framewor 0x1010c8000 - 0x1010e3fff libswiftDispatch.dylib arm64 /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framew 0x101118000 - 0x101273fff libswiftFoundation.dylib arm64 /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Fram 0x1013d4000 - 0x1013dbfff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framework 0x1013e8000 - 0x1013effff libswiftObjectiveC.dylib arm64 <062bd1c402933010b791eb1a4d4dc93b> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Fram 0x101400000 - 0x101407fff libswiftQuartzCore.dylib arm64 <5df1cca7da493ae6bc61aaf18034779e> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Fram

Slide 80

Slide 80 text

Hardware Model: iPod7,1 OS Version: iPhone OS Version 11.4.1 (Build 15G77) Report Version: 104 Thread 0: 0 DramaticCrash 0x0000000100722544 _T013DramaticCrash22reportCallStackSymbolsyyF + 1320 1 DramaticCrash 0x000000010072667c _T013DramaticCrash14ViewControllerC8doReportyyF + 20 2 DramaticCrash 0x0000000100726584 _T013DramaticCrash14ViewControllerC8onReportyypF + 52 3 DramaticCrash 0x0000000100726650 _T013DramaticCrash14ViewControllerC8onReportyypFTo + 84 4 UIKit 0x000000018d68d64c + 96 5 UIKit 0x000000018df67478 + 156 6 UIKit 0x000000018df673a8 + 172 7 UIKit 0x000000018d68d64c + 96 8 UIKit 0x000000018d7ae870 + 80 9 UIKit 0x000000018d693700 + 440 10 UIKit 0x000000018d7c91a8 + 572 11 UIKit 0x000000018d7109e0 + 2428 12 UIKit 0x000000018d705890 + 3160 13 UIKit 0x000000018d7041d0 + 340 14 UIKit 0x000000018dee5d1c + 2340 15 UIKit 0x000000018dee82c8 + 4744 16 UIKit 0x000000018dee1368 + 152 17 CoreFoundation 0x00000001838c7404 + 24 18 CoreFoundation 0x00000001838c6c2c + 276 19 CoreFoundation 0x00000001838c479c + 1204 20 CoreFoundation 0x00000001837e4da8 CFRunLoopRunSpecific + 552 21 GraphicsServices 0x00000001857ca020 GSEventRunModal + 100 22 UIKit 0x000000018d804758 UIApplicationMain + 236 23 DramaticCrash 0x0000000100728d74 main + 76 24 libdyld.dylib 0x0000000183275fc0 + 4 Binary Images: 0x10071c000 - 0x10072bfff DramaticCrash arm64 <59616b88aa1b3707a50be4a5d098c2ae> /var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/DramaticCrash 0x100758000 - 0x100763fff libBacktraceRecording.dylib arm64 /Developer/usr/lib/libBacktraceRecording.dylib 0x100788000 - 0x1007cbfff libMainThreadChecker.dylib arm64 <3e93edaa83073bea8226aef09b0d193e> /Developer/usr/lib/libMainThreadChecker.dylib 0x100998000 - 0x1009cffff libViewDebuggerSupport.dylib arm64 <389f14338b5f39de885d5febe2d97ca0> /Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib 0x184251000 - 0x184549fff Foundation arm64 <2eacef3cb1e5323eac1a2e0d743c81a5> /System/Library/Frameworks/Foundation.framework/Foundation 0x182ad0000 - 0x18318bfff libobjc.A.dylib arm64 /usr/lib/libobjc.A.dylib 0x182a52000 - 0x182a53fff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSystem.B.dylib 0x18d4e7000 - 0x18e565fff UIKit arm64 /System/Library/Frameworks/UIKit.framework/UIKit 0x100ab0000 - 0x100dbbfff libswiftCore.dylib arm64 <4fe543830b383378b946c669dd45fdd0> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Frameworks 0x100744000 - 0x10074bfff libswiftCoreFoundation.dylib arm64 /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/ 0x101094000 - 0x1010a7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Fr 0x100770000 - 0x100777fff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Frame 0x1009f8000 - 0x100a03fff libswiftDarwin.dylib arm64 /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framewor 0x1010c8000 - 0x1010e3fff libswiftDispatch.dylib arm64 /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framew 0x101118000 - 0x101273fff libswiftFoundation.dylib arm64 /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Fram 0x1013d4000 - 0x1013dbfff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framework 0x1013e8000 - 0x1013effff libswiftObjectiveC.dylib arm64 <062bd1c402933010b791eb1a4d4dc93b> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Fram 0x101400000 - 0x101407fff libswiftQuartzCore.dylib arm64 <5df1cca7da493ae6bc61aaf18034779e> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Fram

Slide 81

Slide 81 text

シンボリケート済み扱いされている 0x0000000100722544 _T013DramaticCrash22reportCallStackSymbolsyyF + 1320 シンボル 0x0000000100722544 0x10072201c + 1320 0x0000000100722544 - 1320 無理やりアドレスになおしてやる

Slide 82

Slide 82 text

Hardware Model: iPod7,1 OS Version: iPhone OS Version 11.4.1 (Build 15G77) Report Version: 104 Thread 0: 0 DramaticCrash 0x00000001011c80cc 0x1011c7ba4 + 1320 1 DramaticCrash 0x00000001011cdef4 0x1011cdee0 + 20 2 DramaticCrash 0x00000001011cddfc 0x1011cddc8 + 52 3 DramaticCrash 0x00000001011cdec8 0x1011cde74 + 84 4 UIKit 0x000000018d68d64c 0x18d68d5ec + 96 5 UIKit 0x000000018df67478 0x18df673dc + 156 6 UIKit 0x000000018df673a8 0x18df672fc + 172 7 UIKit 0x000000018d68d64c 0x18d68d5ec + 96 8 UIKit 0x000000018d7ae870 0x18d7ae820 + 80 9 UIKit 0x000000018d693700 0x18d693548 + 440 10 UIKit 0x000000018d7c91a8 0x18d7c8f6c + 572 11 UIKit 0x000000018d7109e0 0x18d710064 + 2428 12 UIKit 0x000000018d705890 0x18d704c38 + 3160 13 UIKit 0x000000018d7041d0 0x18d70407c + 340 14 UIKit 0x000000018dee5d1c 0x18dee53f8 + 2340 15 UIKit 0x000000018dee82c8 0x18dee7040 + 4744 16 UIKit 0x000000018dee1368 0x18dee12d0 + 152 17 CoreFoundation 0x00000001838c7404 0x1838c73ec + 24 18 CoreFoundation 0x00000001838c6c2c 0x1838c6b18 + 276 19 CoreFoundation 0x00000001838c479c 0x1838c42e8 + 1204 20 CoreFoundation 0x00000001837e4da8 0x1837e4b80 + 552 21 GraphicsServices 0x00000001857ca020 0x1857c9fbc + 100 22 UIKit 0x000000018d804758 0x18d80466c + 236 23 DramaticCrash 0x00000001011d05d4 0x1011d0588 + 76 24 libdyld.dylib 0x0000000183275fc0 0x183275fbc + 4 Binary Images: 0x1011c0000 - 0x1011d3fff DramaticCrash arm64 <2a979b7168af3e589fe51fc03dd461b0> /var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/DramaticCrash 0x1011f0000 - 0x1011fbfff libBacktraceRecording.dylib arm64 /Developer/usr/lib/libBacktraceRecording.dylib 0x101318000 - 0x10135bfff libMainThreadChecker.dylib arm64 <3e93edaa83073bea8226aef09b0d193e> /Developer/usr/lib/libMainThreadChecker.dylib 0x101208000 - 0x10123ffff libViewDebuggerSupport.dylib arm64 <389f14338b5f39de885d5febe2d97ca0> /Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib 0x184251000 - 0x184549fff Foundation arm64 <2eacef3cb1e5323eac1a2e0d743c81a5> /System/Library/Frameworks/Foundation.framework/Foundation 0x182ad0000 - 0x18318bfff libobjc.A.dylib arm64 /usr/lib/libobjc.A.dylib 0x182a52000 - 0x182a53fff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSystem.B.dylib 0x18d4e7000 - 0x18e565fff UIKit arm64 /System/Library/Frameworks/UIKit.framework/UIKit 0x101528000 - 0x101833fff libswiftCore.dylib arm64 <4fe543830b383378b946c669dd45fdd0> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Frameworks 0x101268000 - 0x10126ffff libswiftCoreFoundation.dylib arm64 /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/ 0x101b0c000 - 0x101b1ffff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Fr 0x101b40000 - 0x101b47fff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Frame 0x101b54000 - 0x101b5ffff libswiftDarwin.dylib arm64 /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framewor 0x101b74000 - 0x101b8ffff libswiftDispatch.dylib arm64 /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framew 0x101bc4000 - 0x101d1ffff libswiftFoundation.dylib arm64 /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Fram 0x101e80000 - 0x101e87fff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framework 0x101e94000 - 0x101e9bfff libswiftObjectiveC.dylib arm64 <062bd1c402933010b791eb1a4d4dc93b> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Fram 0x101eac000 - 0x101eb3fff libswiftQuartzCore.dylib arm64 <5df1cca7da493ae6bc61aaf18034779e> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Fram

Slide 83

Slide 83 text

Hardware Model: iPod7,1 OS Version: iPhone OS Version 11.4.1 (Build 15G77) Report Version: 104 Thread 0: 0 DramaticCrash 0x00000001011c80cc reportCallStackSymbols() + 1320 (CallStackReporter.swift:47) 1 DramaticCrash 0x00000001011cdef4 ViewController.doReport() + 20 (ViewController.swift:73) 2 DramaticCrash 0x00000001011cddfc ViewController.onReport(_:) + 52 (ViewController.swift:69) 3 DramaticCrash 0x00000001011cdec8 @objc ViewController.onReport(_:) + 84 (ViewController.swift:0) 4 UIKit 0x000000018d68d64c -[UIApplication sendAction:to:from:forEvent:] + 96 5 UIKit 0x000000018df67478 __45-[_UIButtonBarTargetAction _invoke:forEvent:]_block_invoke + 156 6 UIKit 0x000000018df673a8 -[_UIButtonBarTargetAction _invoke:forEvent:] + 172 7 UIKit 0x000000018d68d64c -[UIApplication sendAction:to:from:forEvent:] + 96 8 UIKit 0x000000018d7ae870 -[UIControl sendAction:to:forEvent:] + 80 9 UIKit 0x000000018d693700 -[UIControl _sendActionsForEvents:withEvent:] + 440 10 UIKit 0x000000018d7c91a8 -[UIControl touchesEnded:withEvent:] + 572 11 UIKit 0x000000018d7109e0 -[UIWindow _sendTouchesForEvent:] + 2428 12 UIKit 0x000000018d705890 -[UIWindow sendEvent:] + 3160 13 UIKit 0x000000018d7041d0 -[UIApplication sendEvent:] + 340 14 UIKit 0x000000018dee5d1c __dispatchPreprocessedEventFromEventQueue + 2340 15 UIKit 0x000000018dee82c8 __handleEventQueueInternal + 4744 16 UIKit 0x000000018dee1368 __handleHIDEventFetcherDrain + 152 17 CoreFoundation 0x00000001838c7404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 18 CoreFoundation 0x00000001838c6c2c __CFRunLoopDoSources0 + 276 19 CoreFoundation 0x00000001838c479c __CFRunLoopRun + 1204 20 CoreFoundation 0x00000001837e4da8 CFRunLoopRunSpecific + 552 21 GraphicsServices 0x00000001857ca020 GSEventRunModal + 100 22 UIKit 0x000000018d804758 UIApplicationMain + 236 23 DramaticCrash 0x00000001011d05d4 main + 76 (AppDelegate.swift:29) 24 libdyld.dylib 0x0000000183275fc0 start + 4 Binary Images: 0x1011c0000 - 0x1011d3fff DramaticCrash arm64 <2a979b7168af3e589fe51fc03dd461b0> /var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/DramaticCrash 0x1011f0000 - 0x1011fbfff libBacktraceRecording.dylib arm64 /Developer/usr/lib/libBacktraceRecording.dylib 0x101318000 - 0x10135bfff libMainThreadChecker.dylib arm64 <3e93edaa83073bea8226aef09b0d193e> /Developer/usr/lib/libMainThreadChecker.dylib 0x101208000 - 0x10123ffff libViewDebuggerSupport.dylib arm64 <389f14338b5f39de885d5febe2d97ca0> /Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib 0x184251000 - 0x184549fff Foundation arm64 <2eacef3cb1e5323eac1a2e0d743c81a5> /System/Library/Frameworks/Foundation.framework/Foundation 0x182ad0000 - 0x18318bfff libobjc.A.dylib arm64 /usr/lib/libobjc.A.dylib 0x182a52000 - 0x182a53fff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSystem.B.dylib 0x18d4e7000 - 0x18e565fff UIKit arm64 /System/Library/Frameworks/UIKit.framework/UIKit 0x101528000 - 0x101833fff libswiftCore.dylib arm64 <4fe543830b383378b946c669dd45fdd0> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Frameworks 0x101268000 - 0x10126ffff libswiftCoreFoundation.dylib arm64 /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/ 0x101b0c000 - 0x101b1ffff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Fr 0x101b40000 - 0x101b47fff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Frame 0x101b54000 - 0x101b5ffff libswiftDarwin.dylib arm64 /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framewor 0x101b74000 - 0x101b8ffff libswiftDispatch.dylib arm64 /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framew 0x101bc4000 - 0x101d1ffff libswiftFoundation.dylib arm64 /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Fram 0x101e80000 - 0x101e87fff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framework 0x101e94000 - 0x101e9bfff libswiftObjectiveC.dylib arm64 <062bd1c402933010b791eb1a4d4dc93b> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Fram 0x101eac000 - 0x101eb3fff libswiftQuartzCore.dylib arm64 <5df1cca7da493ae6bc61aaf18034779e> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Fram

Slide 84

Slide 84 text

第3部 まとめ • _dyld系のC関数も使って、なんとかクラッシュロ グっぽいものを作ることは可能! • 実用に耐えうるかどうかは? https://gist.github.com/hironytic/c053ea12a0a05d22d54640b2e9e69efa

Slide 85

Slide 85 text

今日のおはなし • クラッシュログはデバイスに残っている • symbolicatecrashでシンボリケートできる。 • シンボリケートに失敗するときはdSYMファイルやOS のデバッグシンボルが揃っているか確認 • クラッシュしなくてもコールスタックをログに書き 出して後でシンボリケートできる…かもしれない