【问题标题】:App running on iPhone 3GS with ios4, but not in a iPhone 4 with iOS 5.0.1应用程序在带有 ios4 的 iPhone 3GS 上运行,但不能在带有 iOS 5.0.1 的 iPhone 4 上运行
【发布时间】:2012-02-10 16:37:41
【问题描述】:

我已经使用最新的 SDK 和 XCode 4.2 开发了一个 iOS 4 应用程序。

我已经在我的 iPhone 3GS 和 iOs 4.3.5 和模拟器上进行了测试,它可以工作!但现在,我已将它送去审核,但它已被拒绝,因为它在装有 iOS 5.0.1 的 iPhone 4 上崩溃。

他们说过:

我们发现您的应用在运行 iOS 5.0.1 的 iPhone 4 上安装时在启动时崩溃

这是崩溃日志:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>AutoSubmitted</key>
    <true/>
    <key>SysInfoCrashReporterKey</key>
    <string>b46ed4c9a3547574ffc93e0841c55f1097ba4371</string>
    <key>bug_type</key>
    <string>109</string>
    <key>description</key>
    <string>Incident Identifier: F3CE50AF-D164-4C60-BE4D-65D7F42E5226
CrashReporter Key:   b46ed4c9a3547574ffc93e0841c55f1097ba4371
Hardware Model:      iPhone3,1
Process:         Tarot [5670]
Path:            /var/mobile/Applications/C9491EAA-4064-4884-8349-334DC1EE87DF/Tarot.app/Tarot
Identifier:      Tarot
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2012-01-13 10:58:14.166 -0800
OS Version:      iPhone OS 5.0.1 (9A405)
Report Version:  104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread:  0

Last Exception Backtrace:
(0x342ca8bf 0x3451a1e5 0x342ca7b9 0x342ca7db 0x378e7747 0x378579cb 0x37736ea1 0x376ac78b 0x376d0f51 0x376956a5 0x377580e5 0x3769de51 0x3769de6d 0x3769dcff 0x3769dcdb 0x233b 0x376ab7eb 0x376a53bd 0x37673921 0x376733bf 0x37672d2d 0x30aa5df3 0x3429e553 0x3429e4f5 0x3429d343 0x342204dd 0x342203a5 0x376a4457 0x376a1743 0x20a7 0x2040)

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x361e532c 0x361d4000 + 70444
1   libsystem_c.dylib               0x330aef54 0x33061000 + 319316
2   libsystem_c.dylib               0x330a7fe4 0x33061000 + 290788
3   libc++abi.dylib                 0x336f1f64 0x336eb000 + 28516
4   libc++abi.dylib                 0x336ef346 0x336eb000 + 17222
5   libobjc.A.dylib                 0x3451a2dc 0x34511000 + 37596
6   libc++abi.dylib                 0x336ef3be 0x336eb000 + 17342
7   libc++abi.dylib                 0x336ef44a 0x336eb000 + 17482
8   libc++abi.dylib                 0x336f081e 0x336eb000 + 22558
9   libobjc.A.dylib                 0x3451a22e 0x34511000 + 37422
10  CoreFoundation                  0x3422053e 0x34211000 + 62782
11  CoreFoundation                  0x3422039e 0x34211000 + 62366
12  UIKit                           0x376a4450 0x37670000 + 214096
13  UIKit                           0x376a173c 0x37670000 + 202556
14  Tarot                           0x000020a0 0x1000 + 4256
15  Tarot                           0x00002038 0x1000 + 4152

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x361d53b4 0x361d4000 + 5044
1   libdispatch.dylib               0x36effe78 0x36ef3000 + 52856
2   libdispatch.dylib               0x36effb96 0x36ef3000 + 52118

Thread 2:
0   libsystem_kernel.dylib          0x361e5cd4 0x361d4000 + 72916
1   libsystem_c.dylib               0x3306b30a 0x33061000 + 41738
2   libsystem_c.dylib               0x3306b09c 0x33061000 + 41116

