faisalmemon / ios-crash-dump-analysis-book

iOS Crash Dump Analysis Book

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Chinese translation of rebase has changed

tianxiawoyougood opened this issue · comments

The Chinese version is different from the English version of rebase, and the screenshot shows different results. The English version of rebase is correct
image

image

The difference has arisen because the English version has been rebuilt using later versions of iOS (as part of modernising the book) but the Chinese version has the original versions. In particular, the screenshot used in the book no longer matches the Chinese words that refer to it.

I did a synthetic comparison by first converting the Chinese version into English (using Google Translate) to get a Symbolification.syn.md file, and then did diff Symbolification.md Symbolification.syn.md

The resultant diff, trimmed to show the interesting differences is:

> The crash report seen from `Windows->Devices and Simulators->View Device Logs` looks like this (truncated for demonstration purposes)
58,72c50,69
< 0   libsystem_kernel.dylib        	0x0000000186388d88
<  __pthread_kill + 8
< 1   libsystem_pthread.dylib       	0x00000001862a11e8
<  pthread_kill$VARIANT$mp + 136
< 2   libsystem_c.dylib             	0x00000001861f4934 abort
<  + 100
< 3   libsystem_c.dylib             	0x00000001861f3d54 err +
<  0
< 4   icdab_planets                 	0x00000001045490f0
<  0x104544000 + 20720
< 5   UIKitCore                     	0x0000000189ff2750
<  -[UIViewController
<  _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 100
< 6   UIKitCore                     	0x0000000189ff71e0
<  -[UIViewController loadViewIfRequired] + 936
---
> 0 libsystem_kernel.dylib
> 0x0000000183a012ec __pthread_kill + 8
> 1 libsystem_pthread.dylib
> 0x0000000183ba2288 pthread_kill$VARIANT$mp + 376
> 2 libsystem_c.dylib
> 0x000000018396fd0c abort + 140
> 3 libsystem_c.dylib
> 0x0000000183944000 basename_r + 0
> 4 icdab_planets
> 0x00000001008e45bc 0x1008e0000 + 17852
> 5 UIKit
> 0x000000018db56ee0
> -[UIViewController loadViewIfRequired] + 1020
> 
> Binary Images:
> 0x1008e0000-0x1008ebfff icdab_planets arm64
>   <9ff56cfacd66354ea85ff5973137f011>
>    /var/containers/Bundle/Application/
>    BEF249D9-1520-40F7-93F4-8B99D913A4AC/
>    icdab_planets.app/icdab_planets
75c72
< However, with the setting in place, a crash would instead be reported as:
---
> However, if it is set to `DWARF with dSYM File`, the crash report will look like this:
79,88c76,87
< 0   libsystem_kernel.dylib        	0x0000000186388d88
<  __pthread_kill + 8
< 1   libsystem_pthread.dylib       	0x00000001862a11e8
<  pthread_kill$VARIANT$mp + 136
< 2   libsystem_c.dylib             	0x00000001861f4934 abort
<  + 100
< 3   libsystem_c.dylib             	0x00000001861f3d54 err +
<  0
< 4   icdab_planets                 	0x00000001048290f0
<  -[PlanetViewController viewDidLoad] + 20720
---
> 0 libsystem_kernel.dylib
> 0x0000000183a012ec __pthread_kill + 8
> 1 libsystem_pthread.dylib
> 0x0000000183ba2288
> pthread_kill$VARIANT$mp + 376
> 2 libsystem_c.dylib
> 0x000000018396fd0c abort + 140
> 3 libsystem_c.dylib
> 0x0000000183944000 basename_r + 0
> 4 icdab_planets
> 0x0000000104e145bc
> -[PlanetViewController viewDidLoad] + 17852
90,94c89,91
< 5   UIKitCore                     	0x0000000189ff2750
<  -[UIViewController
<  _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 100
< 6   UIKitCore                     	0x0000000189ff71e0
<  -[UIViewController loadViewIfRequired] + 936
---
> 5 UIKit
> 0x000000018db56ee0
> -[UIViewController loadViewIfRequired] + 1020
97,100c94
< Lines 0, 1, 2, 5 are the same in both cases because our developer environment will
< have the symbols for the iOS release under test.  In the second case, Xcode will
< look up the DSYM file to clarify line 4.  It tells us this is line 33 in file
< PlanetViewController.mm.  This is:
---
> Lines 0, 1, 2, and 5 of the report are the same in both cases because our development environment has symbolic information for the iOS version being tested. In the second case, Xcode will look for the DSYM file to clarify line 4. It tells us that this is line 33 in the PlanetViewController.mm file. Yes:
> ## Start symbolizing
125,126c118
< In order to help us get comfortable with crash dump reports, we can demonstrate
< how the symbolification actually works.  In the first crash dump, we want to understand:
---
> To help us get familiar with the crash dump report, we can demonstrate how symbolization actually works. In the first paragraph of the report, we want to understand:
129,130c121,122
< 4   icdab_planets                       0x00000001045490f0
<  0x104544000 + 20720
---
> 4 icdab_planets
> 0x00000001008e45bc 0x1008e0000 + 17852
133c125
< The first number is the place where we wer

> Run the command `atos` to view the location information of your interest:
146,147c134,135
<  icdab_planets.app.dSYM/Contents/Resources/DWARF/icdab_planets -l
<  0x104544000 0x00000001045490f0
---
>  ./icdab_planets.app.dSYM/Contents/Resources/DWARF/
> icdab_planets -l 0x1008e0000 0x00000001008e45bc

All of the above differences need to be absorbed into the Chinese version of the text in order for the code to be consistent with the screenshot and to be consistent with the English version.

@LoneyIsError if you have the opportunity to update this chapter, I would really appreciate it.

commented

@faisalmemon I plan to update the information in this chapter

commented

I have completed this part of the update