解决分发构建中的iOS应用程序崩溃问题

时间:2015-01-09 23:20:34

标签: ios

我已向应用商店提交了应用,并且在审核后,该应用已被拒绝。这是Apple发送的解释:

Specifically, after downloading the latest version submitted for review, Version 2.1, we found that when the user taps on the map icon, the app still crashes.

This occurred when your app was used: 

- Offline
- On Wi-Fi 
- On cellular network

我无法在模拟器和真实设备上开发和测试应用程序时检测到问题,应用程序不会崩溃。

这是崩溃报告的第一部分:

{"app_name":"mujergrancanaria","app_version":"2.0","bundleID":"com.solinpromex.casadelajuventud","adam_id":946142349,"os_version":"iPhone OS 8.1 (12B410)","slice_uuid":"601d3ebb-53d8-39ff-8766-badaadb4f776","share_with_app_devs":false,"build_version":"2.1","is_first_party":false,"bug_type":"109","name":"mujergrancanaria"}
Incident Identifier: 02C4277A-3657-4CFF-9A5D-8A3B34E1ACE4
CrashReporter Key:   34094a2f9cf3e1e29a81d365a85a102af46a1edc
Hardware Model:      xxx
Process:             mujergrancanaria [4557]
Path:                /private/var/mobile/Containers/Bundle/Application/67EFD456-E179-4049-B1A6-FBBF6D6144E4/mujergrancanaria.app/mujergrancanaria
Identifier:          com.solinpromex.casadelajuventud
Version:             2.1 (2.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2015-01-09 14:46:52.869 -0800
Launch Time:         2015-01-09 14:46:38.934 -0800
OS Version:          iOS 8.1 (12B410)
Report Version:      105

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

Last Exception Backtrace:
(0x186b85e48 0x1977d40e4 0x186b8cf14 0x186b89cc4 0x186a8ec1c 0x10025f1bc 0x10025dc38 0x10025d03c 0x10025ced4 0x1000eb240 0x18b334e84 0x18b334b94 0x18b4d7ad4 0x18b3e9310 0x18b3e90dc 0x18b3e905c 0x18b331a2c 0x18ac89994 0x18ac84564 0x18ac84408 0x18ac83c08 0x18ac8398c 0x18b333948 0x186b3e0e8 0x186b3d38c 0x186b3b43c 0x186a691f4 0x18fbe35a4 0x18b39a784 0x1000d2a40 0x197e42a08)

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x0000000197f5b270 __pthread_kill + 8
1   libsystem_pthread.dylib         0x0000000197ff9224 pthread_kill + 108
2   libsystem_c.dylib               0x0000000197ed2b14 abort + 108
3   libc++abi.dylib                 0x0000000196fa5414 abort_message + 112
4   libc++abi.dylib                 0x0000000196fc4b88 default_terminate_handler() + 300
5   libobjc.A.dylib                 0x00000001977d43bc _objc_terminate() + 124
6   libc++abi.dylib                 0x0000000196fc1bb0 std::__terminate(void (*)()) + 12
7   libc++abi.dylib                 0x0000000196fc1474 __cxa_throw + 132
8   libobjc.A.dylib                 0x00000001977d4200 objc_exception_throw + 344
9   CoreFoundation                  0x0000000186b8cf10 -[NSObject(NSObject) doesNotRecognizeSelector:] + 216
10  CoreFoundation                  0x0000000186b89cc0 ___forwarding___ + 924
11  CoreFoundation                  0x0000000186a8ec18 _CF_forwarding_prep_0 + 88
12  mujergrancanaria                0x000000010025f1b8 0x1000ac000 + 1782200
13  mujergrancanaria                0x000000010025dc34 0x1000ac000 + 1776692
14  mujergrancanaria                0x000000010025d038 0x1000ac000 + 1773624
15  mujergrancanaria                0x000000010025ced0 0x1000ac000 + 1773264
16  mujergrancanaria                0x00000001000eb23c 0x1000ac000 + 258620
17  UIKit                           0x000000018b334e80 -[UIViewController loadViewIfRequired] + 688
18  UIKit                           0x000000018b334b90 -[UIViewController view] + 28
19  UIKit                           0x000000018b4d7ad0 -[UINavigationController _startCustomTransition:] + 708
20  UIKit                           0x000000018b3e930c -[UINavigationController _startDeferredTransitionIfNeeded:] + 464
21  UIKit                           0x000000018b3e90d8 -[UINavigationController __viewWillLayoutSubviews] + 52
22  UIKit                           0x000000018b3e9058 -[UILayoutContainerView layoutSubviews] + 196
23  UIKit                           0x000000018b331a28 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 568
24  QuartzCore                      0x000000018ac89990 -[CALayer layoutSublayers] + 164
25  QuartzCore                      0x000000018ac84560 CA::Layer::layout_if_needed(CA::Transaction*) + 316
26  QuartzCore                      0x000000018ac84404 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28
27  QuartzCore                      0x000000018ac83c04 CA::Context::commit_transaction(CA::Transaction*) + 272
28  QuartzCore                      0x000000018ac83988 CA::Transaction::commit() + 432
29  UIKit                           0x000000018b333944 _UIApplicationHandleEventQueue + 1696
30  CoreFoundation                  0x0000000186b3e0e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 20
31  CoreFoundation                  0x0000000186b3d388 __CFRunLoopDoSources0 + 260
32  CoreFoundation                  0x0000000186b3b438 __CFRunLoopRun + 708
33  CoreFoundation                  0x0000000186a691f0 CFRunLoopRunSpecific + 392
34  GraphicsServices                0x000000018fbe35a0 GSEventRunModal + 164
35  UIKit                           0x000000018b39a780 UIApplicationMain + 1484
36  mujergrancanaria                0x00000001000d2a3c 0x1000ac000 + 158268
37  libdyld.dylib                   0x0000000197e42a04 start + 0

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x0000000197f40c94 kevent64 + 8
1   libdispatch.dylib               0x0000000197e2897c _dispatch_mgr_invoke + 272
2   libdispatch.dylib               0x0000000197e1b3b0 _dispatch_mgr_thread + 48

Thread 2:
0   libsystem_kernel.dylib          0x0000000197f5bc78 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x0000000197ff5390 _pthread_wqthread + 988
2   libsystem_pthread.dylib         0x0000000197ff4fa4 start_wqthread + 0

Thread 3:
0   libsystem_kernel.dylib          0x0000000197f5bc78 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x0000000197ff5390 _pthread_wqthread + 988
2   libsystem_pthread.dylib         0x0000000197ff4fa4 start_wqthread + 0

Thread 4:
0   libsystem_kernel.dylib          0x0000000197f5bc78 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x0000000197ff5390 _pthread_wqthread + 988
2   libsystem_pthread.dylib         0x0000000197ff4fa4 start_wqthread + 0

Thread 5 name:  com.apple.NSURLConnectionLoader
Thread 5:
0   libsystem_kernel.dylib          0x0000000197f40e7c mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000197f40cf4 mach_msg + 68
2   CoreFoundation                  0x0000000186b3d5c8 __CFRunLoopServiceMachPort + 196
3   CoreFoundation                  0x0000000186b3b51c __CFRunLoopRun + 936
4   CoreFoundation                  0x0000000186a691f0 CFRunLoopRunSpecific + 392
5   CFNetwork                       0x000000018656d6a0 +[NSURLConnection(Loader) _resourceLoadLoop:] + 436
6   Foundation                      0x0000000187a55c08 __NSThread__main__ + 1068
7   libsystem_pthread.dylib         0x0000000197ff7e7c _pthread_body + 160
8   libsystem_pthread.dylib         0x0000000197ff7dd8 _pthread_start + 156
9   libsystem_pthread.dylib         0x0000000197ff4fac thread_start + 0

Thread 6:
0   libsystem_kernel.dylib          0x0000000197f5bc78 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x0000000197ff5390 _pthread_wqthread + 988
2   libsystem_pthread.dylib         0x0000000197ff4fa4 start_wqthread + 0

Thread 7 name:  com.apple.CFSocket.private
Thread 7:
0   libsystem_kernel.dylib          0x0000000197f5b498 __select + 8
1   CoreFoundation                  0x0000000186b42fc0 __CFSocketManager + 656
2   libsystem_pthread.dylib         0x0000000197ff7e7c _pthread_body + 160
3   libsystem_pthread.dylib         0x0000000197ff7dd8 _pthread_start + 156
4   libsystem_pthread.dylib         0x0000000197ff4fac thread_start + 0

Thread 8:
0   libsystem_kernel.dylib          0x0000000197f5bc78 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x0000000197ff5390 _pthread_wqthread + 988
2   libsystem_pthread.dylib         0x0000000197ff4fa4 start_wqthread + 0

我无法找到从哪里开始查找崩溃源。请,任何线索都是受欢迎的。

3 个答案:

答案 0 :(得分:2)

您将要表示崩溃日志。在您的代码中,这是发生崩溃的地方

12  mujergrancanaria                0x000000010025f1b8 0x1000ac000 + 1782200

有很多关于如何对此进行符号化的帖子,以便您可以知道发生崩溃的文件和行。通常,您需要做的就是打开Xcode,然后打开Devices(从菜单中),然后选择一个真实的设备,单击查看设备日志,然后将您的日志拖到列表中。 Xcode将在您创建存档时自动查找二进制文件和dsym文件(假设这与您构建存档的机器相同)。如果这不起作用,请查看此Symbolicating iPhone App Crash Reports

答案 1 :(得分:1)

好的,它的地图相关和审核小组在加利福尼亚州帕洛阿尔托我认为(如果我错了,请纠正我。)

所以我肯定会首先在Palo Alto的模拟器中测试位置。

接下来,记录。

很大一部分是编辑

12  mujergrancanaria                0x000000010025f1b8 0x1000ac000 + 1782200
13  mujergrancanaria                0x000000010025dc34 0x1000ac000 + 1776692
14  mujergrancanaria                0x000000010025d038 0x1000ac000 + 1773624
15  mujergrancanaria                0x000000010025ced0 0x1000ac000 + 1773264
16  mujergrancanaria                0x00000001000eb23c 0x1000ac000 + 258620

意味着您需要将其放在Xcode或其他工具中,您可以使用DSym(在应用程序存档期间创建的symbole文件)来利用它。

没有它,我可以告诉你的是这一行在堆栈中:

-[NSObject(NSObject) doesNotRecognizeSelector:]

表示您正在对象上调用非现有方法。

答案 2 :(得分:1)

应用程序崩溃原因是Other Linker Flags部分中缺少标记。该应用包含适用于iOS的Google Maps SDK,并且需要标记-ObjC。我只在Debug Build部分使用它。在Release Build部分中添加标志-ObjC可以解决问题,并且在启动分发文件时应用程序不会再崩溃......