Thread 3:
0   libsystem_kernel.dylib          0x361e5cd4 0x361d4000 + 72916
1   libsystem_c.dylib               0x3306b30a 0x33061000 + 41738
2   libsystem_c.dylib               0x3306b09c 0x33061000 + 41116

Thread 4 name:  WebThread
Thread 4:
0   libsystem_kernel.dylib          0x361d5010 0x361d4000 + 4112
1   libsystem_kernel.dylib          0x361d5206 0x361d4000 + 4614
2   CoreFoundation                  0x3429e41c 0x34211000 + 578588
3   CoreFoundation                  0x3429d154 0x34211000 + 573780
4   CoreFoundation                  0x342204d6 0x34211000 + 62678
5   CoreFoundation                  0x3422039e 0x34211000 + 62366
6   WebCore                         0x366f4128 0x3664c000 + 688424
7   libsystem_c.dylib               0x33070c16 0x33061000 + 64534
8   libsystem_c.dylib               0x33070ad0 0x33061000 + 64208

Thread 0 crashed with ARM Thread State:
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000001      r3: 0x00000000
    r4: 0x00000006    r5: 0x3e998ce8      r6: 0x00000002      r7: 0x2fdffa70
    r8: 0x3fc3cdec    r9: 0x336f2a4a     r10: 0x00141140     r11: 0x3fc4863c
    ip: 0x00000148    sp: 0x2fdffa64      lr: 0x330aef5b      pc: 0x361e532c
  cpsr: 0x00000010

Binary Images:
    0x1000 -     0x7fff +Tarot armv7  &lt;c7e3c083432a3060ac78f8c06c91c3ec&gt; /var/mobile/Applications/C9491EAA-4064-4884-8349-334DC1EE87DF/Tarot.app/Tarot
0x2fefc000 - 0x2ff1dfff  dyld armv7  &lt;be7c0b491a943054ad12eb5060f1da06&gt; 
0x37c5a000 - 0x37c5afff  libunwind.dylib armv7  &lt;d21222aad8c93d6c9580f9bf47071946&gt; /usr/lib/system/libunwind.dylib
</string>
    <key>displayName</key>
    <string>Tarot</string>
    <key>name</key>
    <string>Tarot</string>
    <key>os_version</key>
    <string>iPhone OS 5.0.1 (9A405)</string>
    <key>system_ID</key>
    <string></string>
    <key>version</key>
    <string>??? (???)</string>
</dict>
</plist>

