什么是iOS崩溃日志的格式,有效负载和大小

时间:2017-03-14 04:49:58

标签: ios swift networking crashlytics

我的要求可能听起来很奇怪,

想知道从设备发送到iTunes的崩溃日志的格式,有效负载和大小。

因为我有一个应用程序将部署在500台iPad上,并将使用相同的网络并利用现场的带宽。

在我们的情况下,网络带宽非常关键,我们不希望它填满崩溃报告。

1 个答案:

答案 0 :(得分:1)

崩溃日志只是文本,并且大小不是很大。应该在5KB左右。这是一个例子:

Incident Identifier: 30E46451-53FD-4965-896A-457FC11AD05F
CrashReporter Key:   5a56599d836c4f867f6eec76afee451bf9ae5f31
Hardware Model:      iPhone4,1
Process:         Rage Masters [4155]
Path:            /var/mobile/Applications/A5635B22-F5EF-4CEB-94B6-FE158D885014/foo.app/foo
Identifier:      Rage Masters
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2016-10-17 02:39:06.967 -0400
OS Version:      iOS 6.0 (10A403)
Report Version:  104

Exception Type:  00000020
Exception Codes: 0x000000008badf00d
Highlighted Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x327f2eb4 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x327f3048 mach_msg + 36
2   CoreFoundation                  0x36bd4040 __CFRunLoopServiceMachPort + 124
3   CoreFoundation                  0x36bd2d9e __CFRunLoopRun + 878
4   CoreFoundation                  0x36b45eb8 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x36b45d44 CFRunLoopRunInMode + 100
6   CFNetwork                       0x32ac343e CFURLConnectionSendSynchronousRequest + 330
7   Foundation                      0x346e69ba +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 242
8   Rage Masters                    0x000d4046 0xd2000 + 8262

Thread 1:
0   libsystem_kernel.dylib          0x32803d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3a987cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3a987a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3a9878a0 start_wqthread + 4

Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000001      r3: 0x39529fc8
    r4: 0xffffffff    r5: 0x2fd7d301      r6: 0x2fd7d300      r7: 0x2fd7d9d0
    r8: 0x2fd7d330    r9: 0x3adbf8a8     r10: 0x2fd7d308     r11: 0x00000032
    ip: 0x00000025    sp: 0x2fd7d2ec      lr: 0x001bdb25      pc: 0x30301838
  cpsr: 0x00000010

Binary Images:
0xd2000 -    0xd7fff +foo armv7  <f37ee6d2c7b334868972e0e9c54f7062> /var/mobile/Applications/A5635B22-F5EF-4CEB-94B6-FE158D885014/foo.app/foo
0x2fe41000 - 0x2fe61fff  dyld armv7  <75594988728831d98e1f7c4c7b7ca29d> /usr/lib/dyld
0x327f2000 - 0x32808fff  libsystem_kernel.dylib armv7  <f167dacec44b3a86a8eee73400ff7a83> /usr/lib/system/libsystem_kernel.dylib
0x328a8000 - 0x328bdfff  libresolv.9.dylib armv7  <e79b59a3406f34d9b37f8085955115ce> /usr/lib/libresolv.9.dylib
0x32a70000 - 0x32b35fff  CFNetwork armv7  <3e973794a4d13428bb974edcb2027139> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x32b7a000 - 0x32cc3fff  libicucore.A.dylib armv7  <0253932c1b9038a0849ef73c38e076ca> /usr/lib/libicucore.A.dylib
0x32cc4000 - 0x32cc5fff  CoreSurface armv7  <b3f9d4e8dd803a48b88c58a0663d92a3> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
0x32f65000 - 0x32f8afff  OpenCL armv7  <f7706501012430fc94ed99006419fba9> /System/Library/PrivateFrameworks/OpenCL.framework/OpenCL

修改
我查看了我的模拟器的崩溃日志,它们是like this。它们的大小约为70KB,但我不认为每次崩溃都是一样的。

enter image description here

回溯可能会更长,因此崩溃文件大小可能会更大。我有一个114k的mac(不是ios)崩溃日志。

格式是文本,我可以在TextEdit中打开它(进一步确认它是文本):

enter image description here

输出file命令确认它是ACSII:

Mac.crash: ASCII text, with very long lines

参考:https://fileinfo.com/extension/crash