ios 从 .ips 崩溃报告文件中获取信息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22722640/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 23:51:33  来源:igfitidea点击:

Getting info from .ips crash report file

ioscrash-reportsad-hoc-distribution

提问by Alfred Zien

I've tested my app on iPhone 5 and 4s. And then I sent my app to tester, he has 5s iPhone. Everything was ok. After sometime, when I added some features to app, I sent him another version, but now he says that it crashes on launch. On my devices everything is ok. I asked him to send me crash reports. Here is .ips file:

我已经在 iPhone 5 和 4s 上测试了我的应用程序。然后我将我的应用程序发送给测试人员,他有 5s iPhone。一切正常。一段时间后,当我向应用程序添加一些功能时,我向他发送了另一个版本,但现在他说它在启动时崩溃了。在我的设备上一切正常。我让他给我发送崩溃报告。这是 .ips 文件:

{"bundleID”:"name.my-app","app_name”:”my-app","bug_type":"109","name”:”my-app","os_version":"iPhone OS 7.1 (11D167)","version":"1.0 (1.0)"}
Incident Identifier: 3916. . .194
CrashReporter Key:   58fd. . .7399
Hardware Model:      iPhone6,2
Process:             my-app [277]
Path:                /var/mobile/Applications/0AB0. . .B5B/my-app.app/my-app
Identifier:          name.my-app
Version:             1.0 (1.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2014-03-27 02:10:39.959 +0400
OS Version:          iOS 7.1 (11D167)
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  24

Last Exception Backtrace:
(0x1893e2950 0x1958e81fc 0x1893e2890 0x1000f09a0 0x195ec0014 0x195ebffd4 0x195ec64a8 0x195ec24c0 0x195ec70f4 0x195ec74fc 0x1960556bc 0x19605554c)

Thread 0:
0   libsystem_kernel.dylib          0x0000000195fbdca0 0x195fbc000 + 7328
1   CoreFoundation                  0x00000001893a2570 0x1892d8000 + 828784
2   CoreFoundation                  0x00000001893a0764 0x1892d8000 + 821092
3   CoreFoundation                  0x00000001892e16cc 0x1892d8000 + 38604
4   GraphicsServices                0x000000018efc5c08 0x18efb8000 + 56328
5   UIKit                           0x000000018c412fd8 0x18c398000 + 503768
6   my-app                      0x00000001000f1ae8 0x1000dc000 + 88808
7   libdyld.dylib                   0x0000000195edba9c 0x195ed8000 + 15004

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 

Thread 24 Crashed:
0   libsystem_kernel.dylib          0x0000000195fd658c 0x195fbc000 + 107916
1   libsystem_c.dylib               0x0000000195f6a804 0x195f08000 + 403460
2   libc++abi.dylib                 0x0000000195190990 0x195190000 + 2448
3   libc++abi.dylib                 0x00000001951adc28 0x195190000 + 121896
4   libobjc.A.dylib                 0x00000001958e84d0 0x1958e0000 + 34000
5   libc++abi.dylib                 0x00000001951ab164 0x195190000 + 110948
6   libc++abi.dylib                 0x00000001951aaa7c 0x195190000 + 109180
7   libobjc.A.dylib                 0x00000001958e8314 0x1958e0000 + 33556
8   CoreFoundation                  0x00000001893e288c 0x1892d8000 + 1091724
9   my-app                      0x00000001000f099c 0x1000dc000 + 84380
10  libdispatch.dylib               0x0000000195ec0010 0x195ebc000 + 16400
11  libdispatch.dylib               0x0000000195ebffd0 0x195ebc000 + 16336
12  libdispatch.dylib               0x0000000195ec64a4 0x195ebc000 + 42148
13  libdispatch.dylib               0x0000000195ec24bc 0x195ebc000 + 25788
14  libdispatch.dylib               0x0000000195ec70f0 0x195ebc000 + 45296
15  libdispatch.dylib               0x0000000195ec74f8 0x195ebc000 + 46328
16  libsystem_pthread.dylib         0x00000001960556b8 0x196054000 + 5816
17  libsystem_pthread.dylib         0x0000000196055548 0x196054000 + 5448

Thread 25:
0   libsystem_kernel.dylib          0x0000000195fd6e74 0x195fbc000 + 110196
1   libsystem_pthread.dylib         0x0000000196055548 0x196054000 + 5448

Thread 26:
0   libsystem_kernel.dylib          0x0000000195fd6e74 0x195fbc000 + 110196
1   libsystem_pthread.dylib         0x0000000196055548 0x196054000 + 5448

Thread 24 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x00000001035de7b8
    x4: 0x0000000000002060   x5: 0x00000001035de870   x6: 0x000000000000006e   x7: 0x0000000000000640
    x8: 0x000000000c000000   x9: 0x0000000004000000  x10: 0x0000000098d956f7  x11: 0x0000000000000300
   x12: 0x0000000000000000  x13: 0x0000000000000000  x14: 0x0000000000000000  x15: 0x0000000195f83dcb
   x16: 0x0000000000000148  x17: 0x00c8d95a0138084d  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x00000001035e0000  x21: 0x000000017013b5d8  x22: 0x000000017013b600  x23: 0x000000015d610870
   x24: 0x00000001963068e8  x25: 0x0000000100100000  x26: 0x0000000198d87c40  x27: 0x000000017026c2c0
   x28: 0x000000000000000a  fp: 0x00000001035de7f0   lr: 0x000000019605916c
    sp: 0x00000001035de7d0   pc: 0x0000000195fd658c cpsr: 0x00000000

Binary Images:
0x1000dc000 - 0x1000f7fff my-app arm64  <d6f1f532dfbc36c497acefc4aa2c7f2f> /var/mobile/Applications/0AB088E7-6425-4287-9C4B-1EEF37E7DB5B/my-app.app/my-app
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
0x19606c000 - 0x19608ffff libxpc.dylib arm64  <7077afbad955309d8cb9965960c781f3> /usr/lib/system/libxpc.dylib

I was reading a lot of similar questions here, and they says I need to symbolicate that .ips through terminal. But it doesn't work. atoscommand returns that it is can't read my-app.app, xcrun atosreturns same memory address that I'm specifying.

我在这里阅读了很多类似的问题,他们说我需要通过终端来表示 .ips。但它不起作用。atos命令返回它无法读取 my-app.app,xcrun atos返回我指定的相同内存地址。

xcrun atos -arch arm64 -o 'my-app.app' 0x196054000 + 5448
0x196054000
+
5448

I'm not sure, am I need to specify that + number, but it doesn't work without it too.

我不确定,我是否需要指定那个 + 号,但没有它它也不起作用。

Thanks in advance, I would appreciate any help.

提前致谢,我将不胜感激。

UPDATE:

更新:

I've figured it out. Something wrong with NSFileManager, it is acting differently on 64bit and 32 bit

我已经想通了。NSFileManager 有问题,它在 64 位和 32 位上表现不同

[fileManager fileExistsAtPath:pathToCacheDir isDirectory:&isDirectory];

isDirectoryreturns NO, although pathToCacheDir is valid directory, that's why I got exception. But question is still valid, how can I got some more understandable reports from testers?

isDirectory返回 NO,虽然 pathToCacheDir 是有效目录,但这就是我遇到异常的原因。 但问题仍然有效,我怎样才能从测试人员那里得到一些更容易理解的报告?

回答by Isaac

I just got a whole bunch of .ipsfiles from a Windows user and was wondering what to do with them, too. Renaming them to .crashmade Xcode happy to import them (go to the Organizer, to Library Device Logs, and Import) and symbolicate them.

我刚刚.ips从一个 Windows 用户那里得到了一大堆文件,也想知道如何处理它们。将它们重命名以.crash使 Xcode 乐于导入它们(转到管理器、库设备日志和导入)并对它们进行符号化。

edit:When I originally wrote this answer, it was with Xcode 6 in mind. Newer versions of Xcode (7+ I think) have moved things around. According to Apple:

编辑:当我最初写这个答案时,它考虑到了 Xcode 6。较新版本的 Xcode(我认为 7+)已经改变了一些东西。 据苹果称

Xcode will automatically attempt to symbolicate all crash reports that it encounters. All you need to do for symbolication is to add the crash report to the Xcode Organizer.

  1. Connect an iOS device to your Mac
  2. Choose "Devices" from the "Window" menu
  3. Under the "DEVICES" section in the left column, choose a device
  4. Click the "View Device Logs" button under the "Device Information" section on the right hand panel
  5. Drag your crash report onto the left column of the presented panel
  6. Xcode will automatically symbolicate the crash report and display the results

Xcode 将自动尝试符号化它遇到的所有崩溃报告。符号化所需要做的就是将崩溃报告添加到 Xcode Organizer。

  1. 将 iOS 设备连接到 Mac
  2. 从“窗口”菜单中选择“设备”
  3. 在左列的“设备”部分下,选择一个设备
  4. 单击右侧面板“设备信息”部分下的“查看设备日志”按钮
  5. 将您的崩溃报告拖到所显示面板的左列
  6. Xcode 会自动符号化崩溃报告并显示结果

回答by leokash

When using atos, the first address from binary images needs to be specified and the command needs to be run from the directory where the .app and .dsym are located.

使用atos时,需要指定二进制镜像的首地址,并且需要在.app和.dsym所在的目录下运行命令。

The following command will then work: atos -o [my-app.app/my-app] -arch [e.g armv7] -l [first address from binary image section of ips file] [all addresses from last exception backtrace section]

然后以下命令将起作用:atos -o [my-app.app/my-app] -arch [eg armv7] -l [ips 文件二进制图像部分的第一个地址] [最后一个异常回溯部分的所有地址]

and in your case:

在你的情况下:

atos -o my-app.app/my-app -arch arm-64 -l 0x1000dc000 0x1893e2950 0x1958e81fc 0x1893e2890 0x1000f09a0 0x195ec0014 0x195ebffd4 0x195ec64a8 0x195ec24c0 0x195ec70f4 0x195ec74fc 0x1960556bc 0x19605554c