내 iPhone 앱에서 특정 사용자가 앱을 열 때마다 앱이 항상 중단됩니다. 같은 창은 나와 다른 사람들에게 잘 작동하지만, 항상 어떤 사람들에게는 충돌을 일으 킵니다. 이 순간에 그것이 실패한 사람들과 그렇지 않은 사람들 사이의 차이점은 무엇인지 명확하지 않습니다.알 수없는 이유로 CFStringAppend 중에 Objective-C iOS 앱이 작동을 멈 춥니 다.
특정보기를 여는 애니메이션은 정상적으로 실행되지만 애니메이션이 끝난 직후에는 충돌이 발생합니다.
그들은 내게 crashlog를 보냈지 만, 정확히 무엇이 잘못되었는지 이해하는 것은 어렵습니다. 이해를 도울 수 있기를 바랍니다. crashlog에 의해 주어진 실패의 원인은 다음과 같은 예외입니다 :
이Last Exception Backtrace:
0 CoreFoundation 0x1836ffd38 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x182c14528 objc_exception_throw + 55
2 CoreFoundation 0x18370d1f8 -[NSObject+ 1372664 (NSObject) doesNotRecognizeSelector:] + 139
3 UIKit 0x18cec7cc4 -[UIResponder doesNotRecognizeSelector:] + 295
4 CoreFoundation 0x1837056e4 ___forwarding___ + 1379
5 CoreFoundation 0x1835eb0dc _CF_forwarding_prep_0 + 91
6 CoreFoundation 0x1835d6be8 CFStringAppend + 519
7 CoreFoundation 0x1836bddf0 __CFStringAppendFormatCore + 9271
8 CoreFoundation 0x1836bf658 _CFStringCreateWithFormatAndArgumentsAux2 + 131
9 AccessibilityUtilities 0x192d6b388 _AXStringForArgs + 279
10 UIKit 0x1a242adf8 -[UIViewControllerAccessibility viewDidAppear:] + 267
11 UIKit 0x18cb2869c -[UIViewController _setViewAppearState:isAnimating:] + 851
12 UIKit 0x18cb28c08 -[UIViewController _endAppearanceTransition:] + 227
13 UIKit 0x18cbcee00 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 1327
14 UIKit 0x1a2440cd4 -[UINavigationControllerAccessibility navigationTransitionView:didEndTransition:fromView:toView:] + 111
15 UIKit 0x18cc96bbc __49-[UINavigationController _startCustomTransition:]_block_invoke + 251
16 UIKit 0x18cc229d8 -[_UIViewControllerTransitionContext completeTransition:] + 115
17 UIKit 0x18cd67d30 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke.124 + 751
18 UIKit 0x18cb47d7c -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 763
19 UIKit 0x18cb4770c -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 311
20 UIKit 0x18cb47418 -[UIViewAnimationState animationDidStop:finished:] + 295
21 UIKit 0x1a2468970 -[UIViewAnimationStateAccessibility animationDidStop:finished:] + 131
22 QuartzCore 0x1876ebd6c CA::Layer::run_animation_callbacks+ 1232236 (void*) + 283
23 libdispatch.dylib 0x183085048 _dispatch_client_callout + 15
24 libdispatch.dylib 0x183091b74 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1015
25 CoreFoundation 0x1836a7f20 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 11
26 CoreFoundation 0x1836a5afc __CFRunLoopRun + 2011
27 CoreFoundation 0x1835c62d8 CFRunLoopRunSpecific + 435
28 GraphicsServices 0x185457f84 GSEventRunModal + 99
29 UIKit 0x18cb73880 UIApplicationMain + 207
30 Flyskyhy 0x10490bd80 main + 32128 (main.m:17)
31 libdyld.dylib 0x1830ea56c start + 3
crashlog는 CFStringAppend
을하는 동안 그 잘못을 나타 내기 위해 보이지만 문자열이 문제가, 또는 무엇 인 분명하지 않다 잘못되었거나 심지어 CFStringAppend
이 필요한 이유가 있습니다. 뷰에 표시되는 모든 문자열은 애니메이션이 시작되기 전에 이미 채워져 있으며 모두 정확합니다.
편집 :
요청에 따라보기를 시작하는 코드는 다음과 같습니다. 모든 것이 NavigationController 아래에 있으므로 새보기 컨트롤러가 네비게이션 스택에 푸시되어 열립니다.
WaypointEditController *controller = [[WaypointEditController alloc] initWithNibName:@"WayPointEdit" bundle:nil];
controller.navigationItem.title = @"New Waypoint";
// initialisation of other, custom, fields of controller
[self.navigationController pushViewController:controller animated:YES];
UIViewController
에서 파생되는 가압 WaypointEditController
클래스. 뷰의 필드를 초기화하려면 viewWillAppear
이 대체됩니다. 여기에 관련이 있습니다 - viewDidAppear
은 이 아니며이 무시됩니다. 나는 고객이이 문제를보고 내가 생산에서 다운로드 XCode가 스택 추적을 볼 수 있지만, 내가 할 수있는, 당신처럼
- (void) viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
self.navigationItem.title = @"New Waypoint";
// other initialisation of internal fields
}
충돌을 일으키는 코드를 게시 할 수 있습니까? 위의 내용만으로 문제를 진단하는 것은 어렵습니다. –
위에서 볼 수 있듯이 예외에 관련된 코드는 없습니다. – fishinear
ViewDidAppear 어딘가에서 인식 할 수없는 선택기 예외가 발생하는 것처럼 보입니다. 나는 그 코드를 다시 확인하거나 여기에 게시하여 확인할 수 있습니다. –