J'ai fait une application qui devrait fonctionner jusqu'à ce que je l'arrête. Cela consiste essentiellement à obtenir des données à partir d'un autre périphérique et à les envoyer périodiquement au serveur à l'aide de NSURLConnection, à lire périodiquement les données du serveur et à visualiser ces données sous forme de graphique à l'aide de NSXMLParser.Mon application iPhone se bloque
J'ai exécuté l'instrument pour vérifier les allocs et les fuites. Aucune fuite du tout. Le moniteur de mémoire montre 5,2 Mo cohérent. Le graphe Objectalloc est stable, Net octets d'objectallo est 480000 et #net est 6400 environ.
Le problème est que l'application est arrêtée (ou se bloque) environ 12 heures plus tard. Quels sont les problèmes possibles? Je n'ai absolument aucune idée d'où commencer à trouver le problème parce que ni un débogueur ni l'instrument ne montrent aucune erreur ou problème.
[ajouté]
1. Comme la suggestion de Paul, j'ai couru mon application sur le simulateur et j'ai reçu des messages d'erreur après 5 heures de course.
InAir(64628,0xa050c720) malloc: *** error for object 0xc015bc87: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
InAir(64628,0xa050c720) malloc: *** error for object 0xa0200100: pointer being freed was not allocated
InAir(64628,0xa050c720) malloc: *** error for object 0x2080a043: pointer being freed was not allocated
InAir(64628,0xa050c720) malloc: *** error for object 0x120100: pointer being freed was not allocated
InAir(64628,0xa050c720) malloc: *** error for object 0x34a00000: pointer being freed was not allocated
InAir(64628,0xa050c720) malloc: *** error for object 0xc1d3a1b1: pointer being freed was not allocated
InAir(64628,0xa050c720) malloc: *** error for object 0x46b0a1b1: pointer being freed was not allocated
InAir(64628,0xa050c720) malloc: *** error for object 0xc1d3a1b1: pointer being freed was not allocated
Program received signal: “EXC_BAD_ACCESS”.
2. A propos du commentaire de NilObject ... Je ne savais pas que l'organisateur avait crashlog. Oui, ça l'a.
Incident Identifier: 0ADC2722-BF4B-457F-A224-4A946810FB1F
CrashReporter Key: f62c1dc12071b63c1e21d612962ee6aad74b4503
Process: InAir [3154]
Path: /var/mobile/Applications/9471A5CA-97E1-4E52-A934-9CE33DC5A5DB/InAir.app/InAir
Identifier: InAir
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2009-02-21 21:37:36.786 -0500
OS Version: iPhone OS 2.2.1 (5H11a)
Report Version: 103
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x300c8c18 objc_msgSend + 20
1 InAir 0x00003d34 0x1000 + 11572
2 Foundation 0x306942a0 __NSFireTimer + 132
3 CoreFoundation 0x30269d88 CFRunLoopRunSpecific + 2642
4 CoreFoundation 0x30269320 CFRunLoopRunInMode + 44
5 GraphicsServices 0x31567e58 GSEventRunModal + 268
6 UIKit 0x30a4fa6c -[UIApplication _run] + 520
7 UIKit 0x30a591d0 UIApplicationMain + 1132
8 InAir 0x000020b6 0x1000 + 4278
9 InAir 0x0000202c 0x1000 + 4140
Thread 0 crashed with ARM Thread State:
r0: 0x0013b920 r1: 0x301a2410 r2: 0x0013b920 r3: 0x301a2410
r4: 0xc004ea47 r5: 0x001203d0 r6: 0x001203d0 r7: 0x2fffef50
r8: 0x001203d0 r9: 0x394346d0 r10: 0x001063b0 r11: 0x00000f03
ip: 0x0000a134 sp: 0x2fffeef8 lr: 0x00003d3b pc: 0x300c8c18
cpsr: 0x00000010
(etc ... Le journal entier est here.)
Toute personne qui peut les interpréter?
Est-ce que ça plante alors? –
Non, je vais essayer. Je vous remercie. Ensuite, une chose est la façon d'obtenir les données de connecter un autre appareil via un microphone. Le simulateur ne peut donc pas fonctionner pleinement. – sky
Je déteste ces types de bugs, "attendre 12 heures et voir ...". Avez-vous des journaux de plantage (qui peuvent être consultés depuis l'organiseur dans xcode)? – NilObject