iOS - Unlocatable crash in versions prior to 9.3

In development, we often encounter some crash problems, that is, Crash. Most of us can locate specific codes and solve them, but we always encounter some crashes that we cannot solve. We cannot locate specific code lines. Unable to solve the related Crash, it is very confusing! Below I will explain a Crash I encountered in my own project.
Everyone usually uses the most crashed mobile phones. The project statistics and buried methods should be counted as Umeng and Bugly. We can collect crash information, but we cannot interpret the location.
For example, we sometimes collect such crash information on Umeng: Application received signal SIGSEGV or Application received signal SIGBUS.
As shown in the following figure:
write picture description here
When using the positioning tool for analysis, the results of the analysis are very confusing.

reason:

If the mobile phone system where the crash occurs is before 9.3, the reason for the crash may be the wide color gamut map used in the iPa package of your project, because the system version before 9.3 does not support the wide color gamut map, if you must use If you use a wide color gamut map, please change the system version support to 9.3+. If you do not have to use a wide color gamut map, you can replace the wide color gamut map in the resource package.

solution:

First of all, you need to know what kind of image is a wide color gamut image.
Right-click the picture - display the introduction - as shown below:
write picture description here
you will see that the picture has a color description file, such a picture is a wide color gamut picture.

There are so many resource pictures in your project, it will be troublesome to find them one by one, then how to quickly and effectively find the wide color gamut pictures.

step:

1. Export the iPa package.

2. Locate the ipa file and modify the suffix .ipa to .zip.

3. Unzip the .zip file. There will be a Payload folder containing your app bundle file in the unzipped directory.
write picture description here

4. Open the terminal and cd to the .app bundle folder under the Payload folder of your app, in the following form:

//路径(直接拖拽文件到终端)
cd path/to/Payload/your.app

5. Use the find command to locate the Assets.car file.app bundle in the following form:

find . -name 'Assets.car'

6. Use the assetutil command to find any resource file containing 16-bit or P3 (wide color gamut map)

sudo xcrun --sdk iphones assetutil --info Assets.car> /tmp/Assets.json 

After the input command is run, it will prompt for a password (implicit input)

7. Open the json file

open /tmp/Assets.json

After this step, the json file will be opened, and you can search for the json file. Keyword: "DisplayGamut": "P3" or "BitsPerSample": 16 are abnormal pictures and need to be replaced. Communicate with the UI, just close the channel!

This Crash problem can not be found after the direct mobile phone installation can be found after uploading to the APPStore, you can use the inside of TestFlight to find

The above is the solution, if the method is feasible, welcome to collect, like, follow, etc.!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325324640&siteId=291194637