2012-03-11 31 views
0

我的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]; 
} 

回答

2

-initWithURL:方法自稱遞歸。每次它這樣做,它都會添加一個堆棧框架,並最終耗盡堆棧空間並崩潰。在發生這種情況時,調試器通常不會提供很多有用的信息。

您的意思是?

-(id)initWithURL:(NSURL*)aURL{ 
    return [super initWithURL:aURL]; 
} 
+0

雅正好。它整理了我的問題 – user1063202 2012-03-14 15:57:47

相關問題