0

我的 iPhone 应用程序崩溃并给出以下警告

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.

这是实际崩溃的代码

+(id) tbxmlWithURL:(NSURL*)aURL;{
    return [[TBXML alloc] initWithURL:aURL];
}


-(id)initWithURL:(NSURL*)aURL{
    return [self initWithURL:aURL];
}
4

1 回答 1

2

您的-initWithURL:方法正在递归调用自身。每次这样做时,它都会添加一个堆栈帧,最终您会用完堆栈空间并崩溃。发生这种情况时,调试器通常不会为您提供太多有用的信息。

你是这个意思吗?

-(id)initWithURL:(NSURL*)aURL{
    return [super initWithURL:aURL];
}
于 2012-03-11T05:02:33.290 回答