2012-06-15 10 views
8

Sto avendo uno strano problema con una mia app iOS. Quando viene eseguito tramite Xcode (Build & Run), tutto funziona correttamente. L'app si avvia e tutto funziona come previsto.Arresto anomalo di iOS all'avvio senza Xcode collegato

Tuttavia, se provo ad aprire l'app toccando la relativa icona come farebbe l'utente (tramite Springboard), l'app si arresta immediatamente con il crashlog in basso. Sembra indicare un qualche tipo di problema relativo all'immagine, ma non capisco come non si verifichi durante il debugging usando Xcode.

Qualcuno può far luce?

Date/Time:  2012-06-15 16:13:29.035 +0100 
OS Version:  iPhone OS 5.1.1 (9B206) 
Report Version: 104 

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

Thread 0 name: Dispatch queue: com.apple.main-thread 
Thread 0 Crashed: 
0 dyld       0x2fe76464 strcmp + 0 
1 dyld       0x2fe6a6e2 ImageLoaderMachO::parseLoadCmds() + 54 
2 dyld       0x2fe72058 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, ImageLoader::LinkContext const&) + 296 
3 dyld       0x2fe6b23a ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 302 
4 dyld       0x2fe622f6 _ZN4dyldL10loadPhase6EiRK4statPKcRKNS_11LoadContextE + 478 
5 dyld       0x2fe6255e _ZN4dyldL14loadPhase5statEPKcRKNS_11LoadContextEP4statPiPbPSt6vectorIS1_SaIS1_EE + 386 
6 dyld       0x2fe62716 _ZN4dyldL10loadPhase5EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 278 
7 dyld       0x2fe628fe _ZN4dyldL10loadPhase4EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 218 
8 dyld       0x2fe630dc _ZN4dyldL10loadPhase3EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 1144 
9 dyld       0x2fe63240 _ZN4dyldL10loadPhase1EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 108 
10 dyld       0x2fe63392 _ZN4dyldL10loadPhase0EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 262 
11 dyld       0x2fe634c4 dyld::load(char const*, dyld::LoadContext const&) + 224 
12 dyld       0x2fe650f2 dlopen + 742 
13 libdyld.dylib     0x360d55a2 dlopen + 42 
14 CoreFoundation     0x37256092 _CFBundleDlfcnLoadBundle + 106 
15 CoreFoundation     0x37255f36 _CFBundleLoadExecutableAndReturnError + 370 
16 Foundation      0x32d7bf40 -[NSBundle loadAndReturnError:] + 904 
17 SomeApp       0x000bcb3a 0x5e000 + 387898 
18 SomeApp       0x000c56d0 0x5e000 + 423632 
19 SomeApp       0x000c539a 0x5e000 + 422810 
20 SomeApp       0x00062f86 0x5e000 + 20358 
21 UIKit       0x30438c84 -[UIViewController view] + 160 
22 SomeApp       0x000622a6 0x5e000 + 17062 
23 SomeApp       0x0005fcc4 0x5e000 + 7364 
24 UIKit       0x30437ca4 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1176 
25 UIKit       0x304317d6 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 402 
26 UIKit       0x303ffabc -[UIApplication handleEvent:withNewEvent:] + 1004 
27 UIKit       0x303ff560 -[UIApplication sendEvent:] + 48 
28 UIKit       0x303fef34 _UIApplicationHandleEvent + 5820 
29 GraphicsServices    0x3741b224 PurpleEventCallback + 876 
30 CoreFoundation     0x3729f51c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32 
31 CoreFoundation     0x3729f4be __CFRunLoopDoSource1 + 134 
32 CoreFoundation     0x3729e30c __CFRunLoopRun + 1364 
33 CoreFoundation     0x3722149e CFRunLoopRunSpecific + 294 
34 CoreFoundation     0x37221366 CFRunLoopRunInMode + 98 
35 UIKit       0x30430864 -[UIApplication _run] + 544 
36 UIKit       0x3042dcce UIApplicationMain + 1074 
37 SomeApp       0x0005fb00 0x5e000 + 6912 
38 SomeApp       0x0005fac0 0x5e000 + 6848 

Edit: parlato questo attraverso con il Team Developer di Apple. Il problema è che ho usato un plug-in self-made nella mia app che non è stato codificato (anche se ho detto a Xcode di farlo). Tuttavia, Xcode 4.3.3 ha un bug che interrompe il codesign per i bundle, quindi vedremo presto come funziona.

+0

Qualsiasi problema a che fare con Xcode o è debugger non si può fare nulla, ma in entrambi cancellare la tua app dal debugger o riavvia Xcode. – Souljacker

+0

@nhahtdh Come intendi? Non si terminano le stringhe con NULL e io no. – Pripyat

+0

@ Ravin455 Questo è un problema pernamentale. Nessun riavvio/rimozione aiuterà, da qualche parte il codice sarà ancora sbagliato. – Pripyat

risposta

3

L'avvio dell'applicazione potrebbe richiedere troppo tempo. Viene dato un tempo illimitato quando si avvia da Xcode, ma non gli viene concesso questo lusso quando si avvia da SpringBoard.

Date un'occhiata a questo per riferimento: https://developer.apple.com/library/ios/#qa/qa2009/qa1592.html

edit: Oh, come sono arrivato qui ... questo è di due settimane.

4

Sembra che questo sia ancora un problema da Xcode 4.5. Come soluzione, sembra che tu possa forzare la compilazione a firmare il pacchetto.

L'aggiunta dei seguenti come "Run Script" finale costruire fase per il fascio fisso per me:

codesign -fs "iPhone Developer" ${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}

+1

Eccellente suggerimento, grazie Chris! – Pripyat

+0

grazie, questo aiuta molto! – PetrV

+0

Aggiungi virgolette in caso di spazi nel nome del prodotto. codesign -fs "Sviluppatore iPhone" "$ {BUILT_PRODUCTS_DIR}"/"$ {FULL_PRODUCT_NAME}" – user961889

Problemi correlati