Upgrade to Pro — share decks privately, control downloads, hide ads and more …

シンボリケート / Ore-con 2018 Summer

Hiron
September 12, 2018

シンボリケート / Ore-con 2018 Summer

シンボリケート/クラッシュログを人間が読めるようになるまで
俺コン 2018 Summer Day.1のトークのスライドです。

Hiron

September 12, 2018
Tweet

More Decks by Hiron

Other Decks in Programming

Transcript

  1. About Me • ひろん(一宮 浩教) • Twitter:
 @hironytic • GitHub:


    https://github.com/hironytic • 株式会社MetaMoJi
 徳島在住エンジニア ͍͚ͬͳʔ͍τʔΫτʔΫࢲɺͻΖΜɻࠓ೥΋iOSDCͷLTʹԠืͨ͠ͷ✨Ͱ΋ iOSDC͸ڝٕLTΦʔσΟΤϯε΋͍ͬͺ͍͍Δ͔Βۓுͯ͠͠Ό΂Εͳ͍Αʔ͋ɺͦ ͏ͩAVSpeechSynthesizerͪΌΜͱPDF Kit͘ΜʹཔΊ͹ɺ୅ΘΓʹൃදͯ͘͠ΕΔΜ ͡Όͳ͍ʁࢲ͋ͬͨ·͍͍ʔ…ͬͯຊ౰ʹ࠾୒͞ΕͨΒͲ͏͠Α͏࣍ճʮશ෦iOSʹ ͠Ό΂ΒͤͪΌ͑ʂʯָ͓͠Έʹ
  2. デバイス内のクラッシュログ • 「設定」アプリ
 
 プライバシー → 解析 → 解析データ
 →

    <アプリ名-日付-時刻.ips> ※ iOS 11の場合。OSのバージョンによって微妙に場所が異なる ※ メモリ不足でクラッシュしたときは
 JetsamEvent-日付-時刻.ipsが出力されるが、これはまた別
  3. 読めない 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
  4. 使い方 ターミナルを開いて $ export DEVELOPER_DIR=/Applications/Xcode.app/Contents/ Developer
 $ /Applications/Xcode.app/Contents/SharedFrameworks/ DVTFoundation.framework/Versions/A/Resources/symbolicatecrash Ϋϥογϡϩά.ips

    >ग़ྗઌϑΝΠϧ DEVELOPER_DIR環境変数が必要 symbolicatecrashを実行 結果は標準出力に出るので、
 リダイレクト(必要に応じて)
  5. 気持ちが通じた 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
  6. シンボリケート失敗 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 アプリ部分がシンボリケートできていない
  7. シンボリケート失敗 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
  8. 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
  9. ############################# # 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
  10. 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
  11. # 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 $!; 別のプログラムを
 呼び出している
  12. 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)
  13. パラメータはどこから? # 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 モジュール
  14. 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はどこから?
  15. 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 <f0d21c6db8d83cf3a0c4712fd6e69a8e> /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); }
  16. parse_image Binary Images: 0x100c88000 - 0x100c8ffff DramaticCrash arm64 <fcbd7e2d04523c2a835698b0bf29e71f> /var/containers/Bund

    0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 <d40def7360a6339d843d88f258576f65> /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 <bc58e020daf43e8cb6059f213e5aeedc> /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 <d164cee7bc83303f8c3ccc58f19c60dc> /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 <afc3de45ad583589a97826e2e97352c6> /var/containers/B 0x100f24000 - 0x100f5ffff dyld arm64 <b15e536a710732dabfafece44c5685e4> /usr/lib/dyld 0x100fb8000 - 0x1012c3fff libswiftCore.dylib arm64 <4fe543830b383378b946c669dd45fdd0> /var/containers 0x10159c000 - 0x1016f7fff libswiftFoundation.dylib arm64 <d0de7b83c6a53d19ac6112fba3b84309> /var/cont 0x18320a000 - 0x18320bfff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSyst 0x18320c000 - 0x183264fff libc++.1.dylib arm64 <e6172d25b5d63239879410136730d916> /usr/lib/libc++.1.d クラッシュログの最後にあるこの部分の
 情報を取ってきている
  17. parse_image Binary Images: 0x100c88000 - 0x100c8ffff DramaticCrash arm64 <fcbd7e2d04523c2a835698b0bf29e71f> /var/containers/Bund

    0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 <d40def7360a6339d843d88f258576f65> /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 <bc58e020daf43e8cb6059f213e5aeedc> /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 <d164cee7bc83303f8c3ccc58f19c60dc> /var/contai 0x100d6c000 - 0x100d73fff libswiftMetal.dylib arm64 <53726a84151636daa5627acbd8725367> /var/container クラッシュログの最後にあるこの部分の
 情報を取ってきている 勝利 symbol
 → binary-image ? uuid base
 → load-address 友情 arch
 → architecture 努力
  18. 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);
  19. } @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;
  20. } @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に
 一致するシンボル情報ファイルを探している
  21. # 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
  22. # 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
  23. # 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
  24. # 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
  25. dSYMファイル • デバッグシンボルを含んでいるファイル
 (実体はフォルダ) • ビルドするたびに作られる
 ※Build Settingsの「Debug Information Format」

    が「DWARF with dSYM File」になっていること • アーカイブしたら.xcarchiveファイルの中にも入っ ている
  26. 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
  27. 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
  28. シンボリケート失敗の原因 • 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オプションで指定してみたら?
  29. シンボリケート失敗の原因 • 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のフレームワーク部分がシンボリケートできていない
  30. うまく読めないときがある 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 <redacted> + 96 5 UIKit 0x000000018df67478 <redacted> + 156 6 UIKit 0x000000018df673a8 <redacted> + 172 7 UIKit 0x000000018d68d64c <redacted> + 96 8 UIKit 0x000000018d7ae870 <redacted> + 80 9 UIKit 0x000000018d693700 <redacted> + 440 10 UIKit 0x000000018d7c91a8 <redacted> + 572 11 UIKit 0x000000018d7109e0 <redacted> + 2428 12 UIKit 0x000000018d705890 <redacted> + 3160 13 UIKit 0x000000018d7041d0 <redacted> + 340 ? ?
  31. Binary Images • この部分が必要であることを、すでに 我々は知っている! Binary Images: 0x100c88000 - 0x100c8ffff

    DramaticCrash arm64 <fcbd7e2d04523c2a835698b0bf29e71f> /var/containers/Bund 0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 <d40def7360a6339d843d88f258576f65> /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 <bc58e020daf43e8cb6059f213e5aeedc> /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 <d164cee7bc83303f8c3ccc58f19c60dc> /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 <afc3de45ad583589a97826e2e97352c6> /var/containers/B 0x100f24000 - 0x100f5ffff dyld arm64 <b15e536a710732dabfafece44c5685e4> /usr/lib/dyld 0x100fb8000 - 0x1012c3fff libswiftCore.dylib arm64 <4fe543830b383378b946c669dd45fdd0> /var/containers 0x10159c000 - 0x1016f7fff libswiftFoundation.dylib arm64 <d0de7b83c6a53d19ac6112fba3b84309> /var/cont 0x18320a000 - 0x18320bfff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSyst 0x18320c000 - 0x183264fff libc++.1.dylib arm64 <e6172d25b5d63239879410136730d916> /usr/lib/libc++.1.d ところが
  32. 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<UInt8>?, size: UInt) { debugLog("BEGIN \(#function)"); defer { debugLog("END \(#function)") } let header = unsafeBitCast(_dyld_get_image_header(i), to: UnsafePointer<MachHeader>.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セグメント
  33. この時点で得られたもの • address • size • name Binary Images: 0x100c88000

    - 0x100c8ffff DramaticCrash arm64 <fcbd7e2d04523c2a835698b0bf29e71f> /var/containers/Bund 0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 <d40def7360a6339d843d88f258576f65> /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 <bc58e020daf43e8cb6059f213e5aeedc> /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 <d164cee7bc83303f8c3ccc58f19c60dc> /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
  34. まだ足りないもの • architecture • UUID Binary Images: 0x100c88000 - 0x100c8ffff

    DramaticCrash arm64 <fcbd7e2d04523c2a835698b0bf29e71f> /var/containers/Bund 0x100ca0000 - 0x100ca7fff libswiftCoreFoundation.dylib arm64 <d40def7360a6339d843d88f258576f65> /var/ 0x100cb4000 - 0x100cc7fff libswiftCoreGraphics.dylib arm64 <8c36e2e2550431e9bfba2d7b3c1b929b> /var/co 0x100ce8000 - 0x100ceffff libswiftCoreImage.dylib arm64 <0a1f05c0b97e3a2d964194e42172b5f6> /var/conta 0x100cfc000 - 0x100d07fff libswiftDarwin.dylib arm64 <bc58e020daf43e8cb6059f213e5aeedc> /var/containe 0x100d1c000 - 0x100d37fff libswiftDispatch.dylib arm64 <d164cee7bc83303f8c3ccc58f19c60dc> /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
  35. 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) }
  36. architecture private func makeArchString(header: UnsafePointer<MachHeader>) -> 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
  37. 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
  38. 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
  39. 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
  40. UUIDを探す private func searchUUID(header: UnsafePointer<MachHeader>) -> String { var ptr

    = UnsafeRawPointer(header).advanced(by: MemoryLayout<MachHeader>.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<load_command>.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 "" }
  41. UUIDを探す private func searchUUID(header: UnsafePointer<MachHeader>) -> String { var ptr

    = UnsafeRawPointer(header).advanced(by: MemoryLayout<MachHeader>.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<load_command>.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 "" }
  42. UUIDを探す private func searchUUID(header: UnsafePointer<MachHeader>) -> String { var ptr

    = UnsafeRawPointer(header).advanced(by: MemoryLayout<MachHeader>.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<load_command>.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 "" }
  43. 他に必要だったもの 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) ?? "" } } }
  44. 他に必要だったもの 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)" }
  45. さらに必要だったこと 0 DramaticCrash 0x0000000100eae544 _T013DramaticCrash22reportCallStackSymbolsyyF + 1320 1 DramaticCrash 0x0000000100eb267c

    _T013DramaticCrash14ViewControllerC8doReportyyF + 20 2 DramaticCrash 0x0000000100eb2584 _T013DramaticCrash14ViewControllerC8onReportyypF + 52 3 DramaticCrash 0x0000000100eb2650 _T013DramaticCrash14ViewControllerC8onReportyypFTo + 84 4 UIKit 0x000000018d68d64c <redacted> + 96 5 UIKit 0x000000018df67478 <redacted> + 156 6 UIKit 0x000000018df673a8 <redacted> + 172 7 UIKit 0x000000018d68d64c <redacted> + 96 8 UIKit 0x000000018d7ae870 <redacted> + 80 9 UIKit 0x000000018d693700 <redacted> + 440 10 UIKit 0x000000018d7c91a8 <redacted> + 572 11 UIKit 0x000000018d7109e0 <redacted> + 2428 12 UIKit 0x000000018d705890 <redacted> + 3160 13 UIKit 0x000000018d7041d0 <redacted> + 340
  46. さらに必要だったこと 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 <redacted> + 96 5 UIKit 0x000000018df67478 <redacted> + 156 6 UIKit 0x000000018df673a8 <redacted> + 172 7 UIKit 0x000000018d68d64c <redacted> + 96 8 UIKit 0x000000018d7ae870 <redacted> + 80 9 UIKit 0x000000018d693700 <redacted> + 440 10 UIKit 0x000000018d7c91a8 <redacted> + 572 11 UIKit 0x000000018d7109e0 <redacted> + 2428 12 UIKit 0x000000018d705890 <redacted> + 3160 13 UIKit 0x000000018d7041d0 <redacted> + 340 スレッド番号 たぶん、なんでもいいが、後でわかりやすいように、 メインスレッドなら 0 それ以外のスレッドなら 9999
  47. 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 <redacted> + 96 5 UIKit 0x000000018df67478 <redacted> + 156 6 UIKit 0x000000018df673a8 <redacted> + 172 7 UIKit 0x000000018d68d64c <redacted> + 96 8 UIKit 0x000000018d7ae870 <redacted> + 80 9 UIKit 0x000000018d693700 <redacted> + 440 10 UIKit 0x000000018d7c91a8 <redacted> + 572 11 UIKit 0x000000018d7109e0 <redacted> + 2428 12 UIKit 0x000000018d705890 <redacted> + 3160 13 UIKit 0x000000018d7041d0 <redacted> + 340 14 UIKit 0x000000018dee5d1c <redacted> + 2340 15 UIKit 0x000000018dee82c8 <redacted> + 4744 16 UIKit 0x000000018dee1368 <redacted> + 152 17 CoreFoundation 0x00000001838c7404 <redacted> + 24 18 CoreFoundation 0x00000001838c6c2c <redacted> + 276 19 CoreFoundation 0x00000001838c479c <redacted> + 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 <redacted> + 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 <cc6a753e76ff324e8314b0bad859c354> /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 <eb1135b2bde93b69b96e42ca98200183> /usr/lib/libobjc.A.dylib 0x182a52000 - 0x182a53fff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSystem.B.dylib 0x18d4e7000 - 0x18e565fff UIKit arm64 <be6ef0203caa393986da6dd6737541d5> /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 <d40def7360a6339d843d88f258576f65> /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 <bc58e020daf43e8cb6059f213e5aeedc> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framewor 0x1010c8000 - 0x1010e3fff libswiftDispatch.dylib arm64 <d164cee7bc83303f8c3ccc58f19c60dc> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framew 0x101118000 - 0x101273fff libswiftFoundation.dylib arm64 <d0de7b83c6a53d19ac6112fba3b84309> /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
  48. 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 <redacted> + 96 5 UIKit 0x000000018df67478 <redacted> + 156 6 UIKit 0x000000018df673a8 <redacted> + 172 7 UIKit 0x000000018d68d64c <redacted> + 96 8 UIKit 0x000000018d7ae870 <redacted> + 80 9 UIKit 0x000000018d693700 <redacted> + 440 10 UIKit 0x000000018d7c91a8 <redacted> + 572 11 UIKit 0x000000018d7109e0 <redacted> + 2428 12 UIKit 0x000000018d705890 <redacted> + 3160 13 UIKit 0x000000018d7041d0 <redacted> + 340 14 UIKit 0x000000018dee5d1c <redacted> + 2340 15 UIKit 0x000000018dee82c8 <redacted> + 4744 16 UIKit 0x000000018dee1368 <redacted> + 152 17 CoreFoundation 0x00000001838c7404 <redacted> + 24 18 CoreFoundation 0x00000001838c6c2c <redacted> + 276 19 CoreFoundation 0x00000001838c479c <redacted> + 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 <redacted> + 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 <cc6a753e76ff324e8314b0bad859c354> /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 <eb1135b2bde93b69b96e42ca98200183> /usr/lib/libobjc.A.dylib 0x182a52000 - 0x182a53fff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSystem.B.dylib 0x18d4e7000 - 0x18e565fff UIKit arm64 <be6ef0203caa393986da6dd6737541d5> /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 <d40def7360a6339d843d88f258576f65> /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 <bc58e020daf43e8cb6059f213e5aeedc> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framewor 0x1010c8000 - 0x1010e3fff libswiftDispatch.dylib arm64 <d164cee7bc83303f8c3ccc58f19c60dc> /private/var/containers/Bundle/Application/326D8604-3276-4A65-91AD-5642411B0944/DramaticCrash.app/Framew 0x101118000 - 0x101273fff libswiftFoundation.dylib arm64 <d0de7b83c6a53d19ac6112fba3b84309> /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
  49. 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 <cc6a753e76ff324e8314b0bad859c354> /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 <eb1135b2bde93b69b96e42ca98200183> /usr/lib/libobjc.A.dylib 0x182a52000 - 0x182a53fff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSystem.B.dylib 0x18d4e7000 - 0x18e565fff UIKit arm64 <be6ef0203caa393986da6dd6737541d5> /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 <d40def7360a6339d843d88f258576f65> /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 <bc58e020daf43e8cb6059f213e5aeedc> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framewor 0x101b74000 - 0x101b8ffff libswiftDispatch.dylib arm64 <d164cee7bc83303f8c3ccc58f19c60dc> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framew 0x101bc4000 - 0x101d1ffff libswiftFoundation.dylib arm64 <d0de7b83c6a53d19ac6112fba3b84309> /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
  50. 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 <cc6a753e76ff324e8314b0bad859c354> /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 <eb1135b2bde93b69b96e42ca98200183> /usr/lib/libobjc.A.dylib 0x182a52000 - 0x182a53fff libSystem.B.dylib arm64 <0f3f5f4ea60d3d4d84af311421f67108> /usr/lib/libSystem.B.dylib 0x18d4e7000 - 0x18e565fff UIKit arm64 <be6ef0203caa393986da6dd6737541d5> /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 <d40def7360a6339d843d88f258576f65> /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 <bc58e020daf43e8cb6059f213e5aeedc> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framewor 0x101b74000 - 0x101b8ffff libswiftDispatch.dylib arm64 <d164cee7bc83303f8c3ccc58f19c60dc> /private/var/containers/Bundle/Application/4F9950A3-9297-4E93-8ECD-E58B81E9C615/DramaticCrash.app/Framew 0x101bc4000 - 0x101d1ffff libswiftFoundation.dylib arm64 <d0de7b83c6a53d19ac6112fba3b84309> /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