2013-02-18 78 views
1

我有一個設置,我呈現一個UIPickerViewController(模態),然後將一些更多的控制器壓入堆棧進行圖像編輯。如果我點擊後退按鈕並進入根視圖控制器,然後點擊另一個選項卡,應用程序崩潰。視圖控制器獲取釋放後發送給它的消息,導致崩潰

這是崩潰的消息:

-[PostPhotoViewController respondsToSelector:]: message sent to deallocated instance 0x19b16a60 

我跑了植物大戰殭屍的儀器,它看起來像過去的視圖控制器(PostPhotoViewController),這是堆棧上,即使它已經發布了越來越發送給它的消息, 。 iOS5和iOS6都出現這種情況,所以我沒有做任何手動釋放/保留。

我已經設置所有的零售店無PostPhotoVC並退訂所有通知。該消息似乎來自標籤欄控制器。

不知道如何阻止它,有什麼想法?

這裏的殭屍讀出:

# Address Category Event Type RefCt Timestamp Size Responsible Library Responsible Caller 
0 0x1b730790 PostPhotoViewController Malloc 1 00:19.248.903 256 UIKit -[UIClassSwapper initWithCoder:] 
1 0x1b730790 PostPhotoViewController Retain 2 00:19.248.948 0 UIKit UINibDecoderDecodeObjectForValue 
2 0x1b730790 PostPhotoViewController Retain 3 00:19.248.998 0 UIKit -[UIRuntimeConnection initWithCoder:] 
3 0x1b730790 PostPhotoViewController Retain 4 00:19.249.004 0 UIKit -[UIRuntimeConnection initWithCoder:] 
4 0x1b730790 PostPhotoViewController Retain 5 00:19.249.025 0 UIKit -[UIRuntimeConnection initWithCoder:] 
5 0x1b730790 PostPhotoViewController Retain 6 00:19.249.030 0 UIKit -[UIRuntimeConnection initWithCoder:] 
6 0x1b730790 PostPhotoViewController Retain 7 00:19.249.067 0 UIKit UINibDecoderDecodeObjectForValue 
7 0x1b730790 PostPhotoViewController Retain 8 00:19.249.080 0 UIKit UINibDecoderDecodeObjectForValue 
8 0x1b730790 PostPhotoViewController Retain 9 00:19.249.648 0 UIKit -[UIStoryboardScene setSceneViewController:] 
9 0x1b730790 PostPhotoViewController Retain 10 00:19.249.759 0 UIKit -[UINib instantiateWithOwner:options:] 
10 0x1b730790 PostPhotoViewController Release 9 00:19.249.849 0 UIKit -[UINibDecoder finishDecoding] 
11 0x1b730790 PostPhotoViewController Release 8 00:19.249.884 0 UIKit -[UINibDecoder finishDecoding] 
12 0x1b730790 PostPhotoViewController Release 7 00:19.249.897 0 UIKit -[UINibDecoder finishDecoding] 
13 0x1b730790 PostPhotoViewController Release 6 00:19.249.900 0 UIKit -[UINibDecoder finishDecoding] 
14 0x1b730790 PostPhotoViewController Release 5 00:19.249.921 0 UIKit -[UIRuntimeConnection dealloc] 
15 0x1b730790 PostPhotoViewController Release 4 00:19.249.930 0 UIKit -[UIRuntimeConnection dealloc] 
16 0x1b730790 PostPhotoViewController Release 3 00:19.249.936 0 UIKit -[UIRuntimeConnection dealloc] 
17 0x1b730790 PostPhotoViewController Release 2 00:19.249.946 0 UIKit -[UIRuntimeConnection dealloc] 
18 0x1b730790 PostPhotoViewController Retain 3 00:19.249.998 0 UIKit -[UIStoryboardSegue initWithIdentifier:source:destination:] 
19 0x1b730790 PostPhotoViewController Retain 4 00:19.250.010 0 V Nation -[ImageEditViewController prepareForSegue:sender:] 
20 0x1b730790 PostPhotoViewController Release 3 00:19.250.018 0 V Nation -[ImageEditViewController prepareForSegue:sender:] 
21 0x1b730790 PostPhotoViewController Retain 4 00:19.250.045 0 UIKit -[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:] 
22 0x1b730790 PostPhotoViewController Release 3 00:19.254.033 0 UIKit -[UIStoryboardSegue dealloc] 
23 0x1b730790 PostPhotoViewController Release 2 00:19.254.037 0 UIKit _UIApplicationHandleEvent 
24 0x1b730790 PostPhotoViewController Release 1 00:19.254.047 0 UIKit -[UIStoryboardScene dealloc] 
25 0x1b730790 PostPhotoViewController Retain 2 00:19.254.119 0 UIKit -[UINavigationController topViewController] 
26 0x1b730790 PostPhotoViewController Autorelease  00:19.254.124 0 UIKit -[UINavigationController topViewController] 
27 0x1b730790 PostPhotoViewController Retain 3 00:19.254.935 0 UIKit -[UINib instantiateWithOwner:options:] 
28 0x1b730790 PostPhotoViewController Retain 4 00:19.254.944 0 UIKit +[UIProxyObject addMappingFromIdentifier:toObject:forCoder:] 
29 0x1b730790 PostPhotoViewController Retain 5 00:19.254.950 0 UIKit -[UINib instantiateWithOwner:options:] 
30 0x1b730790 PostPhotoViewController Retain 6 00:19.254.957 0 UIKit +[UIProxyObject addMappingFromIdentifier:toObject:forCoder:] 
31 0x1b730790 PostPhotoViewController Retain 7 00:19.254.993 0 UIKit -[UIProxyObject initWithCoder:] 
32 0x1b730790 PostPhotoViewController Retain 8 00:19.254.994 0 UIKit -[UIRuntimeConnection initWithCoder:] 
33 0x1b730790 PostPhotoViewController Retain 9 00:19.255.282 0 UIKit -[UIRuntimeConnection initWithCoder:] 
34 0x1b730790 PostPhotoViewController Retain 10 00:19.255.312 0 UIKit -[UIRuntimeConnection initWithCoder:] 
35 0x1b730790 PostPhotoViewController Retain 11 00:19.263.971 0 UIKit -[UIProxyObject initWithCoder:] 
36 0x1b730790 PostPhotoViewController Retain 12 00:19.263.971 0 UIKit -[UIRuntimeConnection initWithCoder:] 
37 0x1b730790 PostPhotoViewController Retain 13 00:19.264.922 0 UIKit UINibDecoderDecodeObjectForValue 
38 0x1b730790 PostPhotoViewController Retain 14 00:19.264.924 0 UIKit UINibDecoderDecodeObjectForValue 
39 0x1b730790 PostPhotoViewController Retain 15 00:19.264.939 0 UIKit UINibDecoderDecodeObjectForValue 
40 0x1b730790 PostPhotoViewController Retain 16 00:19.264.941 0 UIKit UINibDecoderDecodeObjectForValue 
41 0x1b730790 PostPhotoViewController Release 15 00:19.265.032 0 UIKit -[UINib instantiateWithOwner:options:] 
42 0x1b730790 PostPhotoViewController Release 14 00:19.265.046 0 UIKit +[UIProxyObject removeMappingsForCoder:] 
43 0x1b730790 PostPhotoViewController Release 13 00:19.265.049 0 UIKit +[UIProxyObject removeMappingsForCoder:] 
44 0x1b730790 PostPhotoViewController Release 12 00:19.265.060 0 UIKit -[UINibDecoder finishDecoding] 
45 0x1b730790 PostPhotoViewController Release 11 00:19.265.061 0 UIKit -[UINibDecoder finishDecoding] 
46 0x1b730790 PostPhotoViewController Release 10 00:19.265.076 0 UIKit -[UINibDecoder finishDecoding] 
47 0x1b730790 PostPhotoViewController Release 9 00:19.265.077 0 UIKit -[UINibDecoder finishDecoding] 
48 0x1b730790 PostPhotoViewController Release 8 00:19.265.095 0 UIKit -[UINibDecoder finishDecoding] 
49 0x1b730790 PostPhotoViewController Release 7 00:19.265.103 0 UIKit -[UIRuntimeConnection dealloc] 
50 0x1b730790 PostPhotoViewController Release 6 00:19.265.109 0 UIKit -[UINibDecoder finishDecoding] 
51 0x1b730790 PostPhotoViewController Release 5 00:19.265.118 0 UIKit -[UIRuntimeConnection dealloc] 
52 0x1b730790 PostPhotoViewController Release 4 00:19.265.126 0 UIKit -[UIRuntimeConnection dealloc] 
53 0x1b730790 PostPhotoViewController Release 3 00:19.265.133 0 UIKit -[UIRuntimeConnection dealloc] 
54 0x1b730790 PostPhotoViewController Release 2 00:19.265.548 0 Foundation -[NSAutoreleasePool drain] 
55 0x1b730790 PostPhotoViewController Retain 3 00:19.292.511 0 UIKit -[UINavigationController topViewController] 
56 0x1b730790 PostPhotoViewController Autorelease  00:19.292.517 0 UIKit -[UINavigationController topViewController] 
57 0x1b730790 PostPhotoViewController Retain 4 00:19.297.581 0 UIKit -[UINavigationController topViewController] 
58 0x1b730790 PostPhotoViewController Autorelease  00:19.297.585 0 UIKit -[UINavigationController topViewController] 
59 0x1b730790 PostPhotoViewController Retain 5 00:19.297.598 0 UIKit -[UINavigationController _startTransition:fromViewController:toViewController:] 
60 0x1b730790 PostPhotoViewController Release 4 00:19.297.619 0 UIKit -[UINavigationController _startTransition:fromViewController:toViewController:] 
61 0x1b730790 PostPhotoViewController Retain 5 00:19.297.957 0 UIKit -[UINavigationController topViewController] 
62 0x1b730790 PostPhotoViewController Autorelease  00:19.297.958 0 UIKit -[UINavigationController topViewController] 
63 0x1b730790 PostPhotoViewController Retain 6 00:19.298.000 0 UIKit -[UIResponder becomeFirstResponder] 
64 0x1b730790 PostPhotoViewController Release 5 00:19.298.015 0 UIKit -[UIResponder becomeFirstResponder] 
65 0x1b730790 PostPhotoViewController Release 4 00:19.302.098 0 QuartzCore CA::AutoreleasePool::~AutoreleasePool() 
66 0x1b730790 PostPhotoViewController Release 3 00:19.302.117 0 QuartzCore CA::AutoreleasePool::~AutoreleasePool() 
67 0x1b730790 PostPhotoViewController Release 2 00:19.302.696 0 QuartzCore CA::AutoreleasePool::~AutoreleasePool() 
68 0x1b730790 PostPhotoViewController Release 1 00:19.303.120 0 QuartzCore CA::AutoreleasePool::~AutoreleasePool() 
69 0x1b730790 PostPhotoViewController Retain 2 00:19.651.789 0 UIKit -[UINavigationController topViewController] 
70 0x1b730790 PostPhotoViewController Autorelease  00:19.651.789 0 UIKit -[UINavigationController topViewController] 
71 0x1b730790 PostPhotoViewController Retain 3 00:19.651.808 0 UIKit -[UINavigationController topViewController] 
72 0x1b730790 PostPhotoViewController Autorelease  00:19.651.809 0 UIKit -[UINavigationController topViewController] 
73 0x1b730790 PostPhotoViewController Retain 4 00:19.651.854 0 UIKit -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] 
74 0x1b730790 PostPhotoViewController Release 3 00:19.651.862 0 UIKit -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] 
75 0x1b730790 PostPhotoViewController Release 2 00:19.651.904 0 GraphicsServices GSEventRunModal 
76 0x1b730790 PostPhotoViewController Release 1 00:19.651.905 0 GraphicsServices GSEventRunModal 
77 0x1b730790 PostPhotoViewController Retain 2 00:20.841.683 0 UIKit -[UINavigationController topViewController] 
78 0x1b730790 PostPhotoViewController Autorelease  00:20.841.684 0 UIKit -[UINavigationController topViewController] 
79 0x1b730790 PostPhotoViewController Retain 3 00:20.841.704 0 UIKit -[UINavigationController topViewController] 
80 0x1b730790 PostPhotoViewController Autorelease  00:20.841.705 0 UIKit -[UINavigationController topViewController] 
81 0x1b730790 PostPhotoViewController Retain 4 00:20.841.706 0 UIKit -[UINavigationController _popViewControllerWithTransition:allowPoppingLast:] 
82 0x1b730790 PostPhotoViewController Autorelease  00:20.841.707 0 UIKit -[UINavigationController _popViewControllerWithTransition:allowPoppingLast:] 
83 0x1b730790 PostPhotoViewController Retain 5 00:20.841.716 0 UIKit -[UINavigationController setDisappearingViewController:] 
84 0x1b730790 PostPhotoViewController Release 4 00:20.841.720 0 UIKit _popViewControllerNormal 
85 0x1b730790 PostPhotoViewController Retain 5 00:20.841.732 0 UIKit -[UIViewController removeChildViewController:notifyDidMove:] 
86 0x1b730790 PostPhotoViewController Release 4 00:20.841.733 0 UIKit -[UIViewController removeChildViewController:notifyDidMove:] 
87 0x1b730790 PostPhotoViewController Release 3 00:20.843.840 0 UIKit _UIApplicationHandleEvent 
88 0x1b730790 PostPhotoViewController Release 2 00:20.843.841 0 UIKit _UIApplicationHandleEvent 
89 0x1b730790 PostPhotoViewController Release 1 00:20.843.842 0 UIKit _UIApplicationHandleEvent 
90 0x1b730790 PostPhotoViewController Retain 2 00:20.844.155 0 UIKit -[UINavigationController _startTransition:fromViewController:toViewController:] 
91 0x1b730790 PostPhotoViewController Release 1 00:20.844.178 0 UIKit -[UINavigationController _startTransition:fromViewController:toViewController:] 
92 0x1b730790 PostPhotoViewController Retain 2 00:20.845.394 0 UIKit -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] 
93 0x1b730790 PostPhotoViewController Release 1 00:20.845.396 0 UIKit -[UINavigationController setDisappearingViewController:] 
94 0x1b730790 PostPhotoViewController Retain 2 00:20.845.410 0 UIKit -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] 
95 0x1b730790 PostPhotoViewController Release 1 00:20.845.429 0 UIKit -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] 
96 0x1b730790 PostPhotoViewController Release 0 00:20.845.437 0 UIKit -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] 
97 0x1b730790 PostPhotoViewController Zombie -1 00:23.145.572 0 UIKit -[UITabBarController _tabBarItemClicked:] 
+0

如果不知道如何設置視圖控制器,很難分辨發生了什麼。標籤欄控制器不應該在導航控制器的導航堆棧中尋址某個控制器。你能更徹底地描述你的設置嗎? – rdelmar 2013-02-18 00:41:39

+0

什麼是'UIPickerViewController'?你的意思是'UIImagePickerController'?如果是的話,在將其他控制器推入堆棧之前,您是否正確解僱了它?你在使用故事板嗎?如果是這樣的話,可以在問題中展示出來......無論如何,你可以給出更多關於你的viewControllers如何適應/導航 – foundry 2013-02-18 00:53:46

+0

的具體細節,PostPhotoVC由於某種原因被設置爲TabBarController委託。去除那些固定的東西。 – Live2Enjoy7 2013-02-18 00:55:36

回答

3

PostPhotoViewController是越來越設置爲代表的UITabBarController出於某種原因。刪除那些固定的東西。

+0

真棒...我有完全相同的問題!謝謝! – 2013-08-28 04:50:37

+0

嗨,我有同樣的問題,我必須刪除應用程序委託中的標籤欄委託 – morroko 2014-10-11 13:06:49

相關問題