更新
这是象征性的崩溃:

    Incident Identifier: F3CE50AF-D164-4C60-BE4D-65D7F42E5226
    CrashReporter Key:   b46ed4c9a3547574ffc93e0841c55f1097ba4371
    Hardware Model:      iPhone3,1
    Process:         Tarot [5670]
    Path:            /var/mobile/Applications/C9491EAA-4064-4884-8349-334DC1EE87DF/Tarot.app/Tarot
    Identifier:      Tarot
    Version:         ??? (???)
    Code Type:       ARM (Native)
    Parent Process:  launchd [1]

    Date/Time:       2012-01-13 10:58:14.166 -0800
    OS Version:      iPhone OS 5.0.1 (9A405)
    Report Version:  104

    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x00000000, 0x00000000
    Crashed Thread:  0

    Last Exception Backtrace:
    0   CoreFoundation                  0x342ca8bf 0x34211000 + 759999
    1   libobjc.A.dylib                 0x3451a1e5 0x34511000 + 37349
    2   CoreFoundation                  0x342ca7b9 0x34211000 + 759737
    3   CoreFoundation                  0x342ca7db 0x34211000 + 759771
    4   UIKit                           0x378e7747 0x37670000 + 2586439
    5   UIKit                           0x378579cb 0x37670000 + 1997259
    6   UIKit                           0x37736ea1 0x37670000 + 814753
    7   UIKit                           0x376ac78b 0x37670000 + 247691
    8   UIKit                           0x376d0f51 0x37670000 + 397137
    9   UIKit                           0x376956a5 0x37670000 + 153253
    10  UIKit                           0x377580e5 0x37670000 + 950501
    11  UIKit                           0x3769de51 0x37670000 + 187985
    12  UIKit                           0x3769de6d 0x37670000 + 188013
    13  UIKit                           0x3769dcff 0x37670000 + 187647
    14  UIKit                           0x3769dcdb 0x37670000 + 187611
    15  Tarot                           0x0000233b -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:46)
    16  UIKit                           0x376ab7eb 0x37670000 + 243691
    17  UIKit                           0x376a53bd 0x37670000 + 218045
    18  UIKit                           0x37673921 0x37670000 + 14625
    19  UIKit                           0x376733bf 0x37670000 + 13247
    20  UIKit                           0x37672d2d 0x37670000 + 11565
    21  GraphicsServices                0x30aa5df3 0x30aa1000 + 19955
    22  CoreFoundation                  0x3429e553 0x34211000 + 578899
    23  CoreFoundation                  0x3429e4f5 0x34211000 + 578805
    24  CoreFoundation                  0x3429d343 0x34211000 + 574275
    25  CoreFoundation                  0x342204dd 0x34211000 + 62685
    26  CoreFoundation                  0x342203a5 0x34211000 + 62373
    27  UIKit                           0x376a4457 0x37670000 + 214103
    28  UIKit                           0x376a1743 0x37670000 + 202563
    29  Tarot                           0x000020a7 main (main.m:16)
    30  Tarot                           0x00002040 0x1000 + 4160


    Thread 0 name:  Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0   libsystem_kernel.dylib          0x361e532c 0x361d4000 + 70444
    1   libsystem_c.dylib               0x330aef54 0x33061000 + 319316
    2   libsystem_c.dylib               0x330a7fe4 0x33061000 + 290788
    3   libc++abi.dylib                 0x336f1f64 abort_message + 40
    4   libc++abi.dylib                 0x336ef346 default_terminate() + 18
    5   libobjc.A.dylib                 0x3451a2dc 0x34511000 + 37596
    6   libc++abi.dylib                 0x336ef3be safe_handler_caller(void (*)()) + 70
    7   libc++abi.dylib                 0x336ef44a std::terminate() + 14
    8   libc++abi.dylib                 0x336f081e __cxa_rethrow + 82
    9   libobjc.A.dylib                 0x3451a22e 0x34511000 + 37422
    10  CoreFoundation                  0x3422053e 0x34211000 + 62782
    11  CoreFoundation                  0x3422039e 0x34211000 + 62366
    12  UIKit                           0x376a4450 0x37670000 + 214096
    13  UIKit                           0x376a173c 0x37670000 + 202556
    14  Tarot                           0x000020a0 main (main.m:16)
    15  Tarot                           0x00002038 0x1000 + 4152

    Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
    Thread 1:
    0   libsystem_kernel.dylib          0x361d53b4 0x361d4000 + 5044
    1   libdispatch.dylib               0x36effe78 0x36ef3000 + 52856
    2   libdispatch.dylib               0x36effb96 0x36ef3000 + 52118

    Thread 2:
    0   libsystem_kernel.dylib          0x361e5cd4 0x361d4000 + 72916
    1   libsystem_c.dylib               0x3306b30a 0x33061000 + 41738
    2   libsystem_c.dylib               0x3306b09c 0x33061000 + 41116

    Thread 3:
    0   libsystem_kernel.dylib          0x361e5cd4 0x361d4000 + 72916
    1   libsystem_c.dylib               0x3306b30a 0x33061000 + 41738
    2   libsystem_c.dylib               0x3306b09c 0x33061000 + 41116

    Thread 4 name:  WebThread
    Thread 4:
    0   libsystem_kernel.dylib          0x361d5010 0x361d4000 + 4112
    1   libsystem_kernel.dylib          0x361d5206 0x361d4000 + 4614
    2   CoreFoundation                  0x3429e41c 0x34211000 + 578588
    3   CoreFoundation                  0x3429d154 0x34211000 + 573780
    4   CoreFoundation                  0x342204d6 0x34211000 + 62678
    5   CoreFoundation                  0x3422039e 0x34211000 + 62366
    6   WebCore                         0x366f4128 0x3664c000 + 688424
    7   libsystem_c.dylib               0x33070c16 0x33061000 + 64534
    8   libsystem_c.dylib               0x33070ad0 0x33061000 + 64208

    Thread 0 crashed with ARM Thread State:
        r0: 0x00000000    r1: 0x00000000      r2: 0x00000001      r3: 0x00000000
        r4: 0x00000006    r5: 0x3e998ce8      r6: 0x00000002      r7: 0x2fdffa70
        r8: 0x3fc3cdec    r9: 0x336f2a4a     r10: 0x00141140     r11: 0x3fc4863c
        ip: 0x00000148    sp: 0x2fdffa64      lr: 0x330aef5b      pc: 0x361e532c
      cpsr: 0x00000010

    Binary Images:
        0x1000 -     0x7fff +Tarot armv7  <c7e3c083432a3060ac78f8c06c91c3ec> 
