当 main 返回“应该已失效”时,应用程序崩溃
主程序返回时应用程序崩溃。
有谁知道控制台消息“应该已失效”是什么意思?我运行了 Clang 并收到了干净的测试结果。我成功地使用 Stig Brautaset 的库解析 JSON,如下所示:
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
...
NSDictionary *results = [responseString JSONValue];
...
}
错误: EXEC_BAD_ACCESS
控制台消息 2012-01-21 08:57:55.817 wftd-remote-json[14190:707] 应该已失效
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[]){
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
控制台消息 2012-01-21 08:57:55.817 wftd-remote-json[14190:707] 应该已无效
感谢您查看此内容
App crashing when main returns.
Does anyone know what the console message "Should've been invalidated" means? I ran Clang and received a clean test result. I am successfully parsing JSON with Stig Brautaset's library like so:
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
...
NSDictionary *results = [responseString JSONValue];
...
}
Error:
EXEC_BAD_ACCESS
Console Message
2012-01-21 08:57:55.817 wftd-remote-json[14190:707] Should've been invalidated
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[]){
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
Console Message
2012-01-21 08:57:55.817 wftd-remote-json[14190:707] Should've been invalidated
Thanks for looking at this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过使用 Instruments,我能够找到 Zombie 对象并纠正我的错误。全部固定。感谢 TriPhoenix 的建议。
By using Instruments, I was able to find the Zombie object and correct my error. All fixed. Thanks to TriPhoenix for the suggestion.