일반적으로 SO
에 내 충돌 보고서를 이해하는 데 도움이 필요하지 않지만 (a) 전문가의 크래시 보고서 읽기에 대해 많이 배울 수 있습니다. (b) 나는 내가 기대했던 것처럼 네비게이션 흐름에 대해서 많이 이해하지 못한다 (이 부분은 내가 생각하는 충돌 보고서에 특정 적이다).iOS - loadViewIfRequired에서 크래시가 발생했습니다.
그래서 누군가가 동일한 문제를 겪어 왔기 때문에 내 앱이 왜 충돌하는지 이해할 수 있기를 바랍니다.
가끔씩 만 충돌하며, 이는 간헐적 인 이유에 대한 것입니다. 그러나 충돌이 발생하면 동일한 스택 추적 (아래 그림 참조)으로 같은 위치에서 충돌합니다.
이제는 cmdPressed (이 메서드에는 많은 코드가 있음)에서 충돌하는 것을 볼 수 있지만 그보다 더 깊은 것을 이해하는 것은 어렵습니다.
아래의 충돌 보고서를 읽은 사람에게 내 앱이 왜 충돌하는지에 대한 조언이 있습니까 ??? 그리고 왜 그것이 모순이 될 수 있습니까?
Thread 0 Crashed:
0 libobjc.A.dylib 0x344dd5aa _objc_msgSend + 10
1 UIKit 0x3374458d -[UIViewController loadViewIfRequired] + 365
2 UIKit 0x33799133 -[UIViewController contentScrollView] + 27
3 UIKit 0x33799079 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 29
4 UIKit 0x33798f5d -[UINavigationController _layoutViewController:] + 33
5 UIKit 0x33798e81 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 273
6 UIKit 0x337985c1 -[UINavigationController _startTransition:fromViewController:toViewController:] + 65
7 UIKit 0x337984a9 -[UINavigationController _startDeferredTransitionIfNeeded:] + 325
8 UIKit 0x337e54b1 -[UINavigationController defaultFirstResponder] + 129
9 UIKit 0x33797849 -[UIResponder(Internal) _deepestDefaultFirstResponder] + 25
10 UIKit 0x337976fb -[UIResponder(Internal) _promoteDeepestDefaultFirstResponder] + 31
11 UIKit 0x33813349 -[UIWindowController transitionViewDidStart:] + 81
12 UIKit 0x337bf8db -[UITransitionView transition:fromView:toView:removeFromView:] + 991
13 UIKit 0x33a00059 __91-[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:]_block_invoke_0236 + 389
14 UIKit 0x33812961 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 4761
15 UIKit 0x33810fc7 -[UIViewController presentViewController:withTransition:completion:] + 3395
16 UIKit 0x33933257 -[UIViewController presentModalViewController:animated:] + 31
17 MyApp 0x00044973 -[AppViewController cmdPressed] (AppViewController.mm:553)
18 UIKit 0x338100a5 -[UIApplication sendAction:to:from:forEvent:] + 73
19 UIKit 0x33810057 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 31
20 UIKit 0x33810035 -[UIControl sendAction:to:forEvent:] + 45
21 UIKit 0x3380f8eb -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 503
22 UIKit 0x3380fde1 -[UIControl touchesEnded:withEvent:] + 489
23 UIKit 0x337385f1 -[UIWindow _sendTouchesForEvent:] + 525
24 UIKit 0x33725801 -[UIApplication sendEvent:] + 381
25 UIKit 0x3372511b _UIApplicationHandleEvent + 6155
26 GraphicsServices 0x389085a3 _PurpleEventCallback + 591
27 GraphicsServices 0x389081d3 PurpleEventCallback + 35
28 CoreFoundation 0x3a5c8173 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35
29 CoreFoundation 0x3a5c8117 __CFRunLoopDoSource1 + 139
30 CoreFoundation 0x3a5c6f99 __CFRunLoopRun + 1385
31 CoreFoundation 0x3a539ebd _CFRunLoopRunSpecific + 357
32 CoreFoundation 0x3a539d49 _CFRunLoopRunInMode + 105
33 GraphicsServices 0x389072eb _GSEventRunModal + 75
34 UIKit 0x337792f9 _UIApplicationMain + 1121
35 MyApp 0x0003d083 main (main.m:44)
모든 조언을 크게 듣습니다. 감사!!!
objc_msgSend
의 충돌은 종종 메모리 관리 문제로 인해 발생합니다. using the Zombies instrument 동안 충돌을 재현 해보고 더 많은 정보를 제공하는지 확인하십시오. –presentModalViewController에서 충돌이 발생하므로 잘못된 정보를 보내고있는 것일 수 있습니다. 오류 메시지가 표시되면 게시해야합니다. 여기에 표시된 내용을 더 자세히 볼 수는 없습니다. –
'AppViewController'의 코드를 게시하십시오. – Nick