...
    0x37c5a000 - 0x37c5afff  libunwind.dylib armv7  <d21222aad8c93d6c9580f9bf47071946> /usr/lib/system/libunwind.dylib


更新结束

我不知道该如何处理。我认为这可能是我手动添加的导航控制器的问题。这是代码:

#import <UIKit/UIKit.h>

@class ViewController;
@class OneCardViewController;
@class ThreeCardsViewController;
@class AboutViewController;

@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
    UINavigationController* navController;
    ViewController* viewController;
    OneCardViewController* oneCardViewController;
    ThreeCardsViewController* threeCardsViewController;
    AboutViewController* aboutViewController;
}

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;

更新
这里发布的第一行是 XCode 编辑器上的第 17 行。
更新结束

和M文件:

@implementation AppDelegate

@synthesize window = _window;
@synthesize viewController;

- (void)dealloc
{
    [_window release];

    [navController release];
    [viewController release];
    [oneCardViewController release];
    [threeCardsViewController release];
    [aboutViewController release];

    [super dealloc];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    // Override point for customization after application launch.
    viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
    viewController.title = @"Menu";
    navController = [[UINavigationController alloc] initWithRootViewController:viewController];
    navController.navigationBar.tintColor = [UIColor darkGrayColor];

    self.window.rootViewController = navController;

    [self.window makeKeyAndVisible];
    return YES;
}

你能帮帮我吗?
更新
这行好像有问题:

[self.window makeKeyAndVisible];

【问题讨论】:

  • 请发布符号化的最后一个异常回溯。
  • 对不起,我不知道符号化的最后一个异常回溯是什么。
  • 崩溃报告包括“Last Exception Backtrace”。您可以使用atos 命令行工具将地址转换为人类可读的函数名称。
  • 谢谢。我会这样做,但我不知道需要多少时间(这是我第一次这样做)。再次感谢。
  • 您也可以尝试将崩溃报告拖到 Xcode 管理器中。 Xcode 应该自动符号化它。

标签: iphone objective-c ios app-store-connect


【解决方案1】:

问题似乎在于您的 ViewController 代码,或者是 NIB。查看该课程的viewWillAppear:viewDidAppear:。在 NIB 中,查找任何缺失的引用文件(例如图像视图缺失图像)。

很遗憾,没有发布该代码,因此进一步的帮助有限。 但是.. 你为什么不把你的 3GS 升级到 iOS5 来调试这个问题呢?

【讨论】:

    【解决方案2】:

    当您使用 Xcode 的“Build for Archiving”命令构建应用程序时,调试符号文件应该会自动生成并存储。此符号文件可用于“符号化”崩溃日志文件,从而可以读取此类文件并找出导致崩溃的原因。将 Apple 发送给您的日志文件拖到 Xcode 的 Organizer 窗口的 Devices 部分(或使用该窗口底部的 Import 按钮),让 Xcode 向您显示符号化的日志文件。然后堆栈跟踪将告诉您崩溃发生时正在运行的方法,以及导致该方法被调用的调用链的其余部分。

    【讨论】:

    • 他们向我发送了 .plist 文件,当我尝试拖动设备或导入它时,什么也没有发生。
    • 查看this question 以获得更好的过程描述(带图片!)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-10-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多