我的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];
}
答案 0 :(得分:2)
您的-initWithURL:
方法以递归方式调用自身。每次执行此操作时,它都会添加一个堆栈帧,最终会耗尽堆栈空间并导致崩溃。发生这种情况时,调试器通常不会为您提供更多有用的信息。
你的意思是?
-(id)initWithURL:(NSURL*)aURL{
return [super initWithURL:aURL];
}