iphone - popViewController动画:YES crashes my app

标签 iphone uinavigationcontroller crash

当我执行 [self.navigationController popViewControllerAnimated:YES] 时,我的应用程序崩溃了。

它在设备上比在模拟器上崩溃更多。请建议如何解决这个问题?

Date/Time:       2010-11-09 10:51:41.325 +0800
OS Version:      iPhone OS 4.0.1 (8A306)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                0x0000286e objc_msgSend + 18
1   CoreFoundation                 0x00002c30 -[NSObject(NSObject) release] + 24
2   libobjc.A.dylib                0x00003c1a objc_setProperty + 114
3   UIKit                          0x000693d4 -[UINavigationController setDisappearingViewController:] + 24
4   UIKit                          0x0007d5c0 -[UINavigationController _clearLastOperation] + 40
5   UIKit                          0x0007d4b4 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 556
6   UIKit                          0x0007d248 -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:] + 204
7   UIKit                          0x0007d0b6 -[UINavigationTransitionView _navigationTransitionDidStop] + 450
8   UIKit                          0x00059974 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 184
9   UIKit                          0x0005987e -[UIViewAnimationState animationDidStop:finished:] + 34
10  QuartzCore                     0x000127ba run_animation_callbacks(double, void*) + 286
11  QuartzCore                     0x0001265c CA::timer_callback(__CFRunLoopTimer*, void*) + 116
12  CoreFoundation                 0x00071a54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
13  CoreFoundation                 0x00073ede __CFRunLoopDoTimer + 854
14  CoreFoundation                 0x0007485e __CFRunLoopRun + 1082
15  CoreFoundation                 0x0001d8e4 CFRunLoopRunSpecific + 224
16  CoreFoundation                 0x0001d7ec CFRunLoopRunInMode + 52
17  GraphicsServices               0x000036e8 GSEventRunModal + 108
18  GraphicsServices               0x00003794 GSEventRun + 56
19  UIKit                          0x000062a0 -[UIApplication _run] + 396
20  UIKit                          0x00004e10 UIApplicationMain + 664
21  tenpay                         0x00006124 main (main.m:13)
22  tenpay                         0x00002324 start + 44

最佳答案

myviewcontroller = [[[MyViewController alloc]init]autorelease];
[self.navigationController pushViewController:myviewcontroller animated:YES];
[myviewcontroller release]; //This is my bug !!!  I just fixed it.

关于iphone - popViewController动画:YES crashes my app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4130179/

相关文章:

iphone - 如何从 iPhone 音乐库中获取特定年份的所有歌曲?

ios - UINavigationController 在设备旋转时自动弹出到 Root View

ipad - ARC 环境下 iPad 上的 UIPopoverController 和 UIImagePickerController

iphone - 为什么在自动保存 UIDocument 后调用 loadFromContents?

iphone - 如何在 XCode 5 中添加 57x57 图标

iOS 8 : -[UIInputViewSet setRestorableResponder:]: message sent to deallocated instance 0x7d6659b0

ios - 在基于标签栏的应用程序上使用 UINavigationController 将数组添加到 UITableView

ios - 在 2 个 VC 之间传输时导航栏背景颜色出现问题

android - 从数据库获取数据时应用崩溃

ios - Xcode 无法添加帐户,导致崩溃