Pergunta

Desenvolvi um aplicativo iOS 4 com o SDK e XCode 4.2 mais recentes.

Testei no meu iPhone 3GS com iOs 4.3.5 e no Simulador e funciona! Mas agora, eu o enviei para análise e ele foi rejeitado porque trava em um iPhone 4 com iOS 5.0.1.

Eles disseram que:

Descobrimos que seu aplicativo travou na inicialização durante a instalação no iPhone 4 com iOS 5.0.1

Este é o log de falha:

<?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>

ATUALIZAÇÃO
Este é o acidente simbolizado:

    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


FIM DA ATUALIZAÇÃO

Não sei como lidar com isso. Acho que pode ser um problema com um navcontroller que adicionei manualmente. Este é o código:

#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;

ATUALIZAÇÃO
A primeira linha postada aqui é a linha 17 do editor XCode.
FIM DA ATUALIZAÇÃO

E arquivo 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;
}

Você pode me ajudar, por favor?
ATUALIZAÇÃO
Parece haver um problema com esta linha:

[self.window makeKeyAndVisible];
Foi útil?

Solução

O problema parece estar no código do ViewController ou no NIB.Procure no viewWillAppear: e viewDidAppear: dessa classe.No NIB, procure todos os arquivos referenciados ausentes (como visualizações de imagens em falta).

Infelizmente, como não postou esse código, a ajuda adicional é limitada. Mas .. Por que você não atualiza seu 3GS para iOS5 para depurar o problema?

Outras dicas

Quando você constrói seu aplicativo usando o comando "Build for Archiving" do Xcode, o arquivo de símbolos de depuração deve ser gerado e armazenado automaticamente.Este arquivo de símbolos pode ser usado para "simbolizar" arquivos de log de travamento, o que torna possível ler esses arquivos e descobrir o que causou o travamento.Arraste o arquivo de registro que a Apple enviou para a seção Dispositivos da janela do Organizer do Xcode (ou use o botão Importar na parte inferior da janela) para que o Xcode mostre o arquivo de registro simbolizado.O rastreamento de pilha dirá qual método estava em execução quando a falha aconteceu, bem como o resto da cadeia de chamadas que resultou na chamada desse método.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top