警告无法恢复以前的框架,并给予错误:EXC_BAD_ACCESS
问题描述:
我的iPhone应用程序崩溃,并给出了以下警告警告无法恢复以前的框架,并给予错误:EXC_BAD_ACCESS
warning: Unable to restore previously selected frame.
Current language: auto; currently objective-c
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
这里是代码,其中actauly崩溃
+(id) tbxmlWithURL:(NSURL*)aURL;{
return [[TBXML alloc] initWithURL:aURL];
}
-(id)initWithURL:(NSURL*)aURL{
return [self initWithURL:aURL];
}
答
你-initWithURL:
方法自称递归。每次它这样做,它都会添加一个堆栈框架,并最终耗尽堆栈空间并崩溃。在发生这种情况时,调试器通常不会提供很多有用的信息。
您的意思是?
-(id)initWithURL:(NSURL*)aURL{
return [super initWithURL:aURL];
}
雅正好。它整理了我的问题 – user1063202 2012-03-14 15:57:47