2

我試過尋找這個,但沒有運氣,所以希望有一些大師的人可能知道答案。應用程序在runTransitionForCurrentState上崩潰,但沒有線索爲什麼

我看到大量的iTunes Connect中的報告與特定的堆棧跟蹤崩潰,但堆棧跟蹤顯示沒有任何用處。

#0. Crashed: main 
0 UIKit       0x1871100c0 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 324 
1 UIKit       0x1871100bc __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 320 
2 UIKit       0x1870630c8 _runAfterCACommitDeferredBlocks + 292 
3 UIKit       0x187070a80 _cleanUpAfterCAFlushAndRunDeferredBlocks + 92 
4 UIKit       0x186da25a4 _afterCACommitHandler + 96 
5 CoreFoundation     0x181c0c728 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 
6 CoreFoundation     0x181c0a4cc __CFRunLoopDoObservers + 372 
7 CoreFoundation     0x181c0a8fc __CFRunLoopRun + 928 
8 CoreFoundation     0x181b34c50 CFRunLoopRunSpecific + 384 
9 GraphicsServices    0x18341c088 GSEventRunModal + 180 
10 UIKit       0x186e1a088 UIApplicationMain + 204 
11 MyApp       0x100082e6c main (main.m:19) 
12 libdyld.dylib     0x1816d28b8 start + 4 

無圖案的報道,發生在iOS 9.1,9.2,9.3-10和各種iPhone和iPad,沒有線索,以幫助重現。

有沒有人經歷過類似這樣的事情,並對可能導致它的一些見解/懷疑?

+0

顯示你的相關代碼,你如何呈現一些viewcontroller! – Lion

+0

謝謝Lion,但是我至少在50個不同的地方介紹風險投資,並且不能從任何一個地方複製問題。 –

+0

我有這個確切的相同的崩潰發生,我不知道發生了什麼。我唯一的線索是大多數時間,我的一個視圖控制器在連續兩次報告一個「viewWillDisappear' /'viewDidDisappear'對,但沒有報告它出現在兩者之間。 –

回答

6

我有完全相同的崩潰,我找出原因。我的代碼一個高度簡化的版本看起來在上面的代碼片段像

[self dismissViewControllerAnimated:YES completion:nil]; 
// call a method that ends up doing 
[appRootViewController dismissViewControllerAnimated:NO completion:nil]; 

self是一個已經呈現模態在根視圖控制器。視圖控制器本身也提供了一些其他控制器的當前上下文模態。所以我在做的是試圖用動畫來消除過流上下文控制器,然後調用其他代碼,最終將沒有動畫的任何呈現的視圖控制器從根開始解散。

或者換句話說,當前一個動畫解除正在進行時,爲剛剛啓動的動畫解除提供當前上下文的視圖控制器將從視圖層次中移除。

當在Xcode中重現,它也記錄了以下控制檯:

transitionViewForCurrentTransition沒有設置,演示控制器,在演示過程中被駁回? (< _UIOverCurrentContextPresentationController:0x7faf277d9c30>)

+0

獲取非常類似的崩潰和懷疑的原因是一樣的 – lal

+0

@Kevin Ballard我有一個類似的問題,並試圖找出根本原因。我添加了一個處理兩個解僱的func,我想知道這是否安全:https://stackoverflow.com/questions/48764872/uipresentationcontroller-crash-just-points-to-appdelegate – user2363025

相關問題