iphone - 调试崩溃报告

标签 iphone crash report

突然间,我的应用程序开始崩溃。我得到了以下信息

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000010f8b9f0
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Application Specific Information:
objc_msgSend() selector name: release
iPhone Simulator 235, iPhone OS 4.2 (iPhone/8C134)

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                 0x01223a63 objc_msgSend + 23
1   CoreFoundation                  0x00fd8a6c CFRelease + 92
2   CoreFoundation                  0x010ba8ca -[__NSArrayI dealloc] + 170
3   CoreFoundation                  0x00fd8a6c CFRelease + 92
4   CoreFoundation                  0x00ffdb8d _CFAutoreleasePoolPop + 237
5   Foundation                      0x00056738 -[NSAutoreleasePool drain] + 167
6   CFNetwork                       0x0168c606 URLConnectionClient::_clientDidFinishLoading(URLConnectionClient::ClientConnectionEventQueue*) + 220
7   CFNetwork                       0x01757821 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 293
8   CFNetwork                       0x01757b0f URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 1043
9   CFNetwork                       0x01682e3c URLConnectionClient::processEvents() + 100
10  CFNetwork                       0x01682cb7 MultiplexerSource::perform() + 251
11  CoreFoundation                  0x010a301f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
12  CoreFoundation                  0x0100128b __CFRunLoopDoSources0 + 571
13  CoreFoundation                  0x01000786 __CFRunLoopRun + 470
14  CoreFoundation                  0x01000240 CFRunLoopRunSpecific + 208
15  CoreFoundation                  0x01000161 CFRunLoopRunInMode + 97
16  GraphicsServices                0x0198d268 GSEventRunModal + 217
17  GraphicsServices                0x0198d32d GSEventRun + 115
18  UIKit                           0x0030c42e UIApplicationMain + 1160
19  i-Referral                      0x00002582 main + 84 (main.m:53)
20  i-Referral                      0x00002525 start + 53

如果我在 Zombie 开启的情况下运行“分配”,一切正常,但是没有引发任何标志。

它在 NSURLRequest 坐在 App 委托(delegate)中后崩溃。任何的想法?

在 connectionDidFinishLoading: 方法中我只调用解析。一个数组被创建并释放。

当应用程序崩溃时,它并没有那么远。

当应用程序第一次在这里启动时,事件序列:
设置 nsurl,
conn收到回复,
conn收到数据,
连接完成加载,
解析开始...

当崩溃发生时,我在应用程序委托(delegate)中调用一个方法,它会转到
设置 nsurl,
然后崩溃永远不会到达 conn 收到的响应
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{


NSXMLParser *responseParser = [[NSXMLParser alloc] initWithData:provListData];
responseParser.delegate = self;
[responseParser parse];
[responseParser release];



}

我认为是推新 Controller 造成的崩溃。

这就是我所拥有的。登录 View -> 注册 View

如果注册完成,将显示一个新页面仪表板。它将通过成为 Root View Controller 来替换登录和注册页面。

我有这个工作,但某处发生了变化。

我在成功登录时做同样的事情,效果很好。

在里面
UINavigationController *localNavigationController;
tabBarController = [[UITabBarController alloc] init];
NSMutableArray *localControllersArray = [[NSMutableArray   alloc] initWithCapacity:3];


ProviderListViewController *firstViewController;
    firstViewController = [[ProviderListViewController alloc] initWithTabBar];
    localNavigationController = [[UINavigationController alloc] 
                                 initWithRootViewController:firstViewController];

    [localControllersArray addObject:localNavigationController];
    [localNavigationController release];
    [firstViewController release];



    Login *signupViewController;
    signupViewController = [[Login alloc] initWithTabBar];
    localNavigationController = [[UINavigationController alloc] 
                                 initWithRootViewController:signupViewController];

    [localControllersArray addObject:localNavigationController];
    [localNavigationController release];
    [signupViewController release]; 


    SecondViewController *secondViewController;
    secondViewController = [[SecondViewController alloc] initWithTabBar];
    localNavigationController = [[UINavigationController alloc] 
                                 initWithRootViewController:secondViewController];

    [localControllersArray addObject:localNavigationController];
    [localNavigationController release];
    [secondViewController release];


 tabBarController.viewControllers = localControllersArray;

[self.window addSubview:tabBarController.view];

[self.window makeKeyAndVisible];

[localControllersArray release];

推新 Controller
AppDelegate  *appd = [[AppDelegate alloc]init];
    [appd gotConnection];
    [appd release];



    UINavigationController *navcont = self.navigationController;
    [self retain];
    Dashboard *third = [[Dashboard alloc] initWithNibName:@"Dashboard" bundle:nil];
    NSArray *newarray = [NSArray arrayWithObjects:third,nil,nil];
    [navcont setViewControllers:newarray animated:YES];
    [third release];    

最佳答案

看起来您正在发送 release发送给 connectionDidFinishLoading: 中已释放实例的消息方法。检查内存管理调用是否平衡。

关于iphone - 调试崩溃报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6399841/

相关文章:

android - Android-每次我尝试开启应用程式时都会当机

sql - 为什么我无法更改 MS Access 报告中数字字段的格式?

ms-access - Microsoft Access : Long Text field truncated in report! 如何解决此问题?

mysql - ORDER BY 子句中的 IF 语句

iphone - PhoneGap应用商店提交

ios - iOS 9.1/9.2 上带有 EXC_BAD_ACCESS CODE 1 的 AppDelegate 类声明时应用程序崩溃

C++代码交叉编译到ARM,运行时崩溃

ios - "Over The Air"iOS App 下载不完整

仅适用于移动设备的 CSS

.net - 如何在崩溃时创建进程小型转储而不在 Windows 7 上显式运行 AdPlus?