Quelle est la différence entre KERN_INVALID_ADDRESS
et KERN_PROTECTION_FAILURE
sur iPhone OS?Quelle est la différence entre KERN_INVALID_ADDRESS et KERN_PROTECTION_FAILURE?
J'ai deux rapports d'erreur à partir d'un bêta testeur ad hoc qui sont à 5 minutes d'intervalle et la principale différence entre les deux (autres que les « images binaires: » section) est cette section:
Rapport A:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000008
Rapport B:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x67696c69
Pour ce que ça vaut la peine, les deux ont cette trace:
Thread 0 Crashed:
0 libobjc.A.dylib 0x30011940 objc_msgSend + 20
1 UIKit 0x30940174 -[UIWindow _shouldAutorotateToInterfaceOrientation:] + 60
2 UIKit 0x30a223d8 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 36
3 UIKit 0x30958638 -[UIWindow _updateInterfaceOrientationFromDeviceOrientation] + 112
4 UIKit 0x30942514 -[UIWindow _handleDeviceOrientationChange:] + 72
5 Foundation 0x3054dc7a _nsnote_callback + 178
6 CoreFoundation 0x3024ea52 _CFXNotificationPostNotification + 298
7 Foundation 0x3054b854 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
8 UIKit 0x309414a4 -[UIDevice setOrientation:] + 124
9 UIKit 0x30938330 -[UIApplication handleEvent:withNewEvent:] + 5232
10 UIKit 0x30936ce8 -[UIApplication sendEvent:] + 60
11 UIKit 0x30936874 _UIApplicationHandleEvent + 4336
12 GraphicsServices 0x32046964 PurpleEventCallback + 1028
13 CoreFoundation 0x30254a70 CFRunLoopRunSpecific + 2296
14 CoreFoundation 0x30254164 CFRunLoopRunInMode + 44
15 GraphicsServices 0x3204529c GSEventRunModal + 188
16 UIKit 0x308f0374 -[UIApplication _run] + 552
17 UIKit 0x308eea8c UIApplicationMain + 960
18 MyApp 0x00015e24 0x1000 + 85540
19 MyApp 0x0000f138 0x1000 + 57656
De même, je n'implémente pas la méthode "shouldAutorotateToInterfaceOrientation:" n'importe où dans mon code.
Avez-vous découvert ce qui causait ce problème particulier? J'essaye de déboguer un accident avec un backtrace presque identique à ceci, et votre solution pourrait me diriger dans la bonne direction. –
Nathan, je ne suis pas sûr à 100% que ce soit le correctif pour ce problème, mais je libérais prématurément un UIViewController instancié à partir d'Interface Builder. J'ai également fait plusieurs autres changements, y compris le code de réécriture qui anime l'interface avant de jouer un film via MPMoviePlayerController. Depuis ce lot de correctifs, mes testeurs n'ont pas signalé le problème. Bonne chance ... celui-ci peut être difficile à traquer. – davidcann
OK, merci pour la tête David. Je n'ai pas encore résolu le problème, mais j'ai trouvé deux ressources qui pourraient vous intéresser: http://sealiesoftware.com/blog/archive/2008/09/22/objc_explain_So_you_crashed_in_objc_msgSend.html http: // sealiesoftware .com/blog/archive/2009/06/08/objc_explain_So_you_crashed_in_objc_msgSend_iPhone_Edition.html –