ios - iPhone 应用程序在某些设备上启动时崩溃,但在其他设备上运行

标签 ios iphone crash sigabrt

我们将 iOS 6 应用程序迁移到 iOS 7,除了一些细微的调整外,没有做任何特别的改变。我们在 3、4、4S 和 5S iPhone 上测试了该应用程序,没有发现任何问题。

现在有两个用户报告应用程序在启动时崩溃。我建议其中一位完全删除该应用程序并重新安装,这使得该应用程序运行顺利。

他将崩溃日志转发给了我,但它有点神秘。谁能帮我找出问题所在?

编辑:符号化崩溃日志

Incident Identifier: 687B278C-313F-4533-81E8-0003428A3362
CrashReporter Key:   b25d61923c16e6a67af8ea7bf81643ba93f4d1ea
Hardware Model:      iPhone4,1

Process:             RunControl [3488]
Path:                /var/mobile/Applications/DB78DB79-2AB2-4ADD-89C8-BACDBB6BCCF3/RunControl.app/RunControl
Identifier:          com.gsddl.RunControl
Version:             1.5 (1.5)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2014-03-10 09:49:34.065 +0100
OS Version:          iOS 7.0.6 (11B651)
Report Version:      104

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

Last Exception Backtrace:
0   CoreFoundation                  0x2dbbbf46 __exceptionPreprocess + 126
1   libobjc.A.dylib                 0x37f4b6aa objc_exception_throw + 34
2   CoreFoundation                  0x2dbbbe88 +[NSException raise:format:] + 100
3   Foundation                      0x2e4dd448 -[NSString stringByAppendingString:] + 84
4   RunControl                      0x000b2302 -[RunControlAppDelegate downloadData] (RunControlAppDelegate.m:297)
5   Foundation                      0x2e59fc82 __NSThread__main__ + 1058
6   libsystem_pthread.dylib         0x38572c18 _pthread_body + 136
7   libsystem_pthread.dylib         0x38572b8a _pthread_start + 98
8   libsystem_pthread.dylib         0x38570c8c thread_start + 4



Thread 0:
0   libsystem_kernel.dylib        0x38509014 0x384f7000 + 73748
1   libsystem_pthread.dylib       0x38572a74 pthread_create + 156
2   Foundation                    0x2e50fb00 -[NSThread start] + 284
3   RunControl                    0x000b20c4 -[RunControlAppDelegate initData] (RunControlAppDelegate.m:274)
4   RunControl                    0x000b0f58 -[RunControlAppDelegate application:didFinishLaunchingWithOptions:] (RunControlAppDelegate.m:32)
5   UIKit                         0x3039f2fa -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 270
6   UIKit                         0x3039ed4a -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1386
7   UIKit                         0x3039934e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 710
8   UIKit                         0x3033441a -[UIApplication handleEvent:withNewEvent:] + 3126
9   UIKit                         0x3033371c -[UIApplication sendEvent:] + 68
10  UIKit                         0x30398b38 _UIApplicationHandleEvent + 660
11  GraphicsServices              0x327cf70a _PurpleEventCallback + 606
12  GraphicsServices              0x327cf2f2 PurpleEventCallback + 30
13  CoreFoundation                0x2db869dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
14  CoreFoundation                0x2db86976 __CFRunLoopDoSource1 + 342
15  CoreFoundation                0x2db8514a __CFRunLoopRun + 1394
16  CoreFoundation                0x2daefc22 CFRunLoopRunSpecific + 518
17  CoreFoundation                0x2daefa06 CFRunLoopRunInMode + 102
18  UIKit                         0x30397dd4 -[UIApplication _run] + 756
19  UIKit                         0x30393044 UIApplicationMain + 1132
20  RunControl                    0x000b0f1a main (main.m:16)
21  RunControl                    0x000b0edc start + 36

Thread 1:
0   libsystem_kernel.dylib        0x384f783c 0x384f7000 + 2108
1   libdispatch.dylib             0x38442e08 _dispatch_mgr_invoke + 228
2   libdispatch.dylib             0x3843239e _dispatch_mgr_thread$VARIANT$up + 34

Thread 2:
0   libsystem_kernel.dylib        0x3850ac7c 0x384f7000 + 81020
1   libsystem_pthread.dylib       0x38570dc6 _pthread_wqthread + 306
2   libsystem_pthread.dylib       0x38570c80 start_wqthread + 4

Thread 3 Crashed:
0   libsystem_kernel.dylib        0x3850a1fc 0x384f7000 + 78332
1   libsystem_pthread.dylib       0x38573a2e pthread_kill + 54
2   libsystem_c.dylib             0x384baff8 abort + 72
3   libc++abi.dylib               0x377e9cd2 abort_message + 70
4   libc++abi.dylib               0x378026e0 default_terminate_handler() + 248
5   libobjc.A.dylib               0x37f4b91e _objc_terminate() + 190
6   libc++abi.dylib               0x378001c4 std::__terminate(void (*)()) + 76
7   libc++abi.dylib               0x377ffa18 __cxa_throw + 112
8   libobjc.A.dylib               0x37f4b77e objc_exception_throw + 246
9   CoreFoundation                0x2dbbbe88 +[NSException raise:format:] + 100
10  Foundation                    0x2e4dd448 -[NSString stringByAppendingString:] + 84
11  RunControl                    0x000b2302 -[RunControlAppDelegate downloadData] (RunControlAppDelegate.m:297)
12  Foundation                    0x2e59fc82 __NSThread__main__ + 1058
13  libsystem_pthread.dylib       0x38572c1a _pthread_body + 138
14  libsystem_pthread.dylib       0x38572b8a _pthread_start + 98
15  libsystem_pthread.dylib       0x38570c8c thread_start + 4

Thread 3 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000000      r3: 0x00002060
    r4: 0x00000006    r5: 0x026f1000      r6: 0x00000000      r7: 0x026effb4
    r8: 0x16dbd9d0    r9: 0x00000001     r10: 0x16d52ce0     r11: 0x00000000
    ip: 0x00000148    sp: 0x026effa8      lr: 0x38573a33      pc: 0x3850a1fc
  cpsr: 0x00000010

和 RunControlAppDelegate.m(大约 297):

[295] - (void) downloadData {
[296]     NSString *stringURL = [config valueForKey:@"Users"];
[297]     NSURL  *url = [NSURL URLWithString:[self.URL stringByAppendingString:stringURL]];
[298]     NSData *urlData = [NSData dataWithContentsOfURL:url];
 ...

最佳答案

我大胆猜测您的更新包括 64 位更新 iOS7 + iPhone5,并且您的数据可能使用不正确的格式化程序进行格式化:

即:[NSString stringWithFormat:@"Some foo %d"];

这可能适用于 32 位 int,但在 64 位平台上会失败。

编译二进制文件时是否有任何警告?

关于ios - iPhone 应用程序在某些设备上启动时崩溃,但在其他设备上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22304060/

相关文章:

ios - 核心数据获取一对多关系数据

iphone - #import "test.h"与 #import <test.h>

iphone - 比较同一 UIViewController 类的实例或对象

iphone - 自动填写并提交 HTML 表单并在 UIWebView iOS 中查看

ios - 由于 iOS 13.3.1 崩溃,Apple 拒绝了该应用程序

ios - dismissViewControllerAnimated 不为 ViewController 设置动画

ios - 在 SwiftUI 中实时更新相对时间

ios - 如何在Swift中也具有返回类型的嵌套函数外壳中返回父函数

windows-7 - Windows现在必须重新启动,因为[我们的服务名称]服务意外终止

c++ - UNused 类的默认析构函数崩溃